Esempio n. 1
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.SpecificEntropy"/> and the Temperature.<br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.Water"/>);</c></br>
        /// <br><c>Water.UpdateTS(<see cref="UnitsNet.Temperature"/>.FromKelvins(286.15), <see cref="UnitsNet.SpecificEntropy"/>.FromJoulesPerKilogramKelvin(195.27));</c></br>
        /// </summary>
        /// <param name = "temperature" > The Temperature used in the update</param>
        /// <param name = "entropy" > The <see cref="UnitsNet.SpecificEntropy"/> used in the update</param>
        public void UpdateTS(Temperature temperature, SpecificEntropy entropy)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }

            if (Media.InternalName.Contains(".mix"))
            {
                throw new NotImplementedException("For mixtures only UpdatePX, UpdateXT and UpdatePT works");
            }

            try
            {
                REF.update(input_pairs.SmassT_INPUTS, entropy.JoulesPerKilogramKelvin, temperature.Kelvins);
                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateHS -> CoolProp could not return your request on {temperature} and {entropy} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdateHS -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {temperature} and {entropy} {e}");
                throw;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Updates the values of the <see cref="Fluid"/> after an update
        /// </summary>
        protected virtual void UpdateValues()
        {
            try
            {
                if (Media.BackendType == "HEOS")
                {
                    //Mixed fluids does not have these properties
                    SoundSpeed      = REF.speed_sound();
                    MolarMass       = REF.molar_mass();
                    Compressibility = REF.compressibility_factor();
                }

                Enthalpy         = REF.hmass();
                Temperature      = REF.T();
                Pressure         = REF.p();
                Entropy          = REF.smass();
                Quality          = REF.Q();
                Density          = REF.rhomass();
                Cp               = REF.cpmass();
                Cv               = REF.cvmass();
                DynamicViscosity = REF.viscosity();
                Prandtl          = REF.Prandtl();
                SurfaceTension   = REF.surface_tension();
                InternalEnergy   = REF.umass();
                Conductivity     = REF.conductivity();
                Phase            = (Phases)REF.phase();
                FailState        = false;
            }
            catch (Exception e)
            {
                Log.Error($"SharpFluid -> UpdateValues -> {e}");
                throw new Exception("UpdateValues", e);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Not yet supported by CoolProp!
 /// </summary>        ///
 /// <param name = "enthalpy" > The Enthalpy used in the update</param>
 /// <param name = "temperature" > The <see cref="UnitsNet.Temperature"/> used in the update</param>
 public void UpdateHT(SpecificEnergy enthalpy, Temperature temperature)
 {
     //Not yet supported by CoolProp!
     Log.Debug($"SharpFluid -> UpdateHT -> Not yet supported by CoolProp!");
     throw new NotImplementedException($"SharpFluid -> UpdateHT -> Not (yet) supported by CoolProp!");
     REF.update(input_pairs.HmassT_INPUTS, enthalpy.JoulesPerKilogram, temperature.Kelvins);
 }
Esempio n. 4
0
 public void FDE_PrintStats()
 {
     Console.WriteLine();
     Console.WriteLine("INT:{0}   REF:{1}   TECH:{2}", INT.ToString(), REF.ToString(), TECH.ToString());
     Console.WriteLine("COOL:{0}  ATTR:{1}  LUCK:{2}", COOL.ToString(), ATTR.ToString(), LUCK.ToString());
     Console.WriteLine("MA:{0}    BODY:{1}  EMP:{2}", MA.ToString(), BODY.ToString(), EMP.ToString());
     Console.WriteLine();
 }
Esempio n. 5
0
        ///<Summary>
        ///<CreatedOn>03/01/2018</CreatedOn>
        ///<Author>Sunny Bhardwaj</Author>
        ///<Description>Get REF segment for All</Description>
        ///</Summary>
        ///
        public static REF GetREF(string REF01, string REF02)
        {
            REF REF = new REF();

            REF.REF01 = CreateString(REF01, (int)SegmentLength.Two, (int)SegmentLength.Three, ' ', true);
            REF.REF02 = CreateString(REF02, (int)SegmentLength.One, (int)SegmentLength.Fifty, ' ', true);
            return(REF);
        }
Esempio n. 6
0
        private void InsertAreaInfo(string hotelId, string hotelCode, IList <OTA_HotelDescriptiveInfoRS.HotelDescriptiveContentsLocalType.HotelDescriptiveContentLocalType.AreaInfoLocalType> areas)
        {
            if (Check(areas))
            {
                using (var context = new TravelDBContext())
                {
                    EfRepository <RefPoint> refPointContext = new EfRepository <RefPoint>(context);
                    EfRepository <REF>      refContext      = new EfRepository <REF>(context);

                    var refPoingCheck = (from p in refPointContext.Table where p.HotelID == hotelId select p).ToList();
                    if (refPoingCheck.Count > 0)
                    {
                        refPointContext.Delete(refPoingCheck);
                    }

                    var refPoints = areas[0].RefPoints;

                    foreach (var item in refPoints[0].RefPoint)
                    {
                        var Distance          = item.Distance;
                        int UnitOfMeasureCode = Convert.ToInt32(item.UnitOfMeasureCode);
                        var Name                 = item.Name;
                        var Latitude             = item.Latitude;
                        var Longitude            = item.Longitude;
                        int RefPointCategoryCode = Convert.ToInt32(item.RefPointCategoryCode);
                        var RefPointName         = item.RefPointName;
                        var DescriptiveText      = item.DescriptiveText;

                        var refCheck = (from f in refContext.Table where f.Id == RefPointCategoryCode select f).ToList();
                        if (refCheck.Count == 0)
                        {
                            REF r = new REF();
                            r.Id            = RefPointCategoryCode;
                            r.Name          = RefPointName;
                            r.LastModiyTime = DateTime.Now;
                            refContext.Insert(r);
                        }

                        RefPoint rp = new RefPoint();
                        rp.HotelID        = hotelId;
                        rp.Distance       = Convert.ToDecimal(Distance);
                        rp.Name           = Name;
                        rp.REFINT         = RefPointCategoryCode;
                        rp.UOMID          = UnitOfMeasureCode;
                        rp.LastMofifyTime = DateTime.Now;

                        refPointContext.Insert(rp);

                        LoggerHelper(hotelCode, "RefPoing Name: " + Name + " Inserted");
                        Console.WriteLine();
                    }
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.Pressure"/> and the Quality<br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> CO2 = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.CO2"/>);</c></br>
        /// <br><c>CO2.UpdatePX(<see cref="UnitsNet.Pressure"/>.FromBars(25), 0.7);</c></br>
        /// </summary>
        /// <param name = "pressure" > The <see cref="UnitsNet.Pressure"/> used in the update</param>
        /// <param name = "quality" > The Quality used in the update</param>
        public void UpdatePX(Pressure pressure, double quality)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }

            if (pressure < LimitPressureMin || quality < 0)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePX -> {pressure} cant be bolow {LimitPressureMin}", pressure, LimitPressureMin);
                return;
            }

            if (pressure > LimitPressureMax)
            {
                Log.Debug($"SharpFluid -> UpdatePX -> {pressure} is above 'LimitPressureMax' ({LimitPressureMax}) - This result is extrapolated hence precision is decreased");
            }

            try
            {
                if (pressure > CriticalPressure)
                {
                    UpdatePT(CriticalPressure, CriticalTemperature);
                    UpdatePH(pressure, Enthalpy);
                    Log.Debug($"SharpFluid -> UpdatePX -> {pressure} is above CriticalPressure ({CriticalPressure}) -> We will just return you the Critical point!");

                    if (FailState)
                    {
                        SetValuesToZero();
                    }
                }
                else
                {
                    REF.update(input_pairs.PQ_INPUTS, pressure.Pascals, quality);
                    UpdateValues();
                }
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePX -> CoolProp could not return your request on {pressure} and {quality} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdatePX -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {pressure} and {quality} {e}");
                throw;
            }
        }
        private List <REF> CabeceraREF(RFNCCAB model)
        {
            REF        mREF;
            List <REF> lmREF = new List <REF>();

            mREF = new REF()
            {
                REF_1 = "RF1",
                REF_2 = model.FPEDIDO
            };
            lmREF.Add(mREF);

            return(lmREF);
        }
Esempio n. 9
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.Pressure"/> and the <see cref="UnitsNet.Temperature"/><br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.Water"/>);</c></br>
        /// <br><c>Water.UpdatePT(<see cref="UnitsNet.Pressure"/>.FromBars(1.013), <see cref="UnitsNet.Temperature"/>.FromDegreesCelsius(13));</c></br>
        /// </summary>
        /// <param name = "pressure" > The <see cref="UnitsNet.Pressure"/> used in the update</param>
        /// <param name = "temperature" > The <see cref="UnitsNet.Temperature"/> used in the update</param>
        public void UpdatePT(Pressure pressure, Temperature temperature)
        {
            CheckBeforeUpdate();



            if (Media.BackendType == "CustomFluid")
            {
                UpdateCustomFluid(temperature, pressure);
                return;
            }



            if (pressure < LimitPressureMin || temperature < LimitTemperatureMin)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePT -> {pressure} cant be below {LimitPressureMin} and {temperature} cant be below {LimitTemperatureMin}");
                return;
            }

            if (temperature > LimitTemperatureMax)
            {
                Log.Debug($"SharpFluid -> UpdatePT -> {temperature} is above 'LimitTemperatureMax' ({LimitTemperatureMax}) - This result is extrapolated hence precision is decreased");
            }

            if (pressure > LimitPressureMax)
            {
                Log.Debug($"SharpFluid -> UpdatePT -> {pressure} is above 'LimitPressureMax' ({LimitPressureMax}) - This result is extrapolated hence precision is decreased");
            }



            try
            {
                REF.update(input_pairs.PT_INPUTS, pressure.Pascals, temperature.Kelvins);
                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePT -> CoolProp could not return your request on {pressure} and {temperature} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdatePT -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {pressure} and {temperature} {e}");
                throw;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the Quality and the <see cref="UnitsNet.Temperature"/><br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> CO2 = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.CO2"/>);</c></br>
        /// <br><c>CO2.UpdateXT(0.7, <see cref="UnitsNet.Temperature"/>.FromDegreesCelsius(13));</c></br>
        /// </summary>
        /// <param name = "quality" > The Quality used in the update</param>
        /// <param name = "temperature" > The <see cref="UnitsNet.Temperature"/> used in the update</param>
        public void UpdateXT(double quality, Temperature temperature)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }

            if (temperature < LimitTemperatureMin)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateXT -> {temperature} cant be below {LimitTemperatureMin}", temperature, LimitTemperatureMin);
                return;
            }


            if (temperature > LimitTemperatureMax)
            {
                Log.Debug($"SharpFluid -> UpdateXT -> {temperature} is above 'LimitTemperatureMax' ({LimitTemperatureMax}) - This result is extrapolated hence precision is decreased");
            }

            try
            {
                //If we are above transcritical we just return the Critical point
                if (temperature >= CriticalTemperature)
                {
                    Log.Debug($"SharpFluid -> UpdateXT -> {temperature} is above CriticalTemperature ({CriticalTemperature}) -> We will just return you the CriticalTemperature!");
                    REF.update(input_pairs.QT_INPUTS, quality, CriticalTemperature.Kelvins);
                }
                else
                {
                    REF.update(input_pairs.QT_INPUTS, quality, temperature.Kelvins);
                }

                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateXT -> CoolProp could not return your request on {quality} and {temperature} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdateXT -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {quality} and {temperature} {e}");
                throw;
            }
        }
