示例#1
0
        public string EditPatientSupportSystemCriteria(int patientId, int patientmastervisitId, bool takingART, bool supportGroup, bool TSIdentified, bool smsreminder, bool othersupport)
        {
            string msg    = "";
            int    result = 0;

            PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager();


            try
            {
                PatientSupportSystemCriteria patientSupportSystemCriteria = new PatientSupportSystemCriteria()
                {
                    PatientId            = patientId,
                    PatientMasterVisitId = patientmastervisitId,
                    TakingART            = takingART,
                    supportGroup         = supportGroup,
                    TSIdentified         = TSIdentified,
                    EnrollSMSReminder    = smsreminder,
                    OtherSupportSystems  = othersupport
                };

                result = patientSupportSystemCriteriaManager.EditPreparation(patientSupportSystemCriteria);
                if (result > 0)
                {
                    msg = "Patient Support System criteria assessment update completed!";
                    msg = new JavaScriptSerializer().Serialize(msg);
                }
            }
            catch (Exception e)
            {
                msg = e.Message;
                msg = new JavaScriptSerializer().Serialize(msg);
            }
            return(msg);
        }
 public int EditPreparation(PatientSupportSystemCriteria _patientSupportSystemCriteria)
 {
     using (UnitOfWork _unitOfWork = new UnitOfWork(new GreencardContext()))
     {
         _unitOfWork.PatientSupportSystemCriteriaRepository.Update(_patientSupportSystemCriteria);
         result = _unitOfWork.Complete();
         _unitOfWork.Dispose();
         return(result);
     }
 }
示例#3
0
        public string AddPatientSupportSystemCriteria(int patientId, int patientmastervisitId, bool takingART, bool supportGroup, bool TSIdentified, bool smsreminder, bool othersupport)
        {
            string msg    = "";
            int    result = 0;
            PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager();


            try
            {
                PatientSupportSystemCriteria patientSupportSystemCriteria = new PatientSupportSystemCriteria()
                {
                    PatientId            = patientId,
                    PatientMasterVisitId = patientmastervisitId,
                    TakingART            = takingART,
                    supportGroup         = supportGroup,
                    TSIdentified         = TSIdentified,
                    EnrollSMSReminder    = smsreminder,
                    OtherSupportSystems  = othersupport
                };

                int isInserted = 0;
                isInserted = patientSupportSystemCriteriaManager.checkIfARTPreparationExists(patientId);
                if (isInserted < 1)
                {
                    result = patientSupportSystemCriteriaManager.AddPreparation(patientSupportSystemCriteria);
                    if (result > 0)
                    {
                        msg = "Patient Psychosocial criteria assessment completed!";
                        msg = new JavaScriptSerializer().Serialize(msg);
                    }
                }
                else
                {
                    msg = "Patient Psychosocial criteria assessment already completed!";
                    msg = new JavaScriptSerializer().Serialize(msg);
                }
            }
            catch (Exception e)
            {
                msg = e.Message;
                msg = new JavaScriptSerializer().Serialize(msg);
            }
            return(msg);
        }
 public int EditPreparation(PatientSupportSystemCriteria _PatientSupportSystemCriteria)
 {
     return(_PatientSupportSystemCriteriaManager.EditPreparation(_PatientSupportSystemCriteria));
 }