PD1.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 » PD1.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 PD1 message segment. 
/// This segment has the following fields:<ol>
///<li>PD1-1: Living Dependency (IS)</li>
///<li>PD1-2: Living Arrangement (IS)</li>
///<li>PD1-3: Patient Primary Facility (XON)</li>
///<li>PD1-4: Patient Primary Care Provider Name and ID No. (XCN)</li>
///<li>PD1-5: Student Indicator (IS)</li>
///<li>PD1-6: Handicap (IS)</li>
///<li>PD1-7: Living Will Code (IS)</li>
///<li>PD1-8: Organ Donor Code (IS)</li>
///<li>PD1-9: Separate Bill (ID)</li>
///<li>PD1-10: Duplicate Patient (CX)</li>
///<li>PD1-11: Publicity Code (CE)</li>
///<li>PD1-12: Protection Indicator (ID)</li>
///<li>PD1-13: Protection Indicator Effective Date (DT)</li>
///<li>PD1-14: Place of Worship (XON)</li>
///<li>PD1-15: Advance Directive Code (CE)</li>
///<li>PD1-16: Immunization Registry Status (IS)</li>
///<li>PD1-17: Immunization Registry Status Effective Date (DT)</li>
///<li>PD1-18: Publicity Code Effective Date (DT)</li>
///<li>PD1-19: Military Branch (IS)</li>
///<li>PD1-20: Military Rank/Grade (IS)</li>
///<li>PD1-21: Military Status (IS)</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 PD1 : AbstractSegment  {

  /**
   * Creates a PD1 (Patient Additional Demographic) segment object that belongs to the given 
   * message.  
   */
  public PD1(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
  IMessage message = Message;
    try {
       this.add(typeof(IS), false, 0, 2, new System.Object[]{message, 223}, "Living Dependency");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 220}, "Living Arrangement");
       this.add(typeof(XON), false, 0, 250, new System.Object[]{message}, "Patient Primary Facility");
       this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Patient Primary Care Provider Name and ID No.");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 231}, "Student Indicator");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 295}, "Handicap");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 315}, "Living Will Code");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 316}, "Organ Donor Code");
       this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Separate Bill");
       this.add(typeof(CX), false, 0, 250, new System.Object[]{message}, "Duplicate Patient");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Publicity Code");
       this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Protection Indicator");
       this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Protection Indicator Effective Date");
       this.add(typeof(XON), false, 0, 250, new System.Object[]{message}, "Place of Worship");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Advance Directive Code");
       this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 441}, "Immunization Registry Status");
       this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Immunization Registry Status Effective Date");
       this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Publicity Code Effective Date");
       this.add(typeof(IS), false, 1, 5, new System.Object[]{message, 140}, "Military Branch");
       this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 141}, "Military Rank/Grade");
       this.add(typeof(IS), false, 1, 3, new System.Object[]{message, 142}, "Military Status");
    } catch (HL7Exception he) {
        HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
    }
  }

  ///<summary>
  /// Returns a single repetition of Living Dependency(PD1-1).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public IS GetLivingDependency(int rep)
  {
      IS ret = null;
      try
      {
      IType t = this.GetField(1, 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 Living Dependency (PD1-1).
   ///</summary>
  public IS[] GetLivingDependency() {
     IS[] ret = null;
    try {
        IType[] t = this.GetField(1);  
        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 Living Dependency (PD1-1).
   ///</summary>
  public int LivingDependencyRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(1);
    }
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 Living Arrangement(PD1-2).
  ///</summary>
  public IS LivingArrangement
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(2, 0);
        ret = (IS)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 Patient Primary Facility(PD1-3).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public XON GetPatientPrimaryFacility(int rep)
  {
      XON ret = null;
      try
      {
      IType t = this.GetField(3, rep);
        ret = (XON)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 Patient Primary Facility (PD1-3).
   ///</summary>
  public XON[] GetPatientPrimaryFacility() {
     XON[] ret = null;
    try {
        IType[] t = this.GetField(3);  
        ret = new XON[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (XON)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 Patient Primary Facility (PD1-3).
   ///</summary>
  public int PatientPrimaryFacilityRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(3);
    }
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 Patient Primary Care Provider Name and ID No.(PD1-4).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public XCN GetPatientPrimaryCareProviderNameIDNo(int rep)
  {
      XCN ret = null;
      try
      {
      IType t = this.GetField(4, 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 Patient Primary Care Provider Name and ID No. (PD1-4).
   ///</summary>
  public XCN[] GetPatientPrimaryCareProviderNameIDNo() {
     XCN[] ret = null;
    try {
        IType[] t = this.GetField(4);  
        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 Patient Primary Care Provider Name and ID No. (PD1-4).
   ///</summary>
  public int PatientPrimaryCareProviderNameIDNoRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(4);
    }
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 Student Indicator(PD1-5).
  ///</summary>
  public IS StudentIndicator
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(5, 0);
        ret = (IS)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 Handicap(PD1-6).
  ///</summary>
  public IS Handicap
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(6, 0);
        ret = (IS)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 Living Will Code(PD1-7).
  ///</summary>
  public IS LivingWillCode
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(7, 0);
        ret = (IS)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 Organ Donor Code(PD1-8).
  ///</summary>
  public IS OrganDonorCode
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(8, 0);
        ret = (IS)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 Separate Bill(PD1-9).
  ///</summary>
  public ID SeparateBill
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(9, 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 a single repetition of Duplicate Patient(PD1-10).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CX GetDuplicatePatient(int rep)
  {
      CX ret = null;
      try
      {
      IType t = this.GetField(10, rep);
        ret = (CX)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 Duplicate Patient (PD1-10).
   ///</summary>
  public CX[] GetDuplicatePatient() {
     CX[] ret = null;
    try {
        IType[] t = this.GetField(10);  
        ret = new CX[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (CX)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 Duplicate Patient (PD1-10).
   ///</summary>
  public int DuplicatePatientRepetitionsUsed
{
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 Publicity Code(PD1-11).
  ///</summary>
  public CE PublicityCode
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(11, 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 Protection Indicator(PD1-12).
  ///</summary>
  public ID ProtectionIndicator
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(12, 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 Protection Indicator Effective Date(PD1-13).
  ///</summary>
  public DT ProtectionIndicatorEffectiveDate
  {
    get{
      DT ret = null;
      try
      {
      IType t = this.GetField(13, 0);
        ret = (DT)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 Place of Worship(PD1-14).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public XON GetPlaceOfWorship(int rep)
  {
      XON ret = null;
      try
      {
      IType t = this.GetField(14, rep);
        ret = (XON)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 Place of Worship (PD1-14).
   ///</summary>
  public XON[] GetPlaceOfWorship() {
     XON[] ret = null;
    try {
        IType[] t = this.GetField(14);  
        ret = new XON[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (XON)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 Place of Worship (PD1-14).
   ///</summary>
  public int PlaceOfWorshipRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(14);
    }
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 Advance Directive Code(PD1-15).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetAdvanceDirectiveCode(int rep)
  {
      CE ret = null;
      try
      {
      IType t = this.GetField(15, 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 Advance Directive Code (PD1-15).
   ///</summary>
  public CE[] GetAdvanceDirectiveCode() {
     CE[] ret = null;
    try {
        IType[] t = this.GetField(15);  
        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 Advance Directive Code (PD1-15).
   ///</summary>
  public int AdvanceDirectiveCodeRepetitionsUsed
{
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 Immunization Registry Status(PD1-16).
  ///</summary>
  public IS ImmunizationRegistryStatus
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(16, 0);
        ret = (IS)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 Immunization Registry Status Effective Date(PD1-17).
  ///</summary>
  public DT ImmunizationRegistryStatusEffectiveDate
  {
    get{
      DT ret = null;
      try
      {
      IType t = this.GetField(17, 0);
        ret = (DT)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 Publicity Code Effective Date(PD1-18).
  ///</summary>
  public DT PublicityCodeEffectiveDate
  {
    get{
      DT ret = null;
      try
      {
      IType t = this.GetField(18, 0);
        ret = (DT)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 Military Branch(PD1-19).
  ///</summary>
  public IS MilitaryBranch
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(19, 0);
        ret = (IS)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 Military Rank/Grade(PD1-20).
  ///</summary>
  public IS MilitaryRankGrade
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(20, 0);
        ret = (IS)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 Military Status(PD1-21).
  ///</summary>
  public IS MilitaryStatus
  {
    get{
      IS ret = null;
      try
      {
      IType t = this.GetField(21, 0);
        ret = (IS)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.