Esempio n. 11
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.Density"/> and the <see cref="UnitsNet.Pressure"/><br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.Water"/>);</c></br>
        /// <br><c>Water.UpdateDP(<see cref="UnitsNet.Density"/>.FromKilogramsPerCubicMeter(999.38), <see cref="UnitsNet.Pressure"/>.FromBars(1.013));</c></br>
        /// </summary>
        /// <param name = "density" > The <see cref="UnitsNet.Density"/> used in the update</param>
        /// <param name = "pressure" > The <see cref="UnitsNet.Pressure"/> used in the update</param>
        public void UpdateDP(Density density, Pressure pressure)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }


            if (Media.InternalName.Contains(".mix"))
            {
                throw new NotImplementedException("For mixtures only UpdatePX, UpdateXT and UpdatePT works");
            }


            if (density <= Density.Zero || pressure <= Pressure.Zero)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateDP -> {density} cant be below {Density.Zero} and {pressure} cant be below {Pressure.Zero}");

                return;
            }

            if (pressure > LimitPressureMax)
            {
                Log.Debug($"SharpFluid -> UpdateDP -> {pressure} is above 'LimitPressureMax' ({LimitPressureMax}) - This result is extrapolated hence precision is decreased");
            }


            try
            {
                REF.update(input_pairs.DmassP_INPUTS, density.KilogramsPerCubicMeter, pressure.Pascals);
                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateDP -> CoolProp could not return your request on {density} and {pressure} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdateDP -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {density} and {pressure} {e}");
                throw;
            }
        }
        /// <summary>
        /// Converts the object to a string
        /// </summary>
        /// <returns>The object as a string</returns>
        public override string ToString()
        {
            StringBuilder Builder = new StringBuilder();

            Builder.Append("<category ");
            if (REF.IsNullOrEmpty())
            {
                Builder.AppendFormat("id=\"{0}\" date-created=\"{1}\" date-modified=\"{2}\" approved=\"true\" parentref=\"{3}\">\n", ID, DateCreated.ToString("yyyy-MM-ddThh:mm:ss"), DateModified.ToString("yyyy-MM-ddThh:mm:ss"), ParentREF);
                Builder.AppendFormat("<title type=\"text\"><![CDATA[{0}]]></title>\n", Title);
                Builder.AppendLine("</category>");
            }
            else
            {
                Builder.AppendFormat("ref=\"{0}\" />\n", REF);
            }
            return(Builder.ToString());
        }
Esempio n. 13
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.Pressure"/> and the <see cref="UnitsNet.SpecificEntropy"/><br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.Water"/>);</c></br>
        /// <br><c>Water.UpdatePS(<see cref="UnitsNet.Pressure"/>.FromBars(1.013), <see cref="UnitsNet.SpecificEntropy"/>.FromJoulesPerKilogramKelvin(195.27));</c></br>
        /// </summary>
        /// <param name = "pressure" > The <see cref="UnitsNet.Pressure"/> used in the update</param>
        /// <param name = "entropy" > The <see cref="UnitsNet.SpecificEntropy"/> used in the update</param>
        public void UpdatePS(Pressure pressure, SpecificEntropy entropy)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }


            if (Media.InternalName.Contains(".mix"))
            {
                throw new NotImplementedException("For mixtures only UpdatePX, UpdateXT and UpdatePT works");
            }


            if (pressure < LimitPressureMin)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePS -> {pressure} cant be below {LimitPressureMin} and {entropy} cant be below (limit unknown)");
                return;
            }

            if (pressure > LimitPressureMax)
            {
                Log.Debug($"SharpFluid -> UpdatePS -> {pressure} is above 'LimitPressureMax' ({LimitPressureMax}) - This result is extrapolated hence precision is decreased");
            }

            try
            {
                REF.update(input_pairs.PSmass_INPUTS, pressure.Pascals, entropy.JoulesPerKilogramKelvin);
                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdatePS -> CoolProp could not return your request on {pressure} and {entropy} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdatePS -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {pressure} and {entropy} {e}");
                throw;
            }
        }
Esempio n. 14
0
        /// <summary>
        /// Get Saturation Temperature from a given Pressure using the type of <see cref="Fluid"/>
        /// </summary>
        public Temperature GetSatTemperature(Pressure FromThisPressure)
        {
            if (FromThisPressure < LimitPressureMin)
            {
                Log.Debug($"SharpFluid -> GetSatTemperature -> {FromThisPressure} cant be bolow {LimitPressureMin}");
                return(Temperature.Zero);
            }


            if (FromThisPressure > CriticalPressure)
            {
                Log.Debug($"SharpFluid -> GetSatTemperature -> Pressure ({FromThisPressure}) is above CriticalPressure {CriticalPressure}. CriticalPressure is returned instead!");
                return(CriticalTemperature);
            }
            else
            {
                REF.update(input_pairs.PQ_INPUTS, FromThisPressure.Pascals, 1);
                return(REF.T());
            }
        }
Esempio n. 15
0
        /// <summary>
        /// Get Saturation Pressure from a given Temperature using the type of <see cref="Fluid"/>
        /// </summary>
        public Pressure GetSatPressure(Temperature FromThisTemperature)
        {
            if (FromThisTemperature < LimitTemperatureMin)
            {
                Log.Debug($"SharpFluid -> GetSatPressure -> {FromThisTemperature} cant be bolow {LimitTemperatureMin}");
                return(Pressure.Zero);
            }


            if (FromThisTemperature >= CriticalTemperature)
            {
                Log.Debug($"SharpFluid -> GetSatPressure -> Temperature ({FromThisTemperature}) is above CriticalTemperature {CriticalTemperature}. CriticalTemperature is returned instead!");
                return(CriticalPressure);
            }
            else
            {
                REF.update(input_pairs.QT_INPUTS, 1, FromThisTemperature.Kelvins);
                return(REF.p());
            }
        }
