Ejemplo n.º 1
0
        public int CheckIfSupportSystemCriteriaExists(int patientId)
        {
            int result = 0;
            //string msg = "";

            PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager();

            try
            {
                result = patientSupportSystemCriteriaManager.checkIfARTPreparationExists(patientId);
            }
            catch (Exception e)
            {
                // var msg = new JavaScriptSerializer().Serialize(e.Message);
                throw e.InnerException;
            }
            return(result);
        }
Ejemplo n.º 2
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);
        }