예제 #1
0
        // PRIVATE HELPER METHODS SECTION
        //---------------------------------------------------------------------

        #region Private methods

        private RecipeClient2[] CreateProxyRemainsCollection(IList <RecipeRow> recipesRows)
        {
            int proxyRecipesTotal = recipesRows.Count;
            var proxyRecipesArr   = new RecipeClient2[proxyRecipesTotal];

            for (int proxyRecipesCount = 0; proxyRecipesCount < proxyRecipesTotal; ++proxyRecipesCount)
            {
                proxyRecipesArr[proxyRecipesCount] =
                    EntityToProxy(recipesRows[proxyRecipesCount]);
            }

            return(proxyRecipesArr);
        }
예제 #2
0
        // PROXY CLASS CREATION SECTION
        //-------------------------------------------------

        //*** create batch for multiline recipes
        private RecipeClient2[] CreateProxyEntityList(IList <RecipeRow> recipeRowsList)
        {
            int proxyRecipesTotal = recipeRowsList.Count;
            var proxyRecipesArr   = new RecipeClient2[proxyRecipesTotal];

            for (int proxyRecipesCount = 0; proxyRecipesCount < proxyRecipesTotal; ++proxyRecipesCount)
            {
                proxyRecipesArr[proxyRecipesCount] =
                    CreateProxyEntity(recipeRowsList[proxyRecipesCount]);
            }

            return(proxyRecipesArr);
        }
예제 #3
0
        private RecipeClient2 EntityToProxy(RecipeRow recipeRow)
        {
            //*** map every field

            var recipeProxy = new RecipeClient2();

            recipeProxy.Seria             = recipeRow.Seria;
            recipeProxy.Number            = recipeRow.Number;
            recipeProxy.Snils             = recipeProxy.Snils;
            recipeProxy.LpuOgrn           = recipeRow.LpuOgrn;
            recipeProxy.LpuFoms           = recipeRow.LpuFoms;
            recipeProxy.DoctorCode        = recipeRow.DoctorCode;
            recipeProxy.MkbCode           = recipeRow.MkbCode;
            recipeProxy.FundingSourceCode = int.Parse(recipeRow.FundingSourceCode);
            recipeProxy.NosologyCode      = recipeRow.NosologyCode;
            recipeProxy.PrivilegeCode     = recipeRow.PrivilegeCode;
            recipeProxy.ProgramName       = recipeRow.Program;
            recipeProxy.ValidPeriodCode   = recipeRow.ValidPeriodCode;
            recipeProxy.PayPercent        = int.Parse(recipeRow.PayPercent);
            recipeProxy.MnnCode           = recipeRow.MnnTrnCode;
            recipeProxy.TrnCode           = recipeRow.MnnTrnCode;
            recipeProxy.CureformCode      = recipeRow.CureformCode;
            recipeProxy.IsVk              = recipeRow.IsVk;
            recipeProxy.Dosage            = recipeRow.Dosage;
            recipeProxy.Quantity          = recipeRow.Quantity;
            recipeProxy.IssueDate         = recipeRow.IssueDate;
            recipeProxy.IncomeDate        = recipeRow.IncomeDate;
            recipeProxy.SaleDate          = recipeRow.SaleDate;
            recipeProxy.ProductCode       = recipeRow.ProductCode;
            recipeProxy.Price             = recipeRow.Price;
            recipeProxy.PatientLastname   = recipeRow.PatientLastname;
            recipeProxy.PatientFirstname  = recipeRow.PatientFirstname;
            recipeProxy.PatientMiddlename = recipeRow.PatientMiddlename;
            recipeProxy.PatientBirthday   = recipeRow.PatientBirthday;
            recipeProxy.PatientSex        = recipeRow.PatientSex;



            /*** CHECK THIS FIELDS
             *
             * recipeProxy.DocumnentState
             * recipeProxy.SaleDateSpecified
             * recipeProxy.QuantityUnit
             * recipeProxy.IssueDateSpecified
             * recipeProxy.SaleDateSpecified
             */

            //recipeProxy.BestBefore
            //recipeProxy.BestBefore
            //recipeProxy.QuantitySale
            //recipeProxy.DocumnentState =
            //recipeProxy.PatientCard
            //recipeProxy.PatientPolicy
            //recipeProxy.PatientAddress
            //recipeProxy.CredentialType
            //recipeProxy.CredentialNumber
            //recipeProxy.PrivilegeDocumentType
            //recipeProxy.PrivilegeDocumentDateStart
            //recipeProxy.PrivilegeDocumentDateFinish

            /*
             * Seria
             * Number
             * Snils
             * LpuOgrn
             * LpuFoms
             * DoctorCode
             * MkbCode
             * FundingSourceCode
             * NosologyCode
             * PrivilegeCode
             * Program
             * ValidPeriodCode
             * PayPercent
             * MnnCode
             * TrnCode
             * CureformCode
             * IsVk
             * Dosage
             * Quantity
             * IssueDate
             * IncomeDate
             * SaleDate
             * DocumentState
             * ProductCode
             * ProductSeria
             * BestBefore
             * QuantitySale
             * Price
             * BestBefore
             * PatientLastname
             * PatientFirstname
             * PatientMiddlename
             * PatientBirthday
             * PatientSex
             * PatientCard
             * PatientPolicy
             * PatientAddress
             * CredentialType
             * CredentialNumber
             * PrivilegeDocumentType
             * PrivilegeDocumentDateStart
             * PrivilegeDocumentDateFinish
             */



            return(recipeProxy);
        }