///<summary> /// Returns a single repetition of BC Special Testing(BPX-12). /// throws HL7Exception if the repetition number is invalid. /// <param name="rep">The repetition number (this is a repeating field)</param> ///</summary> public CNE GetBCSpecialTesting(int rep) { CNE ret = null; try { IType t = this.GetField(12, rep); ret = (CNE)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 a single repetition of Procedure Code Modifier(ITM-28). /// throws HL7Exception if the repetition number is invalid. /// <param name="rep">The repetition number (this is a repeating field)</param> ///</summary> public CNE GetProcedureCodeModifier(int rep) { CNE ret = null; try { IType t = this.GetField(28, rep); ret = (CNE)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 a single repetition of BC Special Testing (BPX-12).</summary> /// <param name="rep">the repetition number (this is a repeating field) /// </param> /// <throws> HL7Exception if the repetition number is invalid. </throws> public virtual CNE getBCSpecialTesting(int rep) { CNE ret = null; try { Type t = this.getField(12, rep); ret = (CNE)t; } catch (System.InvalidCastException) { throw new Exception(); } return(ret); }
///<summary> /// Returns all repetitions of BC Special Testing (BPX-12). ///</summary> public CNE[] GetBCSpecialTesting() { CNE[] ret = null; try { IType[] t = this.GetField(12); ret = new CNE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CNE)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 all repetitions of BC Special Testing (BPX-12).</summary> public virtual CNE[] getBCSpecialTesting() { CNE[] ret = null; try { Type[] t = this.getField(12); ret = new CNE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CNE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
// Module defining this command // Optional custom code for this activity /// <summary> /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// </summary> /// <param name="context">The NativeActivityContext for the currently running activity.</param> /// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns> /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks> protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if (InputObject.Expression != null) { targetCommand.AddParameter("InputObject", InputObject.Get(context)); } if (FilterScript.Expression != null) { targetCommand.AddParameter("FilterScript", FilterScript.Get(context)); } if (Property.Expression != null) { targetCommand.AddParameter("Property", Property.Get(context)); } if (Value.Expression != null) { targetCommand.AddParameter("Value", Value.Get(context)); } if (EQ.Expression != null) { targetCommand.AddParameter("EQ", EQ.Get(context)); } if (CEQ.Expression != null) { targetCommand.AddParameter("CEQ", CEQ.Get(context)); } if (NE.Expression != null) { targetCommand.AddParameter("NE", NE.Get(context)); } if (CNE.Expression != null) { targetCommand.AddParameter("CNE", CNE.Get(context)); } if (GT.Expression != null) { targetCommand.AddParameter("GT", GT.Get(context)); } if (CGT.Expression != null) { targetCommand.AddParameter("CGT", CGT.Get(context)); } if (LT.Expression != null) { targetCommand.AddParameter("LT", LT.Get(context)); } if (CLT.Expression != null) { targetCommand.AddParameter("CLT", CLT.Get(context)); } if (GE.Expression != null) { targetCommand.AddParameter("GE", GE.Get(context)); } if (CGE.Expression != null) { targetCommand.AddParameter("CGE", CGE.Get(context)); } if (LE.Expression != null) { targetCommand.AddParameter("LE", LE.Get(context)); } if (CLE.Expression != null) { targetCommand.AddParameter("CLE", CLE.Get(context)); } if (Like.Expression != null) { targetCommand.AddParameter("Like", Like.Get(context)); } if (CLike.Expression != null) { targetCommand.AddParameter("CLike", CLike.Get(context)); } if (NotLike.Expression != null) { targetCommand.AddParameter("NotLike", NotLike.Get(context)); } if (CNotLike.Expression != null) { targetCommand.AddParameter("CNotLike", CNotLike.Get(context)); } if (Match.Expression != null) { targetCommand.AddParameter("Match", Match.Get(context)); } if (CMatch.Expression != null) { targetCommand.AddParameter("CMatch", CMatch.Get(context)); } if (NotMatch.Expression != null) { targetCommand.AddParameter("NotMatch", NotMatch.Get(context)); } if (CNotMatch.Expression != null) { targetCommand.AddParameter("CNotMatch", CNotMatch.Get(context)); } if (Contains.Expression != null) { targetCommand.AddParameter("Contains", Contains.Get(context)); } if (CContains.Expression != null) { targetCommand.AddParameter("CContains", CContains.Get(context)); } if (NotContains.Expression != null) { targetCommand.AddParameter("NotContains", NotContains.Get(context)); } if (CNotContains.Expression != null) { targetCommand.AddParameter("CNotContains", CNotContains.Get(context)); } if (In.Expression != null) { targetCommand.AddParameter("In", In.Get(context)); } if (CIn.Expression != null) { targetCommand.AddParameter("CIn", CIn.Get(context)); } if (NotIn.Expression != null) { targetCommand.AddParameter("NotIn", NotIn.Get(context)); } if (CNotIn.Expression != null) { targetCommand.AddParameter("CNotIn", CNotIn.Get(context)); } if (Is.Expression != null) { targetCommand.AddParameter("Is", Is.Get(context)); } if (IsNot.Expression != null) { targetCommand.AddParameter("IsNot", IsNot.Get(context)); } return(new ActivityImplementationContext() { PowerShellInstance = invoker }); }