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 SCH message segment.
/// This segment has the following fields:<ol>
///<li>SCH-1: Placer Appointment ID (EI)</li>
///<li>SCH-2: Filler Appointment ID (EI)</li>
///<li>SCH-3: Occurrence Number (NM)</li>
///<li>SCH-4: Placer Group Number (EI)</li>
///<li>SCH-5: Schedule ID (CE)</li>
///<li>SCH-6: Event Reason (CE)</li>
///<li>SCH-7: Appointment Reason (CE)</li>
///<li>SCH-8: Appointment Type (CE)</li>
///<li>SCH-9: Appointment Duration (NM)</li>
///<li>SCH-10: Appointment Duration Units (CE)</li>
///<li>SCH-11: Appointment Timing Quantity (TQ)</li>
///<li>SCH-12: Placer Contact Person (XCN)</li>
///<li>SCH-13: Placer Contact Phone Number (XTN)</li>
///<li>SCH-14: Placer Contact Address (XAD)</li>
///<li>SCH-15: Placer Contact Location (PL)</li>
///<li>SCH-16: Filler Contact Person (XCN)</li>
///<li>SCH-17: Filler Contact Phone Number (XTN)</li>
///<li>SCH-18: Filler Contact Address (XAD)</li>
///<li>SCH-19: Filler Contact Location (PL)</li>
///<li>SCH-20: Entered By Person (XCN)</li>
///<li>SCH-21: Entered By Phone Number (XTN)</li>
///<li>SCH-22: Entered By Location (PL)</li>
///<li>SCH-23: Parent Placer Appointment ID (EI)</li>
///<li>SCH-24: Parent Filler Appointment ID (EI)</li>
///<li>SCH-25: Filler Status Code (CE)</li>
///<li>SCH-26: Placer Order Number (EI)</li>
///<li>SCH-27: Filler Order Number (EI)</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 SCH : AbstractSegment {
/**
* Creates a SCH (Scheduling Activity Information) segment object that belongs to the given
* message.
*/
public SCH(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
IMessage message = Message;
try {
this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Placer Appointment ID");
this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Filler Appointment ID");
this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Occurrence Number");
this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "Placer Group Number");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Schedule ID");
this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Event Reason");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Appointment Reason");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Appointment Type");
this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Appointment Duration");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Appointment Duration Units");
this.add(typeof(TQ), false, 0, 200, new System.Object[]{message}, "Appointment Timing Quantity");
this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Placer Contact Person");
this.add(typeof(XTN), false, 1, 250, new System.Object[]{message}, "Placer Contact Phone Number");
this.add(typeof(XAD), false, 0, 250, new System.Object[]{message}, "Placer Contact Address");
this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Placer Contact Location");
this.add(typeof(XCN), true, 0, 250, new System.Object[]{message}, "Filler Contact Person");
this.add(typeof(XTN), false, 1, 250, new System.Object[]{message}, "Filler Contact Phone Number");
this.add(typeof(XAD), false, 0, 250, new System.Object[]{message}, "Filler Contact Address");
this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Filler Contact Location");
this.add(typeof(XCN), true, 0, 250, new System.Object[]{message}, "Entered By Person");
this.add(typeof(XTN), false, 0, 250, new System.Object[]{message}, "Entered By Phone Number");
this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Entered By Location");
this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Placer Appointment ID");
this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Filler Appointment ID");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Filler Status Code");
this.add(typeof(EI), false, 0, 22, new System.Object[]{message}, "Placer Order Number");
this.add(typeof(EI), false, 0, 22, new System.Object[]{message}, "Filler Order Number");
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
}
}
///<summary>
/// Returns Placer Appointment ID(SCH-1).
///</summary>
public EI PlacerAppointmentID
{
get{
EI ret = null;
try
{
IType t = this.GetField(1, 0);
ret = (EI)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 Filler Appointment ID(SCH-2).
///</summary>
public EI FillerAppointmentID
{
get{
EI ret = null;
try
{
IType t = this.GetField(2, 0);
ret = (EI)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 Occurrence Number(SCH-3).
///</summary>
public NM OccurrenceNumber
{
get{
NM ret = null;
try
{
IType t = this.GetField(3, 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 Placer Group Number(SCH-4).
///</summary>
public EI PlacerGroupNumber
{
get{
EI ret = null;
try
{
IType t = this.GetField(4, 0);
ret = (EI)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 Schedule ID(SCH-5).
///</summary>
public CE ScheduleID
{
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 Event Reason(SCH-6).
///</summary>
public CE EventReason
{
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 Appointment Reason(SCH-7).
///</summary>
public CE AppointmentReason
{
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 Appointment Type(SCH-8).
///</summary>
public CE AppointmentType
{
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 Appointment Duration(SCH-9).
///</summary>
public NM AppointmentDuration
{
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 Appointment Duration Units(SCH-10).
///</summary>
public CE AppointmentDurationUnits
{
get{
CE ret = null;
try
{
IType t = this.GetField(10, 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 Appointment Timing Quantity(SCH-11).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public TQ GetAppointmentTimingQuantity(int rep)
{
TQ ret = null;
try
{
IType t = this.GetField(11, rep);
ret = (TQ)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 Appointment Timing Quantity (SCH-11).
///</summary>
public TQ[] GetAppointmentTimingQuantity() {
TQ[] ret = null;
try {
IType[] t = this.GetField(11);
ret = new TQ[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (TQ)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 Appointment Timing Quantity (SCH-11).
///</summary>
public int AppointmentTimingQuantityRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(11);
}
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 Placer Contact Person(SCH-12).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetPlacerContactPerson(int rep)
{
XCN ret = null;
try
{
IType t = this.GetField(12, 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 Placer Contact Person (SCH-12).
///</summary>
public XCN[] GetPlacerContactPerson() {
XCN[] ret = null;
try {
IType[] t = this.GetField(12);
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 Placer Contact Person (SCH-12).
///</summary>
public int PlacerContactPersonRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(12);
}
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 Placer Contact Phone Number(SCH-13).
///</summary>
public XTN PlacerContactPhoneNumber
{
get{
XTN ret = null;
try
{
IType t = this.GetField(13, 0);
ret = (XTN)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 Placer Contact Address(SCH-14).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XAD GetPlacerContactAddress(int rep)
{
XAD ret = null;
try
{
IType t = this.GetField(14, rep);
ret = (XAD)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 Placer Contact Address (SCH-14).
///</summary>
public XAD[] GetPlacerContactAddress() {
XAD[] ret = null;
try {
IType[] t = this.GetField(14);
ret = new XAD[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (XAD)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 Placer Contact Address (SCH-14).
///</summary>
public int PlacerContactAddressRepetitionsUsed
{
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 Placer Contact Location(SCH-15).
///</summary>
public PL PlacerContactLocation
{
get{
PL ret = null;
try
{
IType t = this.GetField(15, 0);
ret = (PL)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 Filler Contact Person(SCH-16).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetFillerContactPerson(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 Filler Contact Person (SCH-16).
///</summary>
public XCN[] GetFillerContactPerson() {
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 Filler Contact Person (SCH-16).
///</summary>
public int FillerContactPersonRepetitionsUsed
{
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 Filler Contact Phone Number(SCH-17).
///</summary>
public XTN FillerContactPhoneNumber
{
get{
XTN ret = null;
try
{
IType t = this.GetField(17, 0);
ret = (XTN)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 Filler Contact Address(SCH-18).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XAD GetFillerContactAddress(int rep)
{
XAD ret = null;
try
{
IType t = this.GetField(18, rep);
ret = (XAD)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 Filler Contact Address (SCH-18).
///</summary>
public XAD[] GetFillerContactAddress() {
XAD[] ret = null;
try {
IType[] t = this.GetField(18);
ret = new XAD[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (XAD)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 Filler Contact Address (SCH-18).
///</summary>
public int FillerContactAddressRepetitionsUsed
{
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 Filler Contact Location(SCH-19).
///</summary>
public PL FillerContactLocation
{
get{
PL ret = null;
try
{
IType t = this.GetField(19, 0);
ret = (PL)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 Entered By Person(SCH-20).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetEnteredByPerson(int rep)
{
XCN ret = null;
try
{
IType t = this.GetField(20, 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 Entered By Person (SCH-20).
///</summary>
public XCN[] GetEnteredByPerson() {
XCN[] ret = null;
try {
IType[] t = this.GetField(20);
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 Entered By Person (SCH-20).
///</summary>
public int EnteredByPersonRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(20);
}
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 Entered By Phone Number(SCH-21).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XTN GetEnteredByPhoneNumber(int rep)
{
XTN ret = null;
try
{
IType t = this.GetField(21, rep);
ret = (XTN)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 Entered By Phone Number (SCH-21).
///</summary>
public XTN[] GetEnteredByPhoneNumber() {
XTN[] ret = null;
try {
IType[] t = this.GetField(21);
ret = new XTN[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (XTN)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 Entered By Phone Number (SCH-21).
///</summary>
public int EnteredByPhoneNumberRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(21);
}
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 Entered By Location(SCH-22).
///</summary>
public PL EnteredByLocation
{
get{
PL ret = null;
try
{
IType t = this.GetField(22, 0);
ret = (PL)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 Parent Placer Appointment ID(SCH-23).
///</summary>
public EI ParentPlacerAppointmentID
{
get{
EI ret = null;
try
{
IType t = this.GetField(23, 0);
ret = (EI)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 Parent Filler Appointment ID(SCH-24).
///</summary>
public EI ParentFillerAppointmentID
{
get{
EI ret = null;
try
{
IType t = this.GetField(24, 0);
ret = (EI)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 Filler Status Code(SCH-25).
///</summary>
public CE FillerStatusCode
{
get{
CE ret = null;
try
{
IType t = this.GetField(25, 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 Placer Order Number(SCH-26).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public EI GetPlacerOrderNumber(int rep)
{
EI ret = null;
try
{
IType t = this.GetField(26, 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 Placer Order Number (SCH-26).
///</summary>
public EI[] GetPlacerOrderNumber() {
EI[] ret = null;
try {
IType[] t = this.GetField(26);
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 Placer Order Number (SCH-26).
///</summary>
public int PlacerOrderNumberRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(26);
}
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 Filler Order Number(SCH-27).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public EI GetFillerOrderNumber(int rep)
{
EI ret = null;
try
{
IType t = this.GetField(27, 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 Filler Order Number (SCH-27).
///</summary>
public EI[] GetFillerOrderNumber() {
EI[] ret = null;
try {
IType[] t = this.GetField(27);
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 Filler Order Number (SCH-27).
///</summary>
public int FillerOrderNumberRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(27);
}
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);
}
}
}
}}
|