Esempio n. 16
0
        /// <summary>
        /// Update the condition of the <see cref="Fluid"/> when you know the <see cref="UnitsNet.Density"/> and the Enthalpy<br></br>
        /// <br>Exemple:</br>
        /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList.Water"/>);</c></br>
        /// <br><c>Water.UpdateDH(<see cref="UnitsNet.Density"/>.FromKilogramsPerCubicMeter(999.38), <see cref="UnitsNet.SpecificEnergy"/>.FromJoulesPerKilogram(54697.59));</c></br>
        /// </summary>
        /// <param name = "density" > The <see cref="UnitsNet.Density"/> used in the update</param>
        /// <param name = "enthalpy" > The Enthalpy used in the update</param>
        public void UpdateDH(Density density, SpecificEnergy enthalpy)
        {
            CheckBeforeUpdate();

            if (Media.BackendType == "CustomFluid")
            {
                throw new NotImplementedException("CustomFluid only works with UpdatePT()");
            }



            if (Media.InternalName.Contains(".mix"))
            {
                throw new NotImplementedException("For mixtures only UpdatePX, UpdateXT and UpdatePT works");
            }

            if (density <= Density.Zero)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateDH -> {density} cant be below {Density.Zero} and {enthalpy} cant be below (limit unknown)");
                return;
            }


            try
            {
                REF.update(input_pairs.DmassHmass_INPUTS, density.KilogramsPerCubicMeter, enthalpy.JoulesPerKilogram);
                UpdateValues();
            }
            catch (System.ApplicationException e)
            {
                FailState = true;
                Log.Debug($"SharpFluid -> UpdateDH -> CoolProp could not return your request on {density} and {enthalpy} and returns the followering error: {e}");
            }
            catch (System.Exception e)
            {
                FailState = true;
                Log.Error($"SharpFluid -> UpdateDH -> Report this on https://github.com/MadsKirkFoged/SharpFluids -  CoolProp returned unexpected result! {density} and {enthalpy} {e}");
                throw;
            }
        }
Esempio n. 17
0
        protected override ValidationResult IsValid(object value, ValidationContext validationContext)
        {
            REF refValue = (REF)value;

            if (refValue == null)
            {
                return(null);
            }
            string ErrorString = string.Empty;

            if (refValue.REF1 != "Y4")
            {
                ErrorString += "REF01 should be Y4 ";
            }
            ErrorString += ValidateElement.GetValidation(refValue.REF2, Element.Required, 1, 50, "REF02");
            if (ErrorString == string.Empty)
            {
                return(null);
            }
            return(new ValidationResult(ErrorString));
        }
Esempio n. 18
0
        /// <summary>
        /// Updates the constants of the <see cref="Fluid"/>
        /// <br><see cref="Fluid"/> constants are Limits and Criticalpoint values</br>
        /// </summary>
        protected virtual void UpdateFluidConstants()
        {
            FailState = true;


            if (Media.BackendType == "CustomFluid")
            {
                return;
            }


            try
            {
                //Setting the constant values up
                LimitTemperatureMax = REF.Tmax();
                LimitTemperatureMin = REF.Tmin();


                if (REF.backend_name() == "HelmholtzEOSBackend")
                {
                    CriticalTemperature = REF.T_critical();
                    CriticalPressure    = REF.p_critical();
                    LimitPressureMin    = REF.p_triple();
                    LimitPressureMax    = REF.pmax();

                    //Finding H_crit
                    REF.update(input_pairs.PQ_INPUTS, CriticalPressure.Pascals, 1);
                    CriticalEnthalpy = REF.hmass();
                }

                //Fraction
                FractionMin = REF.keyed_output(parameters.ifraction_min);
                FractionMax = REF.keyed_output(parameters.ifraction_max);
            }
            catch (Exception e)
            {
                Log.Error($"SharpFluid -> UpdateFluidConstants -> {e}");
            }
        }
Esempio n. 19
0
        private void tansiferToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //FrfParas frf = null;
            //FRFParaSetFrm frfParaSetFrm = new FRFParaSetFrm("84930f04-cd56-4cb7-a609-95ac668746fe", "f2d72bcb-88b2-4f93-af7a-0b10834848d9");
            //List<float> inlist = null;
            //List<float> outlist = null;
            //frfParaSetFrm.FormClosed += (s, ea) =>
            //{
            //    frf = frfParaSetFrm.frf;
            //    inlist = frfParaSetFrm.inlist;
            //    outlist = frfParaSetFrm.outlist;
            //};
            //if (frfParaSetFrm.ShowDialog() == DialogResult.OK)
            //{

            //    REF refrm = new REF(inlist, outlist, frf);
            //    refrm.Show(this.dockPanelContent);
            //}
            REF refrm = new REF();

            refrm.Show(this.dockPanelContent);
        }
Esempio n. 20
0
        /// <summary>
        /// Builds receiving advice.
        /// Original from https://ps.extra.chrysler.com/sites/itb-ebus/Documents/861GlobalCoreReturnSystemReceivingAdvice.pdf
        /// </summary>
        static TS861 BuildReceivingAdvice(string controlNumber)
        {
            var result = new TS861();

            //  Transaction Set Identifier Code = “861”
            //  (Receiving Advice / Acceptance Certificate)
            //  Transaction Set Control Number = 0002
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "861";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  Reference Identification = C000548241
            //  Date = 02 / 24 / 2009
            //  Transaction Set Purpose Code = “00” (Original)
            //  Receiving Advice or Acceptance Certificate
            //  = “3” (Disposition Advice)
            result.BRA = new BRA();
            result.BRA.ReferenceIdentification_01 = "C000548241";
            result.BRA.Date_02 = "20090224";
            result.BRA.TransactionSetPurposeCode_03 = "00";
            result.BRA.ReceivingAdviceorAcceptanceCertificateTypeCode_04 = "3";

            //  Repeating DTM
            result.DTM = new List <DTM>();

            //  Date/Time Qualifier = “050” (Received)
            //  Date = 01 / 02 / 2009
            //  Time = 8:55 AM
            //  Time Code = “ET” (Eastern Time)
            var dtm1 = new DTM();

            dtm1.DateTimeQualifier_01 = "050";
            dtm1.Date_02     = "20090102";
            dtm1.Time_03     = "0855";
            dtm1.TimeCode_04 = "ET";
            result.DTM.Add(dtm1);

            //  Repeating N1 Loops
            result.N1Loop = new List <Loop_N1_861>();

            //  Begin N1 Loop
            var n1Loop1 = new Loop_N1_861();

            //  Entity Identifier Code
            //  = “SU” (Supplier / Manufacturer)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer or Buyer's Agent)
            //  Identification Code = 43677
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01        = "SU";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop1.N1.IdentificationCode_04          = "43677";

            //  End N1 Loop
            result.N1Loop.Add(n1Loop1);

            //  Repeating RCD Loops
            result.RCDLoop = new List <Loop_RCD_861>();

            //  Begin RCD Loop
            var rcdLoop = new Loop_RCD_861();

            //  Quantity in Question = 1
            //  Unit or Basis for Measurement Code
            //  = “EA” (Each)
            //  Receiving Condition Code = 09
            rcdLoop.RCD = new RCD();
            rcdLoop.RCD.QuantityinQuestion_06     = "1";
            rcdLoop.RCD.CompositeUnitofMeasure_07 = new C001();
            rcdLoop.RCD.CompositeUnitofMeasure_07.UnitorBasisforMeasurementCode_01 = "EA";
            rcdLoop.RCD.ReceivingConditionCode_08 = "09";

            //  Repeating LIN
            rcdLoop.LIN = new List <LIN>();

            //  Product/Service ID Qualifier
            //  = “BP” (Buyer's Part Number)
            //  Product / Service ID = U0070062
            var lin1 = new LIN();

            lin1.ProductServiceIDQualifier_02 = "BP";
            lin1.ProductServiceID_03          = "U0070062";
            rcdLoop.LIN.Add(lin1);

            //  Repeating REF
            rcdLoop.REF = new List <REF>();

            //  Reference Identification Qualifier
            //  = “ACC” (Status)
            //  Reference Identification = A
            var ref1 = new REF();

            ref1.ReferenceIdentificationQualifier_01 = "ACC";
            ref1.ReferenceIdentification_02          = "A";
            rcdLoop.REF.Add(ref1);

            //  Repeating DTM
            rcdLoop.DTM = new List <DTM>();

            //  Date/Time Qualifier = “945” (Activity)
            //  Date = 01 / 02 / 2009
            //  Time = 8:55 AM
            //  Time Code = “ET” (Eastern Time)
            var dtm2 = new DTM();

            dtm2.DateTimeQualifier_01 = "945";
            dtm2.Date_02     = "20090102";
            dtm2.Time_03     = "0855";
            dtm2.TimeCode_04 = "ET";
            rcdLoop.DTM.Add(dtm2);

            //  End RCD Loop
            result.RCDLoop.Add(rcdLoop);

            return(result);
        }
