public IActionResult Triage(int qid, string pt, OutpatientTriageViewVModel model)
        {
            model.Patient = IPatientService.GetPatient(pt);
            model.Queue   = IOutpatientService.GetQueue(qid);

            if (!model.Patient.Id.Equals(model.Queue.Visit.Patient.Id))
            {
                return(LocalRedirect("/outpatient/triage.queue?error=1011"));
            }

            model.MobilityOpts = IConceptService.GetConceptAnswersIEnumerable(new Concept {
                Id = Constants.MOBILITY
            });
            model.AvpuOpts = IConceptService.GetConceptAnswersIEnumerable(new Concept {
                Id = Constants.AVPU
            });
            model.TraumaOpts = IConceptService.GetConceptAnswersIEnumerable(new Concept {
                Id = Constants.TRAUMA
            });

            model.Rooms = ICoreService.GetRoomsIEnumerable("1");
            model.Types = ICoreService.GetRoomsIEnumerable(new RoomType {
                Id = Constants.ROOM_OPD
            });
            model.Priority = ICoreService.GetQueuePriorityIEnumerable();

            return(View(model));
        }
        public IActionResult Visit(string p, RegistrationVisitViewModel model)
        {
            model.Visit.Patient = IPatientService.GetPatient(p);
            model.Codes         = ICoreService.GetClientCodesIEnumerable();
            model.Rooms         = ICoreService.GetRoomsIEnumerable();
            model.Types         = ICoreService.GetRoomsIEnumerable(new RoomType {
                Id = Constants.ROOM_TRIAGE
            });
            model.Referrals = IConceptService.GetConceptAnswersIEnumerable(new Concept {
                Id = Constants.REFERRAL_TYPE
            });
            model.MedicoLegal = IConceptService.GetConceptAnswersIEnumerable(new Concept {
                Id = Constants.MEDICO_LEGAL
            });
            model.Doctors = IDoctorService.GetDoctorsIEnumerable();

            return(View(model));
        }