QRF.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 » QRF.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 QRF message segment. 
/// This segment has the following fields:<ol>
///<li>QRF-1: Where Subject Filter (ST)</li>
///<li>QRF-2: When Data Start Date/Time (TS)</li>
///<li>QRF-3: When Data End Date/Time (TS)</li>
///<li>QRF-4: What User Qualifier (ST)</li>
///<li>QRF-5: Other QRY Subject Filter (ST)</li>
///<li>QRF-6: Which Date/Time Qualifier (ID)</li>
///<li>QRF-7: Which Date/Time Status Qualifier (ID)</li>
///<li>QRF-8: Date/Time Selection Qualifier (ID)</li>
///<li>QRF-9: When Quantity/Timing Qualifier (TQ)</li>
///<li>QRF-10: Search Confidence Threshold (NM)</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 QRF : AbstractSegment  {

  /**
   * Creates a QRF (Original style query filter) segment object that belongs to the given 
   * message.  
   */
  public QRF(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
  IMessage message = Message;
    try {
       this.add(typeof(ST), true, 0, 20, new System.Object[]{message}, "Where Subject Filter");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "When Data Start Date/Time");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "When Data End Date/Time");
       this.add(typeof(ST), false, 0, 60, new System.Object[]{message}, "What User Qualifier");
       this.add(typeof(ST), false, 0, 60, new System.Object[]{message}, "Other QRY Subject Filter");
       this.add(typeof(ID), false, 0, 12, new System.Object[]{message, 156}, "Which Date/Time Qualifier");
       this.add(typeof(ID), false, 0, 12, new System.Object[]{message, 157}, "Which Date/Time Status Qualifier");
       this.add(typeof(ID), false, 0, 12, new System.Object[]{message, 158}, "Date/Time Selection Qualifier");
       this.add(typeof(TQ), false, 1, 60, new System.Object[]{message}, "When Quantity/Timing Qualifier");
       this.add(typeof(NM), false, 1, 10, new System.Object[]{message}, "Search Confidence Threshold");
    } catch (HL7Exception he) {
        HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
    }
  }

  ///<summary>
  /// Returns a single repetition of Where Subject Filter(QRF-1).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ST GetWhereSubjectFilter(int rep)
  {
      ST ret = null;
      try
      {
      IType t = this.GetField(1, 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 Where Subject Filter (QRF-1).
   ///</summary>
  public ST[] GetWhereSubjectFilter() {
     ST[] ret = null;
    try {
        IType[] t = this.GetField(1);  
        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 Where Subject Filter (QRF-1).
   ///</summary>
  public int WhereSubjectFilterRepetitionsUsed
{
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 When Data Start Date/Time(QRF-2).
  ///</summary>
  public TS WhenDataStartDateTime
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(2, 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 When Data End Date/Time(QRF-3).
  ///</summary>
  public TS WhenDataEndDateTime
  {
    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 a single repetition of What User Qualifier(QRF-4).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ST GetWhatUserQualifier(int rep)
  {
      ST ret = null;
      try
      {
      IType t = this.GetField(4, 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 What User Qualifier (QRF-4).
   ///</summary>
  public ST[] GetWhatUserQualifier() {
     ST[] ret = null;
    try {
        IType[] t = this.GetField(4);  
        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 What User Qualifier (QRF-4).
   ///</summary>
  public int WhatUserQualifierRepetitionsUsed
{
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 a single repetition of Other QRY Subject Filter(QRF-5).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ST GetOtherQRYSubjectFilter(int rep)
  {
      ST ret = null;
      try
      {
      IType t = this.GetField(5, 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 Other QRY Subject Filter (QRF-5).
   ///</summary>
  public ST[] GetOtherQRYSubjectFilter() {
     ST[] ret = null;
    try {
        IType[] t = this.GetField(5);  
        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 Other QRY Subject Filter (QRF-5).
   ///</summary>
  public int OtherQRYSubjectFilterRepetitionsUsed
{
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 a single repetition of Which Date/Time Qualifier(QRF-6).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ID GetWhichDateTimeQualifier(int rep)
  {
      ID ret = null;
      try
      {
      IType t = this.GetField(6, 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 Which Date/Time Qualifier (QRF-6).
   ///</summary>
  public ID[] GetWhichDateTimeQualifier() {
     ID[] ret = null;
    try {
        IType[] t = this.GetField(6);  
        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 Which Date/Time Qualifier (QRF-6).
   ///</summary>
  public int WhichDateTimeQualifierRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(6);
    }
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 Which Date/Time Status Qualifier(QRF-7).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ID GetWhichDateTimeStatusQualifier(int rep)
  {
      ID ret = null;
      try
      {
      IType t = this.GetField(7, 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 Which Date/Time Status Qualifier (QRF-7).
   ///</summary>
  public ID[] GetWhichDateTimeStatusQualifier() {
     ID[] ret = null;
    try {
        IType[] t = this.GetField(7);  
        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 Which Date/Time Status Qualifier (QRF-7).
   ///</summary>
  public int WhichDateTimeStatusQualifierRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(7);
    }
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 Date/Time Selection Qualifier(QRF-8).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ID GetDateTimeSelectionQualifier(int rep)
  {
      ID ret = null;
      try
      {
      IType t = this.GetField(8, 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 Date/Time Selection Qualifier (QRF-8).
   ///</summary>
  public ID[] GetDateTimeSelectionQualifier() {
     ID[] ret = null;
    try {
        IType[] t = this.GetField(8);  
        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 Date/Time Selection Qualifier (QRF-8).
   ///</summary>
  public int DateTimeSelectionQualifierRepetitionsUsed
{
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 When Quantity/Timing Qualifier(QRF-9).
  ///</summary>
  public TQ WhenQuantityTimingQualifier
  {
    get{
      TQ ret = null;
      try
      {
      IType t = this.GetField(9, 0);
        ret = (TQ)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 Search Confidence Threshold(QRF-10).
  ///</summary>
  public NM SearchConfidenceThreshold
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(10, 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;
  }
  }


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