Esempio n. 21
0
        static TS856 BuildShipNotice(string controlNumber)
        {
            var result = new TS856();

            //  856 is the Transaction Set Identifier Code for the Advance Ship Notice
            //  0001 is the Transaction Set Control Number
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "856";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  00 is the Transaction Set Purpose Code "00" indicates Original.
            //  01140824 is the Shipment Identification Number.
            //  20051015 is the Document Creation Date.
            //  1345 is the Time.
            //  0001 is the Hierarchical Structure. "0001" indicates "Pick and Pack Structure".
            result.BSN = new BSN();
            result.BSN.TransactionSetPurposeCode_01 = "00";
            result.BSN.ShipmentIdentification_02    = "10286631";
            result.BSN.Date_03 = "20200404";
            result.BSN.Time_04 = "1345";
            result.BSN.HierarchicalStructureCode_05 = "0001";

            //  Repeating HL Loops
            result.HLLoop = new List <Loop_HL_856>();

            //  Begin HL Loop 1
            var hlLoop1 = new Loop_HL_856();

            //  1 is Hierarchical ID Number.
            //  S is the Hierarchical Level Code. “S” indicates "Shipment".
            //  This HL is the first HL used, and has no parent to identify.
            hlLoop1.HL = new HL();
            hlLoop1.HL.HierarchicalIDNumber_01  = "1";
            hlLoop1.HL.HierarchicalLevelCode_03 = "S";

            //  Repeating TD1
            hlLoop1.TD1 = new List <TD1>();

            //  CTN25 is Packaging Code. “CTN” indicates “Carton”, and “25” indicates “Corrugated or Solid”.
            //  2 is the Lading Quantity.
            //  G is the Weight Qualifier. “G” indicates "Gross Weight".
            //  45582 is the Weight (Gross).
            //  LB is the Unit or Basis for Measurement Code. “LB” indicates “Pound”.
            //  1000 is the Volume (Gross).
            //  CF is the Unit or Basis for Measurement Code. “CF” indicates “Cubic Feet”.
            var td11 = new TD1();

            td11.PackagingCode_01   = "CTN25";
            td11.LadingQuantity_02  = "1";
            td11.WeightQualifier_06 = "G";
            td11.Weight_07          = "3";//??
            td11.UnitorBasisforMeasurementCode_08 = "LB";
            // td11.Volume_09 = "1000";
            // td11.UnitorBasisforMeasurementCode_10 = "CF";
            hlLoop1.TD1.Add(td11);

            //  Repeating TD5
            hlLoop1.TD5 = new List <TD5>();

            //  B is the Routing Sequence Code. “B” indicates "Origin/Delivery Carrier (Any Mode)".
            //  2 is the Identification Code Qualifier. “2” indicates “Standard Carrier Alpha Code(SCAC)”.
            //  JBHT is the Identification Code(SCAC).Indicates the carrier JB Hunt.
            //  M is the Transportation Method / Type Code. “M” indicates “Motor(Common Carrier)”.
            var td51 = new TD5();

            td51.RoutingSequenceCode_01          = "B";
            td51.IdentificationCodeQualifier_02  = "2";
            td51.IdentificationCode_03           = "FDEG";
            td51.TransportationMethodTypeCode_04 = "M";
            hlLoop1.TD5.Add(td51);

            //  Repeating TD3
            hlLoop1.TD3Loop = new List <Loop_TD3_856>();

            //  TL is the Equipment Description Code. “TL” indicates Trailer.
            //  ABCD is the Equipment Initial
            //  07213567 is the Equipment Number
            //  30394938483234 is the Seal Number.This is a unique number on seal used to close a shipment.

            /*  var td31 = new TD3();
             * td31.EquipmentDescriptionCode_01 = "TL";
             * td31.EquipmentInitial_02 = "ABCD";
             * td31.EquipmentNumber_03 = "07213567";
             * td31.SealNumber_09 = "30394938483234";
             * hlLoop1.TD3.Add(td31);*/

            //  Repeating REF
            hlLoop1.REF = new List <REF>();

            /*  //  BM is the Reference Identification Qualifier. “BM” indicates “Bill of Lading Number”.
             * //  01140824 is the Reference Identification
             * var ref1 = new REF();
             * ref1.ReferenceIdentificationQualifier_01 = "BM";
             * ref1.ReferenceIdentification_02 = "01140824";
             * hlLoop1.REF.Add(ref1);*/

            //  CN is the Reference Identification Qualifier “CN” indicates the Carrier PRO Tracking Number.
            //  082131 is the Reference Identification
            var ref2 = new REF();

            ref2.ReferenceIdentificationQualifier_01 = "CN";
            ref2.ReferenceIdentification_02          = "770156950710";
            hlLoop1.REF.Add(ref2);

            /* //  CR is the Reference Identification Qualifier “CR” indicates the Customer Reference Number(Wal - Mart Load Number).
             * //  01082131 is the Reference Identification
             * var ref3 = new REF();
             * ref3.ReferenceIdentificationQualifier_01 = "CR";
             * ref3.ReferenceIdentification_02 = "01082131";
             * hlLoop1.REF.Add(ref3);*/

            //  Repeating DTM
            hlLoop1.DTM = new List <DTM>();

            //  011 is the Date/Time Qualifier “011” indicates the “Date Shipped”
            //  20051015 is the Date (Shipped)
            var dtm1 = new DTM();

            dtm1.DateTimeQualifier_01 = "011";
            dtm1.Date_02 = "20200404";
            hlLoop1.DTM.Add(dtm1);

            //  Repeating N1 Loops
            hlLoop1.N1Loop = new List <Loop_N1_856>();

            //  Begin N1 Loop 1
            var n1Loop1 = new Loop_N1_856();

            //  ST is the Entity Identifier Code. “ST” indicates “Ship To”.
            //  WAL - MART DC 6094J - JIT is the Name (Ship To).
            //  UL is the Identification Code Qualifier. “UL” indicates
            //  “Global Location Number(GLN)”.
            //  0078742035260 is the Identification Code(GLN).
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01 = "ST";
            n1Loop1.N1.Name_02 = "WAL-MART SUPERCENTER 5260";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "UL";
            n1Loop1.N1.IdentificationCode_04          = "0078742050027";

            //  End N1 Loop 1
            hlLoop1.N1Loop.Add(n1Loop1);

            //  Begin N1 Loop 2
            var n1Loop2 = new Loop_N1_856();

            //  SF is the Entity Identifier Code (Ship From)
            //  SUPPLIER NAME is the Name.
            n1Loop2.N1 = new N1();
            n1Loop2.N1.EntityIdentifierCode_01 = "SF";
            n1Loop2.N1.Name_02 = "RECONGROUP";

            //  End N1 Loop 2
            hlLoop1.N1Loop.Add(n1Loop2);

            //  End HL Loop 1
            result.HLLoop.Add(hlLoop1);

            //  Begin HL Loop 2
            var hlLoop2 = new Loop_HL_856();

            //  2 is the Hierarchical ID Number.
            //  1 is the Hierarchical Parent ID Number. (Shipment)
            //  O is the Hierarchical Level Code. “O” indicates “Order”
            hlLoop2.HL = new HL();
            hlLoop2.HL.HierarchicalIDNumber_01       = "2";
            hlLoop2.HL.HierarchicalParentIDNumber_02 = "1";
            hlLoop2.HL.HierarchicalLevelCode_03      = "O";

            //  9988776655 the Purchase Order Number.
            //  20051015 is the Date (Purchase Order Date).
            hlLoop2.PRF = new PRF();
            hlLoop2.PRF.PurchaseOrderNumber_01 = "3066040668";
            hlLoop2.PRF.Date_04 = "20200310";

            //  Repeating REF
            hlLoop2.REF = new List <REF>();

            //  IA is the Reference Identification Qualifier. “IA” indicates
            //  “Internal Vendor Number”.
            //  211555050 is the Reference Identification
            var ref4 = new REF();

            ref4.ReferenceIdentificationQualifier_01 = "IA";
            ref4.ReferenceIdentification_02          = "009167870";
            hlLoop2.REF.Add(ref4);

            //  DP is the Reference Identification Qualifier. “DP” indicates
            //  “Department Number”.
            //  00005 is the Reference Identification(Wal - Mart Department
            //  Number).
            var ref5 = new REF();

            ref5.ReferenceIdentificationQualifier_01 = "DP";
            ref5.ReferenceIdentification_02          = "00087";
            hlLoop2.REF.Add(ref5);

            //  MR is the Reference Identification Qualifier. “MR” indicates
            //  “Merchandise Type Code”.
            //  0073 is the Reference Identification
            var ref6 = new REF();

            ref6.ReferenceIdentificationQualifier_01 = "MR";
            ref6.ReferenceIdentification_02          = "0007";
            hlLoop2.REF.Add(ref6);

            /*  //  IV is the Reference Identification Qualifier. “IV” indicates
             * //  “Seller’s Invoice Number”.
             * //  01140824 is the Reference Identification
             * var ref7 = new REF();
             * ref7.ReferenceIdentificationQualifier_01 = "IV";
             * ref7.ReferenceIdentification_02 = "01140824";
             * hlLoop2.REF.Add(ref7);*/

            //  Repeating N1 Loops
            hlLoop2.N1Loop = new List <Loop_N1_856>();

            //  Begin N1 Loop 1
            var n1Loop3 = new Loop_N1_856();

            //  BY is the Entity Identifier Code. “BY” indicates “Buying
            //  Party(Purchaser)”.
            //  WAL - MART STORES, INC. is the Name.
            //  UL is the Identification Code Qualifier. “UL” indicates
            //  “Global Location Number(GLN)”.
            //  0078742000992 is the Identification Code(GLN).
            n1Loop3.N1 = new N1();
            n1Loop3.N1.EntityIdentifierCode_01 = "BY";
            n1Loop3.N1.Name_02 = "WAL-MART SUPERCENTER 5260";
            n1Loop3.N1.IdentificationCodeQualifier_03 = "UL";
            n1Loop3.N1.IdentificationCode_04          = "0078742050027";

            //  End N1 Loop 1
            hlLoop2.N1Loop.Add(n1Loop3);

            //  End HL Loop 2
            result.HLLoop.Add(hlLoop2);

            //  Begin HL Loop 3
            var hlLoop3 = new Loop_HL_856();

            //  3 is the Hierarchical ID Number.
            //  2 is the Hierarchical Parent ID Number. (Order)
            //  P is the Hierarchical Level Code. “P” indicates “Pack”.
            hlLoop3.HL = new HL();
            hlLoop3.HL.HierarchicalIDNumber_01       = "3";
            hlLoop3.HL.HierarchicalParentIDNumber_02 = "2";
            hlLoop3.HL.HierarchicalLevelCode_03      = "P";

            //  Repeating MAN
            hlLoop3.MAN = new List <MAN>();

            //  GM is the Marks and Numbers Qualifier. “GM” indicates
            //  “EAN.UCC Serial Shipping Container Code(SSCC) and
            //  Application Identifier.”
            //  00000010012345614785 is the Marks and Numbers(SCC-18).
            var man1 = new MAN();

            man1.MarksandNumbersQualifier_01 = "GM";
            man1.MarksandNumbers_02          = "00000091670124582779";//ASN !!
            hlLoop3.MAN.Add(man1);

            //  End HL Loop 3
            result.HLLoop.Add(hlLoop3);

            //  Begin HL Loop 4
            var hlLoop4 = new Loop_HL_856();

            //  4 is the Hierarchical ID Number.
            //  3 is the Hierarchical Parent ID Number. (Pack)
            //  I is the Hierarchical Level Code. “I” indicates “Item”
            hlLoop4.HL = new HL();
            hlLoop4.HL.HierarchicalIDNumber_01       = "4";
            hlLoop4.HL.HierarchicalParentIDNumber_02 = "3";
            hlLoop4.HL.HierarchicalLevelCode_03      = "I";

            //  UP is the Product/Service ID Qualifier. “UP” indicates “UCC12"
            //  008815509183 is the Product / Service ID
            hlLoop4.LIN = new LIN();
            hlLoop4.LIN.ProductServiceIDQualifier_02 = "UP";
            hlLoop4.LIN.ProductServiceID_03          = "190403545724";

            //  4 is the Number of Units Shipped.
            //  EA is the Unit or Basis for Measurement Code. “EA” indicates
            //  “Each”.

            hlLoop4.SN1 = new SN1();
            hlLoop4.SN1.NumberofUnitsShipped_02          = "1";
            hlLoop4.SN1.UnitorBasisforMeasurementCode_03 = "EA";

            //  End HL Loop 4
            result.HLLoop.Add(hlLoop4);

            //  Begin HL Loop 5
            var hlLoop5 = new Loop_HL_856();

            //  5 is the Hierarchical ID Number.
            //  3 is the Hierarchical Parent ID Number. (Pack)
            //  I is the Hierarchical Level Code. “I” indicates “Item”.
            hlLoop5.HL = new HL();
            hlLoop5.HL.HierarchicalIDNumber_01       = "5";
            hlLoop5.HL.HierarchicalParentIDNumber_02 = "3";
            hlLoop5.HL.HierarchicalLevelCode_03      = "I";

            //  UP is the Product/Service ID Qualifier. “UP” indicates “UCC
            //  -12”.
            //  008815547321 is the Product / Service ID.
            hlLoop5.LIN = new LIN();
            hlLoop5.LIN.ProductServiceIDQualifier_02 = "UP";
            hlLoop5.LIN.ProductServiceID_03          = "190403893498";

            //  9 is the Number of Units Shipped.
            //  EA is the Unit or Basis for Measurement Code. “EA”
            //  indicates “Each”.

            hlLoop5.SN1 = new SN1();
            hlLoop5.SN1.NumberofUnitsShipped_02          = "1";
            hlLoop5.SN1.UnitorBasisforMeasurementCode_03 = "EA";

            //  End HL Loop 5
            result.HLLoop.Add(hlLoop5);



            //  5 is the Number of Line Items (number of HL segments in the
            //  document).
            result.CTT = new CTT();
            result.CTT.NumberofLineItems_01 = "5";

            return(result);
        }
