Exemple #1
0
 public CaseService()
 {
     _context             = AppService.Current.DataContextV2;
     _contextOld          = AppService.Current.DataContext;
     PatientSearchService = new PatientSearchService(_context);
     StaffingService      = new StaffingService(_context);
 }
Exemple #2
0
        public List <Domain.Providers.Provider> GetProvidersByCase(int caseID)
        {
            var context = new CoreEntityModel();

            var q = from providers in context.Providers
                    join caseproviders in context.CaseProviders on providers.ID equals caseproviders.ProviderID
                    where caseproviders.CaseID == caseID
                    select providers;

            var entities = q.ToList();

            return(Mappings.ProviderMappings.Providers(entities).ToList());
        }
Exemple #3
0
        public IActionResult EntityManagerNewSave(CoreEntityModel model)
        {
            string sql       = "SELECT entitysettings.createentityfrommodel(@p_synapsenamespaceid, @p_synapsenamespacename, @p_entityname, @p_entitydescription, @p_username, @p_localnamespaceid, @p_localnamespacename)";
            var    paramList = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>("p_synapsenamespaceid", namespaceId),
                new KeyValuePair <string, string>("p_synapsenamespacename", SynapseHelpers.GetNamespaceNameFromID(namespaceId)),
                new KeyValuePair <string, string>("p_entityname", model.EntityName),
                new KeyValuePair <string, string>("p_entitydescription", model.EntityDescription == null ? "" : model.EntityDescription),
                new KeyValuePair <string, string>("p_username", HttpContext.Session.GetString(SynapseSession.FullName)),
                new KeyValuePair <string, string>("p_localnamespaceid", ""),
                new KeyValuePair <string, string>("p_localnamespacename", ""),
            };
            DataSet ds = new DataSet();

            ds = DataServices.DataSetFromSQL(sql, paramList);
            DataTable dt      = ds.Tables[0];
            string    newGuid = dt.Rows[0][0].ToString();

            return(Json(newGuid));
        }
        public ActionResult InsuranceCredentialForm(int ProviderId, int InsuranceCredentialId)
        {
            // client requested the list be restricted to the following entries
            // this is a temporary hotfix while we add a card to the system to
            // handle this properly (refactor to latest context/db, add CanBeCredentialed flag to db/model...

            /* credential list and respective production IDs...
             *
             * 79       Beacon
             * 68       Horizon
             * 83, 84   CareFirst
             * 67       Empire BCBS HealthPlus
             * 71       United Healthcare
             * 92       Blue Cross Blue Shield
             */
            var idList = new List <int> {
                79, 68, 83, 84, 67, 71, 92
            };
            var context = new CoreEntityModel();
            var model   = new ProviderInsuranceCredentialVM
            {
                InsuranceList = context.Insurances.Where(x => idList.Contains(x.ID)).ToList(),
                ProviderId    = ProviderId
            };

            if (InsuranceCredentialId > 0)
            {
                var credentials = Context.ProviderInsuranceCredentials.SingleOrDefault(m => m.ID == InsuranceCredentialId);
                if (credentials != null)
                {
                    model.Id          = credentials.ID;
                    model.ProviderId  = credentials.ProviderID;
                    model.InsuranceId = credentials.InsuranceID;
                    model.StartDate   = credentials.StartDate;
                    model.EndDate     = credentials.EndDate;
                }
            }
            return(PartialView("InsuranceCredentialForm", model));
        }