예제 #1
0
        public EmptyResult MapModuletoApplication(string listId, string attributename, int ordinalposition)
        {
            string token = HttpContext.Session.GetString("access_token");
            List <PatientListModel> listModulesModel  = getListofListModel();
            List <MappedList>       listMappedmodules = APIservice.GetListById <MappedList>(listId.Trim(), "synapsenamespace=meta&synapseentityname=applicationlist&synapseattributename=application_id&attributevalue=", token).OrderBy(o => o.displayorder).ToList();

            MappedList       Model     = new MappedList();
            Guid             id        = Guid.NewGuid();
            PatientListModel moduleobj = listModulesModel.Single(s => s.list_id == attributename);

            Model.applicationlist_id = id.ToString();
            Model.application_id     = listId.Trim();
            Model.listid             = attributename;
            Model.listname           = moduleobj.listname;

            if (listMappedmodules.Count == 0)
            {
                Model.displayorder = 1;
            }
            else
            {
                Model.displayorder = listMappedmodules.Max(x => x.displayorder.Value) + 1;
            }

            string results = APIservice.PostObject <MappedList>(Model, "synapsenamespace=meta&synapseentityname=applicationlist", token);

            listMappedmodules = APIservice.GetListById <MappedList>(listId.Trim(), "synapsenamespace=meta&synapseentityname=applicationlist&synapseattributename=application_id&attributevalue=", token).OrderBy(o => o.displayorder).ToList();;

            return(new EmptyResult());
        }
        public async Task <NavigateBundle.Model> Handle(NavigateBundle.Query request, CancellationToken cancellationToken)
        {
            //var prayer = client.Operation(new Uri(request.Bundle), "continue");
            var bundle   = client.Continue(request.Bundle, request.Nav);
            var patients = new PatientListModel(
                new List <PatientModel>(),
                bundle.FirstLink?.ToString() != null ? bundle.FirstLink.ToString() : "",
                bundle.LastLink?.ToString() != null ? bundle.LastLink.ToString() : "",
                bundle.NextLink?.ToString() != null ? bundle.NextLink.ToString() : "",
                bundle.PreviousLink?.ToString() != null ? bundle.PreviousLink.ToString() : "",
                bundle.Total ?? 0);

            foreach (var e in bundle.Entry)
            {
                Hl7.Fhir.Model.Patient p = (Hl7.Fhir.Model.Patient)e.Resource;
                patients.Patients.Add(
                    new PatientModel(
                        p.Id, string.Join(" ", p.Name.FirstOrDefault()
                                          .Given), string.Join(" ", p.Name.FirstOrDefault().Family)));
            }


            return(new NavigateBundle.Model()
            {
                Bundle = bundle, Payload = patients
            });
        }
예제 #3
0
 private void FillImageUrl(PatientListModel providerList, string logoName, string ecgImage)
 {
     if (Request.Url == null) return;
     var url = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~"));
     providerList.LogoImage = url + "Content/" + logoName;
     providerList.EcgImage = ecgImage;
 }
예제 #4
0
        public ActionResult List()
        {
            var model = new PatientListModel();

            model.LoadItems();
            return(View("List", model));
        }
예제 #5
0
        private void FillImageUrl(PatientListModel providerList, string logoName, string ecgImage)
        {
            if (Request.Url == null)
            {
                return;
            }
            var url = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~"));

            providerList.LogoImage = url + "Content/" + logoName;
            providerList.EcgImage  = ecgImage;
        }
 public PatientService(IMediator mediator)
 {
     this.mediator = mediator;
     PatientList   =
         new PatientListModel(
             new List <PatientModel>()
     {
         new PatientModel("0", "No Results Found", "")
     }
             , "", "", "", "", 0);
 }
예제 #7
0
        public ActionResult PatientList()
        {
            var poliEnum = PoliEnum.PoliUmum;
            var poliName = Regex.Replace(poliEnum.ToString(), "([A-Z])", " $1").Trim();

            var model = new PatientListModel
            {
                PoliFromID    = (int)poliEnum,
                CurrentPoliID = (int)poliEnum,
                PoliFromName  = poliName
            };

            return(View("PatientList", model));
        }