Esempio n. 22
0
 // This method is never called. It exists only to prevent a warning when a
 // Schema does not contain a ChoiceREF element.
 public void Reach()
 {
     Label = null;
 }
Esempio n. 23
0
        /// <summary>
        /// Builds Application Advice.
        /// Original from https://ps.nafta.extra.fcagroup.com/sites/itb-ebus/Shared%20Documents/824FreightConsolidatorApplicationAdvice.pdf
        /// </summary>
        static TS824 BuildApplicationAdvice(string controlNumber)
        {
            var result = new TS824();

            //  Transaction Set Identifier Code
            //  = “824” (Application Acknowlegment Advice)
            //  Transaction Set Control Number = 0002
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "824";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  Transaction Set Purpose Code
            //  = “11” (Response)
            //  Reference Number = 3
            //  Date = 09 / 02 / 2012
            //  Time = 4:21 PM
            result.BGN = new BGN();
            result.BGN.TransactionSetPurposeCode_01 = "11";
            result.BGN.ReferenceIdentification_02   = "3";
            result.BGN.Date_03 = "120902";
            result.BGN.Time_04 = "1621";

            //  Repeating N1 Loops
            result.N1Loop = new List <Loop_N1_824>();

            //  Begin N1 Loop 1
            var n1Loop1 = new Loop_N1_824();

            //  Entity Identifier Code
            //  = “SU” (Supplier / Manufacturer)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer)
            //  Identification Code = 42332AB
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01        = "SU";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop1.N1.IdentificationCode_04          = "42332AB";

            //  End N1 Loop 1
            result.N1Loop.Add(n1Loop1);

            //  Begin N1 Loop 2
            var n1Loop2 = new Loop_N1_824();

            //  Entity Identifier Code = “SF” (Ship From)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer)
            //  Identification Code = 42332AF
            n1Loop2.N1 = new N1();
            n1Loop2.N1.EntityIdentifierCode_01        = "SF";
            n1Loop2.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop2.N1.IdentificationCode_04          = "42332A";

            //  End N1 Loop 2
            result.N1Loop.Add(n1Loop2);

            //  Begin N1 Loop 3
            var n1Loop3 = new Loop_N1_824();

            //  Entity Identifier Code = “ST” (Ship To)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer)
            //  Identification Code = 04025
            n1Loop3.N1 = new N1();
            n1Loop3.N1.EntityIdentifierCode_01        = "ST";
            n1Loop3.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop3.N1.IdentificationCode_04          = "04025";

            //  End N1 Loop 3
            result.N1Loop.Add(n1Loop3);

            //  Begin N1 Loop 4
            var n1Loop4 = new Loop_N1_824();

            //  Entity Identifier Code = “MA”
            //  (Party for whom Item is Ultimately Intended)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer)
            //  Identification Code = 04025
            n1Loop4.N1 = new N1();
            n1Loop4.N1.EntityIdentifierCode_01        = "MA";
            n1Loop4.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop4.N1.IdentificationCode_04          = "04025";

            //  End N1 Loop 4
            result.N1Loop.Add(n1Loop4);

            //  Begin N1 Loop 5
            var n1Loop5 = new Loop_N1_824();

            //  Entity Identifier Code = “CS” (Consolidator)
            //  Identification Code Qualifier
            //  = “92” (Assigned by Buyer)
            //  Identification Code = 01123
            n1Loop5.N1 = new N1();
            n1Loop5.N1.EntityIdentifierCode_01        = "CS";
            n1Loop5.N1.IdentificationCodeQualifier_03 = "92";
            n1Loop5.N1.IdentificationCode_04          = "01123";

            //  End N1 Loop 5
            result.N1Loop.Add(n1Loop5);

            //  Repeating OTI Loops
            result.OTILoop = new List <Loop_OTI_824>();

            //  Begin OTI Loop
            var otiLoop1 = new Loop_OTI_824();

            //  Application Acknowledgment Code
            //  = “IR” (Line item rejected)
            //  Reference Number Qualifier = “SI” (Shipper's
            //  Identifying Number for Shipment<SID>)
            //  Reference Number = 62001
            //  Transaction Set Identifier Code
            //  = “856” (X12.10 Ship Notice/ Manifest)
            otiLoop1.OTI = new OTI();
            otiLoop1.OTI.ApplicationAcknowledgmentCode_01    = "IR";
            otiLoop1.OTI.ReferenceIdentificationQualifier_02 = "SI";
            otiLoop1.OTI.ReferenceIdentification_03          = "62001";
            otiLoop1.OTI.TransactionSetIdentifierCode_10     = "856";

            //  Repeating REF
            otiLoop1.REF = new List <REF>();

            //  Reference Number Qualifier
            //  = “BM” (Bill of Lading Number)
            //  Reference Number = 62001
            var ref1 = new REF();

            ref1.ReferenceIdentificationQualifier_01 = "BM";
            ref1.ReferenceIdentification_02          = "62001";
            otiLoop1.REF.Add(ref1);

            //  Reference Number Qualifier
            //  = “PK” (Packing List Number)
            //  Reference Number = 87115
            var ref2 = new REF();

            ref2.ReferenceIdentificationQualifier_01 = "PK";
            ref2.ReferenceIdentification_02          = "87115";
            otiLoop1.REF.Add(ref2);

            //  Reference Number Qualifier = “CN”
            //  (Carrier's Reference Number <PRO/Invoice>)
            //  Reference Number = 506013
            var ref3 = new REF();

            ref3.ReferenceIdentificationQualifier_01 = "CN";
            ref3.ReferenceIdentification_02          = "506013";
            otiLoop1.REF.Add(ref3);

            //  Reference Number Qualifier
            //  = “TB” (Trucker's Bill of Lading)
            //  Reference Number = 01178
            var ref4 = new REF();

            ref4.ReferenceIdentificationQualifier_01 = "TB";
            ref4.ReferenceIdentification_02          = "01178";
            otiLoop1.REF.Add(ref4);

            //  Reference Number Qualifier
            //  = “PM” (Part Number)
            //  Reference Number = 05440113AA
            var ref5 = new REF();

            ref5.ReferenceIdentificationQualifier_01 = "PM";
            ref5.ReferenceIdentification_02          = "05440113AA";
            otiLoop1.REF.Add(ref5);

            //  Repeating DTM
            otiLoop1.DTM = new List <DTM>();

            //  Date/Time Qualifier = “009” (Process)
            //  Date = 09 / 01 / 2012
            //  Time = 4:21 PM
            //  Time Code = “ET” (Eastern Time)
            var dtm1 = new DTM();

            dtm1.DateTimeQualifier_01 = "009";
            dtm1.Date_02     = "120901";
            dtm1.Time_03     = "1621";
            dtm1.TimeCode_04 = "ET";
            otiLoop1.DTM.Add(dtm1);

            //  Date/Time Qualifier = “011” (Shipped)
            //  Date = 09 / 01 / 2012
            var dtm2 = new DTM();

            dtm2.DateTimeQualifier_01 = "011";
            dtm2.Date_02 = "120901";
            otiLoop1.DTM.Add(dtm2);

            //  Repeating TED Loops
            otiLoop1.TEDLoop = new List <Loop_TED_824>();

            //  Begin TED Loop
            var tedLoop1 = new Loop_TED_824();

            //  Application Error Condition = 201
            //  Free Form Message
            //  = ASN - PART / PLANT / SUPLR
            //  Copy of Bad Data Element
            //  = 05440113AA0622137052
            tedLoop1.TED = new TED();
            tedLoop1.TED.ApplicationErrorConditionCode_01 = "201";
            tedLoop1.TED.FreeFormMessage_02      = "ASN-PART/PLANT/SUPLR";
            tedLoop1.TED.CopyofBadDataElement_07 = "05440113AA0622137052";

            //  Repeating NTE
            tedLoop1.NTE = new List <NTE>();

            //  Note Reference Code = “LIN” (Line Item)
            //  Free Form Message = INVALID PART / PLANT
            //  SUPPLIER COMBINATIO
            var nte1 = new NTE();

            nte1.NoteReferenceCode_01 = "LIN";
            nte1.Description_02       = "INVALID PART/PLANT SUPPLIER COMBINATIO";
            tedLoop1.NTE.Add(nte1);

            //  End TED Loop
            otiLoop1.TEDLoop.Add(tedLoop1);

            //  End OTI Loop
            result.OTILoop.Add(otiLoop1);

            return(result);
        }
