Ejemplo n.º 1
0
        public void BroadcastUserAdded(PatientViewModel patient)
        {
            try
            {
                Clients.All.addPatient(patient);
            }
            catch (Exception)
            {

            }
        }
Ejemplo n.º 2
0
        public void BroadcastUserUpdated(PatientViewModel patient)
        {
            try
            {
                Clients.All.updatePatient(patient);
            }
            catch (Exception)
            {

            }
        }
Ejemplo n.º 3
0
 public void BroadcastUserAdded(PatientViewModel patient)
 {
     _patientsManager.BroadcastUserAdded(patient);
 }
Ejemplo n.º 4
0
        public ActionResult Create(PatientViewModel model)
        {
            var patient = new Patient
            {
                Name = model.Name,
                Cpr = model.Cpr,
                RfidTag = model.Rfid,
                Location = model.Location,
                DeviceId = model.DeviceId,
                SonitorTag = model.SonitorTag
            };

            Portal.Instance().AddPatient(patient);

            return RedirectToAction("Create");
        }
Ejemplo n.º 5
0
 public ActionResult Create()
 {
     var model = new PatientViewModel();
     return View("Create", model);
 }
Ejemplo n.º 6
0
        public ActionResult Edit(PatientViewModel model)
        {
            if (ModelState.IsValid)
            {
                var patient = Portal.Instance().FindPatientById(model.Id);
                if (patient == null)
                    return HttpNotFound("Patient with id = " + model.Id + " was not found");

                patient.Name = model.Name;
                patient.Cpr = model.Cpr;
                patient.Location = model.Location;
                patient.Procedure = model.Procedure;
                patient.DeviceId = model.DeviceId;
                patient.SonitorTag = model.SonitorTag;
                patient.RecordLoaction = model.RecordLocation;
                patient.Ews = model.Ews;

                Portal.Instance().UpdatePatient(patient);
            }

            return OtherPatientData(model.Id);
        }