예제 #8
0
        public ActionResult PatientList(Int16 SeletedSupporter, Int16 SeletedSeyed)
        {
            PatientListModel lmd = new PatientListModel();
            DataSet          ds  = new DataSet();

            Connection.Connection con = new Connection.Connection();
            ds                   = con.PatientData(SeletedSupporter, SeletedSeyed);
            lmd.Countries        = con.GetListOfCountries();
            lmd.SeletedSupporter = SeletedSupporter;
            lmd.SeletedSeyed     = SeletedSeyed;

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                PatientModel Tmp = new PatientModel();
                Tmp.Pt_Ct_Code      = Convert.ToInt16(dr["Pt_Ct_Code"]);
                Tmp.SelectedState   = con.StateData(Tmp.Pt_Ct_Code);
                Tmp.SelectedCountry = con.CountryData(Tmp.SelectedState);

                lmd.Patients.Add(new PatientModel
                {
                    Pt_Id = Convert.ToInt32(dr["Pt_Id"]),
                    //Pt_Name = dr["Pt_Name"].ToString(),
                    //Pt_LName = dr["Pt_LName"].ToString(),
                    Pt_Ct_Code      = Tmp.Pt_Ct_Code,
                    Pt_Seyyed       = Convert.ToInt16(dr["Pt_Seyyed"]),
                    Pt_Supporter    = Convert.ToInt16(dr["Pt_Supporter"]),
                    Pt_BirthDay     = Convert.ToDateTime(dr["Pt_BirthDay"]),
                    Pt_Sickness     = dr["Pt_Sickness"].ToString(),
                    Pt_Sex          = Convert.ToInt16(dr["Pt_Sex"]),
                    Pt_Tel          = dr["Pt_Tel"].ToString(),
                    Pt_Address      = dr["Pt_Address"].ToString(),
                    SelectedState   = con.StateData(Tmp.Pt_Ct_Code),
                    SelectedCountry = con.CountryData(Tmp.SelectedState),
                    States          = con.GetListOfStates(Tmp.SelectedCountry),
                    Cities          = con.GetListOfCities(Tmp.SelectedState),
                    Pt_Photo_Path   = dr["Pt_Photo_Path"].ToString(),
                    Pt_CompleteName = dr["Pt_Name"].ToString() + ' ' + dr["Pt_LName"].ToString()
                });
            }
            return(View(lmd));
        }
        public static void MapModuletoApplication(string listId, string attributename, int ordinalposition)
        {
            MappedList       Model     = new MappedList();
            Guid             id        = Guid.NewGuid();
            PatientListModel moduleobj = listModulesModel.Single(s => s.list_id == attributename);

            Model.applicationlist_id = id.ToString();
            Model.application_id     = ApplicationId;
            Model.listid             = attributename;
            Model.listname           = moduleobj.listname;

            if (listMappedmodules.Count == 0)
            {
                Model.displayorder = 1;
            }
            else
            {
                Model.displayorder = listMappedmodules.Max(x => x.displayorder.Value) + 1;
            }

            string results = APIservice.PostObject <MappedList>(Model, "synapsenamespace=meta&synapseentityname=applicationlist");

            listMappedmodules = APIservice.GetListById <MappedList>(ApplicationId, "synapsenamespace=meta&synapseentityname=applicationlist&synapseattributename=application_id&attributevalue=").OrderBy(o => o.displayorder).ToList();;
        }
예제 #10
0
        // <---------------------------> Search Mechanism <--------------------------->

        public void ChangeToSearchPage()
        {
            // ReadDB to populate the patient list
            ReadDB();

            // Creating new instance of the patient page to prepare it for moving into the frame
            var page = new PatientSearchPage();

            /// Checking if the Search text is empty, if so return the full list of patients, else return the filtered items
            if (!string.IsNullOrWhiteSpace(SearchText))
            {
                // Array of non-allowed characters
                string[] NonAllowedChar = { "/", ".", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+" };

                // Checks for incorrect characters being entered
                foreach (var symbol in NonAllowedChar)
                {
                    if (searchText.Contains(symbol))
                    {
                        // TODO: Create a small control that will pop up if a non allowed character is entered
                        MessageBox.Show("Non-Allowed Character Entered");
                        return;
                    }
                }

                // Check for seperator
                if (searchText.Contains(","))
                {
                    List <PatientModel> firstNameFilter = new List <PatientModel>();
                    List <PatientModel> lastNameFilter  = new List <PatientModel>();

                    // Create array based on the location of seperator
                    var splitString = searchText.Split(',');

                    // Determine if too many seperators were used
                    if (splitString.Length > 2)
                    {
                        // TODO: Create a small control that will pop up if a non allowed character is entered
                        MessageBox.Show("Too many uses of ,");
                        return;
                    }

                    // Set the split values into variables that will be used to determine search capabilities
                    string lastName  = splitString[0];
                    string firstName = splitString[1];

                    // filter by the last name
                    lastNameFilter = PatientListModel.Where(p => p.LastName.ToLower().Contains(lastName.ToLower())).ToList();

                    // filter by the first name
                    firstNameFilter = lastNameFilter.Where(p => p.FirstName.ToLower().Contains(firstName.ToLower())).ToList();

                    // Open new page
                    MainWindow.AppWindow.DisplayPageFrame.Content = page;

                    // Set the itemsource to the completely filtered list
                    page.PatientList.ItemsSource = firstNameFilter;

                    return;
                }

                // Searching the patient list via the text entered into the search bar
                FilteredList = PatientListModel.Where(p => p.LastName.ToLower().Contains(SearchText.ToLower())).ToList();
                page.PatientList.ItemsSource = filteredList;

                // Sending the page frame the content
                MainWindow.AppWindow.DisplayPageFrame.Content = page;
            }
            else
            {
                // Setting itemsource to the entire list
                page.PatientList.ItemsSource = PatientListModel;

                // Sending the page frame the content
                MainWindow.AppWindow.DisplayPageFrame.Content = page;
            }
        }