Esempio n. 24
0
        /// <summary>
        /// Sample invoice
        /// </summary>
        static TS810 CreateInvoice(string controlNumber)
        {
            var result = new TS810();

            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "810";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            result.BIG                        = new BIG();
            result.BIG.Date_01                = DateTime.Now.ToString("yyyyMMdd");
            result.BIG.InvoiceNumber_02       = "123456789";
            result.BIG.Date_03                = "20030627";
            result.BIG.PurchaseOrderNumber_04 = "201177";

            result.REF = new List <REF>();

            var ref1 = new REF();

            ref1.ReferenceIdentificationQualifier_01 = "DP";
            ref1.ReferenceIdentification_02          = "123";
            result.REF.Add(ref1);

            var ref2 = new REF();

            ref2.ReferenceIdentificationQualifier_01 = "IA";
            ref2.ReferenceIdentification_02          = "456";
            result.REF.Add(ref2);

            result.N1Loop1 = new List <TS810_N1Loop1>();
            var n1Loop = new TS810_N1Loop1();

            n1Loop.N1 = new N1();
            n1Loop.N1.EntityIdentifierCode_01        = "ST";
            n1Loop.N1.IdentificationCodeQualifier_03 = "18";
            n1Loop.N1.IdentificationCode_04          = "123";

            result.N1Loop1.Add(n1Loop);

            result.ITD = new List <ITD>();
            var itd = new ITD();

            itd.TermsTypeCode_01        = "01";
            itd.TermsBasisDateCode_02   = "3";
            itd.TermsDiscountDaysDue_05 = "0";
            itd.TermsNetDays_07         = "45";

            result.IT1Loop1 = new List <TS810_IT1Loop1>();
            var it1Loop = new TS810_IT1Loop1();

            it1Loop.IT1 = new IT1();
            it1Loop.IT1.AssignedIdentification_01        = "1";
            it1Loop.IT1.QuantityInvoiced_02              = "2";
            it1Loop.IT1.UnitorBasisforMeasurementCode_03 = "EA";
            it1Loop.IT1.UnitPrice_04 = "120.6";
            it1Loop.IT1.ProductServiceIDQualifier_06 = "UP";
            it1Loop.IT1.ProductServiceID_07          = "123456789";

            result.IT1Loop1.Add(it1Loop);

            result.TDS           = new TDS();
            result.TDS.Amount_01 = "24012";

            result.CAD            = new CAD();
            result.CAD.Routing_05 = "1234";
            result.CAD.ReferenceIdentificationQualifier_07 = "BM";
            result.CAD.ReferenceIdentification_08          = "9999";

            result.CTT = new CTT();
            result.CTT.NumberofLineItems_01 = "1";

            return(result);
        }
Esempio n. 25
0
        /// <summary>
        /// Sample claim
        /// </summary>
        static TS834 CreateBenefit(string controlNumber)
        {
            string CurrentDate = DateTime.Now.ToString("yyyyMMdd");
            var    result      = new TS834();

            //Heading
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01       = "834";
            result.ST.TransactionSetControlNumber_02        = controlNumber.PadLeft(9, '0');
            result.ST.ImplementationConventionPreference_03 = "005010X222A1";
            result.BGN = new BGN();
            result.BGN.TransactionSetPurposeCode_01     = "00";
            result.BGN.TransactionSetReferenceNumber_02 = "WSU-WEY-20050221-1";
            result.BGN.TransactionSetCreationDate_03    = CurrentDate;
            result.BGN.TransactionSetCreationTime_04    = DateTime.Now.ToString("hhmmss");
            result.BGN.TimeZoneCode_05 = "PT"; //Optional but most Carriers use
            //result.BGN.ReferenceIdentification_06 = ""; //Not usually sent
            result.BGN.ActionCode_07 = "4";    //2 = Change, 4 = Verify, RX = replace
            //Optional REF
            result.REF_TransactionSetPolicyNumber = new REF();
            result.REF_TransactionSetPolicyNumber.ReferenceIdentificationQualifier_01 = "38";
            result.REF_TransactionSetPolicyNumber.ReferenceIdentification_02          = "01-23456";//Carrier/Vendor specific

            //Optional DTP
            result.DTP_FileEffectiveDate.DateTimeQualifier_01             = "007";
            result.DTP_FileEffectiveDate.DateTimePeriodFormatQualifier_02 = "D8";
            result.DTP_FileEffectiveDate.DateTimePeriod_03 = CurrentDate;

            //Optional QTY
            result.QTY_TransactionSetControlTotals = new QTY();
            result.QTY_TransactionSetControlTotals.QuantityQualifier_01 = "TO";
            result.QTY_TransactionSetControlTotals.Quantity_02          = "1";//Only one record for this example.

            //Loop 1000
            result.All_NM1 = new All_NM1();

            //Loop 1000A
            result.All_NM1.Loop_1000A = new Loop_1000A();
            result.All_NM1.Loop_1000A.NM1_SponsorName.EntityIdentifierCode_01 = "P5";
            result.All_NM1.Loop_1000A.NM1_SponsorName.Name_02 = "Sponsor Name";
            result.All_NM1.Loop_1000A.NM1_SponsorName.IdentificationCodeQualifier_03 = "FI";
            result.All_NM1.Loop_1000A.NM1_SponsorName.IdentificationCode_04          = "1223456";

            //Loop 1000B
            result.All_NM1.Loop_1000B = new Loop_1000B();
            result.All_NM1.Loop_1000B.NM1_PayerName.EntityIdentifierCode_01 = "IN";
            result.All_NM1.Loop_1000B.NM1_PayerName.Name_02 = "ABC PAYER";
            result.All_NM1.Loop_1000B.NM1_PayerName.IdentificationCodeQualifier_03 = "FI";
            result.All_NM1.Loop_1000B.NM1_PayerName.IdentificationCode_04          = "11-111111";

            //result.All_NM1.Loop_1000C = new Loop_1000C();
            //Usually brokers are optional fields

            //Loop 2000
            //INS
            result.Loop_2000 = new List <Loop_2000>();
            Loop_2000 Loop_2000 = new Loop_2000();

            Loop_2000.INS = new INS();
            Loop_2000.INS.YesNoConditionorResponseCode_01 = "Y";//Subscriber/Member record
            Loop_2000.INS.IndividualRelationshipCode_02   = "18";
            Loop_2000.INS.MaintenanceTypeCode_03          = "021";
            Loop_2000.INS.MaintenanceReasonCode_04        = "20";
            Loop_2000.INS.BenefitStatusCode_05            = "A";
            Loop_2000.INS.MedicarePlanCode_06             = "E";
            //Loop_2000.INS.ConsolidatedOmnibusBudgetReconciliationActCOBRAQualifyingEventCode_07 = "0";
            Loop_2000.INS.EmploymentStatusCode_08 = "AC";
            //Loop_2000.INS.StudentStatusCode_09 = "N";
            Loop_2000.INS.YesNoConditionorResponseCode_10 = "N";
            //Loop_2000.INS.DateTimePeriodFormatQualifier_11 = "";//Dealth Date: Carrier specific
            //Loop_2000.INS.DateTimePeriod_12 = "";
            Loop_2000.INS.ConfidentialityCode_13 = "";//Usually left blank.
            //Loop_2000.INS.CityName_14 = "City"; //14-17 usually not sent in favor of N3/N4 segments

            Loop_2000.Ref_SubscriberIdentifier = new REF();
            Loop_2000.Ref_SubscriberIdentifier.ReferenceIdentificationQualifier_01 = "0F";
            Loop_2000.Ref_SubscriberIdentifier.ReferenceIdentification_02          = "12345678";//typically a UUID or SSN

            Loop_2000.Ref_MemberSupplementalIdentifier = new REF();
            Loop_2000.Ref_MemberSupplementalIdentifier.ReferenceIdentificationQualifier_01 = "1L";
            Loop_2000.Ref_MemberSupplementalIdentifier.ReferenceIdentification_02          = "ABC123";//Group or Policy Number usually Carrier specific

            DTP DTP_MemberHireSegment = new DTP();

            DTP_MemberHireSegment.DateTimeQualifier_01             = "336";
            DTP_MemberHireSegment.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_MemberHireSegment.DateTimePeriod_03 = "20170501";

            DTP DTP_MemberEffectiveSegment = new DTP();

            DTP_MemberEffectiveSegment.DateTimeQualifier_01             = "356";
            DTP_MemberEffectiveSegment.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_MemberEffectiveSegment.DateTimePeriod_03 = "20170601";

            //Example term of coverage
            //DTP DTP_MemberEligibilityEndSegment = new DTP();
            //DTP_MemberEligibilityEndSegment.DateTimeQualifier_01 = "357";
            //DTP_MemberEligibilityEndSegment.DateTimePeriodFormatQualifier_02 = "D8";
            //DTP_MemberEligibilityEndSegment.DateTimePeriod_03 = "20171231";

            Loop_2000.DTP_MemberLevelDates.Add(DTP_MemberHireSegment);
            Loop_2000.DTP_MemberLevelDates.Add(DTP_MemberEffectiveSegment);
            result.Loop_2000.Add(Loop_2000);

            result.Loop_2100A = new List <Loop_2100A>();
            Loop_2100A Loop_2100A = new Loop_2100A();

            Loop_2100A.NM1_MemberName = new NM1();
            Loop_2100A.NM1_MemberName.EntityIdentifierCode_01 = "IL";
            Loop_2100A.NM1_MemberName.Name_02 = "1";
            Loop_2100A.NM1_MemberName.IdentificationCodeQualifier_03 = "MemberLastName";
            Loop_2100A.NM1_MemberName.IdentificationCode_04          = "MemberFirstname";
            //Optional Loop 2100A Segment NM1 05-09

            Loop_2100A.Per_MemberCommunicationNumbers = new PER();
            Loop_2100A.Per_MemberCommunicationNumbers.ContactFunctionCode_01 = "IP";
            //Loop_2100A.Per_MemberCommunicationNumbers.Name_02 = "abc123";
            Loop_2100A.Per_MemberCommunicationNumbers.CommunicationNumberQualifier_03 = "CP";
            Loop_2100A.Per_MemberCommunicationNumbers.CommunicationNumber_04          = "9991111111";
            //Optional Loop 2100A Segment Per

            Loop_2100A.N3_MemberResidenceStreetAddress = new N3_MemberResidenceStreetAddress();
            Loop_2100A.N3_MemberResidenceStreetAddress.Address_Information_01 = "444 Fake street";
            Loop_2100A.N3_MemberResidenceStreetAddress.Address_Information_02 = "Apt 300";

            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode = new N4_OtherSubscriberCity_State_ZIPCode();
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberCityName_01            = "TestCity";
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberStateorProvinceCode_02 = "CA";
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberPostalZoneorZIPCode_03 = "93710";
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.CountryCode_04 = "US";//Optional. Only outside the US.
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.LocationQualifier_05 = "";//Optional. 60 = Area and CY = Country/Parish
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.LocationIdentifier_06 = "";//Optional. Carrier/Plan specific.
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.CountrySubdivisionCode_07 = "";//Optional. Use country subdivision codes ISO 3166.

            Loop_2100A.DMG_MemberDemographicInformation = new DMG_MemberDemographicInformation();
            Loop_2100A.DMG_MemberDemographicInformation.DateTimePeriodFormatQualifier_01 = "D8";
            Loop_2100A.DMG_MemberDemographicInformation.SubscriberBirthDate_02           = "19330706";
            Loop_2100A.DMG_MemberDemographicInformation.SubscriberGenderCode_03          = "M";
            //Optional Loop 2100A Segment DMG 04-11

            //Optional sgment unless Carrier/Client specifically ask for it.
            Loop_2100A.EC_EmploymentClass = new EC_EmploymentClass();
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_01 = "01";
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_02 = "03";
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_03 = "11";

            //Optional Member Income segment
            //Used for Carriers/Employeers that need specific member income amounts as part of billable plans.
            Loop_2100A.ICM_MemberIncome.FrequencyCode_01      = "1";//Typically weekly or monthly
            Loop_2100A.ICM_MemberIncome.MonetaryAmount_02     = "2000";
            Loop_2100A.ICM_MemberIncome.Quantity_03           = "40";
            Loop_2100A.ICM_MemberIncome.LocationIdentifier_04 = "93710"; //Most will default to a an internal location code or Zip
            Loop_2100A.ICM_MemberIncome.SalaryGrade_05        = "A";     //Abitrary Code set by the employeer

            //TODO: Optional Segments
            //AMT Member Policy Amounts
            //HLH Member Health Information
            //LUI Member Language
            //NM1 Member mailing Address
            //N3 Member Mail Street Address
            //N4 Member Mail city, State, Zip
            result.Loop_2100A.Add(Loop_2100A);

            //Loop 2200:
            //DSB Disability Info
            //DTP Disability Eligibility Dates

            //Loop 2300 (Required on most Carriers)
            result.Loop_2300 = new List <Loop_2300>();
            Loop_2300 Loop_2300 = new Loop_2300();

            Loop_2300.HD_HealthCoverage = new HD();
            Loop_2300.HD_HealthCoverage.MaintenanceTypeCode_01 = "026";
            //Loop_2300.HD_HealthCoverage.MaintenanceReasonCode_02 = "1";//usually Carrier specific
            Loop_2300.HD_HealthCoverage.InsuranceLineCode_03       = "PPO";
            Loop_2300.HD_HealthCoverage.PlanCoverageDescription_04 = "Test PPO Plan"; //Optional. Some carriers make this a required field with specific reporting values.
            Loop_2300.HD_HealthCoverage.CoverageLevelCode_05       = "EMP";           //Employee only is usually EMP or IND Carrier specific
            //06-07 almost never used
            Loop_2300.HD_HealthCoverage.UnderwritingDecisionCode_08     = "Y";        //Y/N value but can be removed if nessessary
            Loop_2300.HD_HealthCoverage.YesNoConditionorResponseCode_09 = "N";        //Sometimes used as a Late Enrollment Indicator

            DTP DTP_MaintenanceEffective = new DTP();

            DTP_MaintenanceEffective.DateTimeQualifier_01             = "303";
            DTP_MaintenanceEffective.DateTimePeriodFormatQualifier_02 = "D3";
            DTP_MaintenanceEffective.DateTimePeriod_03 = "20151001";
            Loop_2300.DTP_HealthCoverageDates.Add(DTP_MaintenanceEffective);

            DTP DTP_BenefitBegin = new DTP();

            DTP_BenefitBegin.DateTimeQualifier_01             = "348";
            DTP_BenefitBegin.DateTimePeriodFormatQualifier_02 = "348";
            DTP_BenefitBegin.DateTimePeriod_03 = "20150901";
            Loop_2300.DTP_HealthCoverageDates.Add(DTP_BenefitBegin);

            REF REF_ClientReportingCategory = new REF();

            REF_ClientReportingCategory.ReferenceIdentificationQualifier_01 = "17";
            REF_ClientReportingCategory.ReferenceIdentification_02          = "12345";
            Loop_2300.REF_HealthCoveragePolicyNumbers.Add(REF_ClientReportingCategory);

            REF REF_GroupPolicyNumber = new REF();

            REF_GroupPolicyNumber.ReferenceIdentificationQualifier_01 = "1L";
            REF_GroupPolicyNumber.ReferenceIdentification_02          = "54321";
            Loop_2300.REF_HealthCoveragePolicyNumbers.Add(REF_GroupPolicyNumber);

            result.Loop_2300.Add(Loop_2300);

            result.Loop_2310 = new List <Loop_2310>();
            Loop_2310 Loop_2310 = new Loop_2310();

            Loop_2310.LX_ProviderInformation = new LX();
            Loop_2310.LX_ProviderInformation.AssignedNumber_01 = "1";

            Loop_2310.NM1_ReferingProviderName = new NM1_ReferringProviderName();
            Loop_2310.NM1_ReferingProviderName.EntityIdentifierCode_01                 = "OD";
            Loop_2310.NM1_ReferingProviderName.EntityTypeQualifier_02                  = "1";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderLastName_03            = "ABC Hospital";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderFirstName_04           = "Care";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderMiddleNameorInitial_05 = "A";
            Loop_2310.NM1_ReferingProviderName.NamePrefix_06 = "Sr";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderNameSuffix_07 = "";
            Loop_2310.NM1_ReferingProviderName.IdentificationCodeQualifier_08 = "SV";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderIdentifier_09 = "Doc PPO";
            Loop_2310.NM1_ReferingProviderName.EntityRelationshipCode_10      = "25";

            result.Loop_2310.Add(Loop_2310);

            result.Loop_2320 = new List <Loop_2320>();
            Loop_2320 Loop_2320 = new Loop_2320();

            Loop_2320.COB_CoordinationOfBenefits.PayerResponsibilitySequenceNumberCode_01 = "P";
            Loop_2320.COB_CoordinationOfBenefits.ReferenceIdentification_02    = "A";
            Loop_2320.COB_CoordinationOfBenefits.CoordinationofBenefitsCode_03 = "1";
            Loop_2320.COB_CoordinationOfBenefits.ServiceTypeCode_04            = "1";

            Loop_2320.REF_AdditionalCoordinationOfBenefitsIdentifiers = new List <REF>();
            REF REFAccountCode = new REF();

            REFAccountCode.ReferenceIdentificationQualifier_01 = "60";
            REFAccountCode.ReferenceIdentification_02          = "12345";
            Loop_2320.REF_AdditionalCoordinationOfBenefitsIdentifiers.Add(REFAccountCode);

            Loop_2320.DTP_CoordinationOfBenefitsEleigibilityDates = new List <DTP>();
            DTP DTP_CoordinationOfBenefitBegin = new DTP();

            DTP_CoordinationOfBenefitBegin.DateTimeQualifier_01             = "334";
            DTP_CoordinationOfBenefitBegin.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_CoordinationOfBenefitBegin.DateTimePeriod_03 = "20150101";

            result.Loop_2320.Add(Loop_2320);

            Loop_2330 Loop_2330 = new Loop_2330();

            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity = new NM1_InsuranceProviderName();
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.EntityIdentifierCode_01        = "IN";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.EntityTypeQualifier_02         = "2";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderLastName_03   = "Insurance";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderFirstName_04  = "ABC";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.IdentificationCodeQualifier_08 = "FI";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderIdentifier_09 = "12-345678";
            //Misleading as "Loop" only contains NM1 element once.
            result.Loop_2330 = Loop_2330;

            //Optional Report Category
            //Misleading as "Loop" usually contains LX element only once.
            Loop_2700 Loop_2700 = new Loop_2700();

            Loop_2700.LX_MemberReportingCategories = new LX();
            Loop_2700.LX_MemberReportingCategories.AssignedNumber_01 = "2";

            return(result);
        }
Esempio n. 26
0
 void Awake()
 {
     Instance = this;
 }