Example #1
0
        public CascadingDropDownNameValue[] GetDentalAdvice(string knownCategoryValues, string category)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from Relationships in oOPresDataContext.lkp_DentalAdvices
                    select new CascadingDropDownNameValue
                    {
                        name = Relationships.DADesc,
                        value = Relationships.DACode.ToString(),
                    }).OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #2
0
        public static string GetChiefComplaince2()
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            var ChiefComp = (from ChiefCom in oOPresDataContext.lkp_ChiefComplainces
                    where ChiefCom.CCGroup != null
                    select new CascadingDropDownNameValue
                    {
                        name = ChiefCom.CCDesc,
                        value = ChiefCom.CCCode.ToString(),
                    }).OrderBy(t => t.name);

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(ChiefComp);
        }
Example #3
0
        public CascadingDropDownNameValue[] GetChiefComplaince(string knownCategoryValues, string category)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            IEnumerable<CascadingDropDownNameValue> vals = null;
            //short targetID = 0;
            ORM.lkp_ChiefComplaince olkp_ChiefComplaince = new ORM.lkp_ChiefComplaince();

            vals = (from ChiefCom in oOPresDataContext.lkp_ChiefComplainces
                    where ChiefCom.CCGroup != null
                    select new CascadingDropDownNameValue
                    {
                        name = ChiefCom.CCDesc,
                        value = ChiefCom.CCCode.ToString(),
                    }).OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #4
0
        public static object GetPatientInfo(string PatienID)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            //Date calculation*****************************************
            var pDOB = (from age in oOPresDataContext.PatientBasicInfos
                                    where age.PatientID.Equals(PatienID)
                                    select age.DateOfBirth).SingleOrDefault();

            DateTime PatienceDOB = Convert.ToDateTime(pDOB);
            DateTime today = DateTime.Now;

            var totalDays = (today - PatienceDOB).TotalDays;

            var totalYears = Math.Truncate(totalDays / 365);
            var totalMonths = Math.Truncate((totalDays % 365) / 30);
            var remainingDays = Math.Truncate((totalDays % 365) % 30);

            string strFinalAge = totalYears + "y-" + totalMonths + "m-" + remainingDays + "d";
            //End Date calculation*****************************************

            var PatientInfo = from Patience in oOPresDataContext.PatientBasicInfos
                              where
                                Patience.PatientID == PatienID
                              select new
                              {
                                  Relationship = Patience.RelCode,
                                  PatientName = Patience.PatientName,
                                  PatientSex = Patience.Gender,
                                  PatientAge = strFinalAge.ToString()
                              };

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(PatientInfo);
        }
Example #5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ORM.OnLinePrescriptionDataContext oOnLinePrescriptionDataContext = new ORM.OnLinePrescriptionDataContext();
            PatientBasicInfo oPatietnBasicInfo = new PatientBasicInfo();

            //PatientID,RegistrationDt,PatientType,StudyName,StudyID,EmployeeID,RelCode,PatientName,MaritalStatus,Gender,
            oPatietnBasicInfo.RegistrationDt = DateTime.Now;
            oPatietnBasicInfo.PatientType = byte.Parse(ddlPatientType.SelectedValue);

            if (byte.Parse(ddlPatientType.SelectedValue) == 2)
            {
                oPatietnBasicInfo.StudyName = ddlStudyName.SelectedValue;
                oPatietnBasicInfo.StudyID = txtStudyPatientId.Text;
            }
            else if (byte.Parse(ddlPatientType.SelectedValue) == 3)
                oPatietnBasicInfo.StudyID = txtEmployeeId.Text;

            if (txtEmployeeId.Enabled == true)
                oPatietnBasicInfo.EmployeeID = txtEmployeeId.Text;
            else
                oPatietnBasicInfo.EmployeeID = null;

            oPatietnBasicInfo.RelCode = byte.Parse(ddlRelationship.SelectedValue);
            oPatietnBasicInfo.PatientName = txtPatientName.Text;
            oPatietnBasicInfo.MaritalStatus = byte.Parse(ddlMaritalStatus.SelectedValue);
            oPatietnBasicInfo.Gender = byte.Parse(ddlSex.SelectedValue);

            //SpouseName,FatherName,MotherName,DateOfBirth,NationalID,ContactNo,AreaCode,PDistrict,PThana,PUnion,
            oPatietnBasicInfo.SpouseName = txtSpouseName.Text;
            oPatietnBasicInfo.FatherName = txtFathersName.Text;
            oPatietnBasicInfo.MotherName = txtMothersName.Text;

            //DateOfBirth
            if (chkDOB.Checked)
                oPatietnBasicInfo.DateOfBirth = RdpDOB.SelectedDate;
            else
            {
                int AgeTotalDays;
                AgeTotalDays = int.Parse(RNtxtAgeMonth.Text) * 30 + int.Parse(RNtxtAgeDay.Text) + int.Parse(RNtxtAgeYear.Text) * 365;
                oPatietnBasicInfo.DateOfBirth = DateTime.Now.AddDays(-AgeTotalDays);
            }
            //DateOfBirth

            oPatietnBasicInfo.NationalID = txtNID.Text;
            oPatietnBasicInfo.ContactNo = txtMobile.Text;

            var varAreaCode = (from lkpAreDet in oOnLinePrescriptionDataContext.lkp_AreaDetails
                               where lkpAreDet.DistCode.Equals(ddlDistrict.SelectedValue) &&
                               lkpAreDet.ThanaCode.Equals(ddlThana.SelectedValue)
                               select lkpAreDet.AreaCode).SingleOrDefault();
            oPatietnBasicInfo.AreaCode = varAreaCode;

            oPatietnBasicInfo.PDistrict = ddlDistrict.SelectedValue;
            oPatietnBasicInfo.PThana = ddlThana.SelectedValue;
            oPatietnBasicInfo.PUnion = txtUnion.Text;

            //PVillage,PAddress,RegistrationFee,MedDiscount,TestDiscount,Remarks
            oPatietnBasicInfo.PVillage = txtVillage.Text;
            oPatietnBasicInfo.PAddress = txtAddress.Text;

            //var varRegFee = oOnLinePrescriptionDataContext.lkp_Relationships.Where(id => id.RelMedDiscount.Equals(ddlRelationship.SelectedValue));

            var varRegFeeMax = oOnLinePrescriptionDataContext.lkp_RegistrationFees.Max(x => x.RFTaka);

            var varMedDis = (from lkpRel in oOnLinePrescriptionDataContext.lkp_Relationships
                             where lkpRel.RelCode.Equals(ddlRelationship.SelectedValue)
                             select lkpRel.RelMedDiscount).SingleOrDefault();

            var varTestDis = (from lkpRel in oOnLinePrescriptionDataContext.lkp_Relationships
                             where lkpRel.RelCode.Equals(ddlRelationship.SelectedValue)
                             select lkpRel.RelTestDiscount).SingleOrDefault();

            oPatietnBasicInfo.RegistrationFee = varRegFeeMax;
            oPatietnBasicInfo.MedDiscount = varMedDis;
            oPatietnBasicInfo.TestDiscount = varTestDis;

            oPatietnBasicInfo.Remarks = txtRemarks.Text;

            //Create Error message Object
            BL.Classes.Patient oPatient = new BL.Classes.Patient();
            string sError = oPatient.Verify(oPatietnBasicInfo);

            if (string.IsNullOrEmpty(sError))
                oPatient.Register(oPatietnBasicInfo);
            else
            {
                RadWindowManager.RadAlert(sError, 200, 200, "Alert!!", null);
                return;

            }

            ClearControlled();
            //May be function generation
            //lblForFunctionCall.Text = "<script type='text/javascript'>returnToParent();</script>";
        }
Example #6
0
        public CascadingDropDownNameValue[] GetThanaorUpZillaList2(string knownCategoryValues, string category)
        {
            StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            string varCat;
            varCat = kv["DistCode"];
            List<CascadingDropDownNameValue> Values = new List<CascadingDropDownNameValue>();

            StringDictionary kv2 = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            string varDivCode;
            varDivCode = kv["DivCode"];

            using (ORM.OnLinePrescriptionDataContext oOnLinePrescriptionDataContext = new ORM.OnLinePrescriptionDataContext())
            {
            var AreaQuery = from AreaD in oOnLinePrescriptionDataContext.lkp_AreaDetails
                            where (AreaD.DivCode == varDivCode && AreaD.DistCode == varCat)
                        select new {
                            AreaD.ThanaCode,
                            AreaD.ThanaName
                        }
                        into AreaResult
                        select AreaResult;

                foreach (var AreaResult in AreaQuery)
                    {
                        string ID = AreaResult.ThanaCode;
                        string Name = AreaResult.ThanaName;
                        Values.Add(new CascadingDropDownNameValue(Name, Convert.ToString(ID)));
                    }
                    //return Values.ToArray();
            return Values.ToArray<CascadingDropDownNameValue>();
            }
        }
Example #7
0
        public CascadingDropDownNameValue[] GetThanaorUpZillaList(string knownCategoryValues, string category)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            //oOPresDataContext.ObjectTrackingEnabled = false;

            StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            string varCat;
            varCat = kv["DistCode"];

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from AreaD in oOPresDataContext.lkp_AreaDetails.Distinct()
                    where (AreaD.DistCode == varCat)
                    select new CascadingDropDownNameValue
                    {
                        name = AreaD.ThanaName,
                        value = AreaD.ThanaCode.ToString()
                    }).Distinct().OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #8
0
        public object GetStaffInfo(string StaffID)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;
            var staffInfo = from Staffs in oOPresDataContext.lkp_StaffInfos
                          where
                              Staffs.StaffID== StaffID
                          select new
                          {
                                Staffs.StaffID,
                                Staffs.StaffName,
                                StaffDOB= Staffs.DateOfBirth,
                                Staffs.StaffSex
                            };

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(staffInfo); ;
        }
Example #9
0
        public CascadingDropDownNameValue[] GetReferredList()
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            //oOPresDataContext.ObjectTrackingEnabled = false;

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from Rfd in oOPresDataContext.lkp_Reffereds
                select new CascadingDropDownNameValue
                {
                    name = Rfd.RefDesc,
                    value = Rfd.RefCode.ToString()
                }).Distinct().OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #10
0
        public object GetPatientInfo(string PatienID)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            var PatientInfo = (from pid in oOPresDataContext.PatientBasicInfos
                                      where pid.PatientID.Equals(PatienID)
                                      select pid.PatientID).SingleOrDefault();

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(PatientInfo);
        }
Example #11
0
        public object GetPatientBasicInfoById(string patientID)
        {
            ORM.OnLinePrescriptionDataContext oHealsDataContext = new ORM.OnLinePrescriptionDataContext();
            oHealsDataContext.ObjectTrackingEnabled = false;

            var resInfo = from Respondents in oHealsDataContext.lkp_StaffInfos

                          where
                              Respondents.StaffID == patientID
                          select new
                          {
                              ResID = Respondents.StaffID,
                              ResName = Respondents.StaffName,
                              ResSex = Respondents.StaffSex,
                              ResAge = Respondents.StaffAge
                          };

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(resInfo);
        }
Example #12
0
        public CascadingDropDownNameValue[] GetDrugAllergyList()
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            //oOPresDataContext.ObjectTrackingEnabled = false;

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from Mname in oOPresDataContext.lkp_MedicineNames
                select new CascadingDropDownNameValue
                {
                    name = Mname.TradeName,
                    value = Mname.MNCode.ToString()
                }).Distinct().OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #13
0
        public CascadingDropDownNameValue[] GetDoctorFee(string knownCategoryValues, string category)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            //oOPresDataContext.ObjectTrackingEnabled = false;

            StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            short varCat;
            varCat = Convert.ToSByte(kv["DNCode"]);

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from AreaD in oOPresDataContext.lkp_DoctorsNames
                where (AreaD.DNCode == varCat)
                select new CascadingDropDownNameValue
                {
                    name =  AreaD.DoctorFee.ToString(),
                    value = AreaD.DNCode.ToString()
                });
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #14
0
        public CascadingDropDownNameValue[] GetDistrictList()
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            //oOPresDataContext.ObjectTrackingEnabled = false;

            IEnumerable<CascadingDropDownNameValue> vals = null;
            vals = (from AreaD in oOPresDataContext.lkp_AreaDetails.Distinct()
                    select new CascadingDropDownNameValue
                    {
                        name = AreaD.DistName,
                        value = AreaD.DistCode.ToString()
                    }).Distinct().OrderBy(t => t.name);
            return vals.ToArray<CascadingDropDownNameValue>();
        }
Example #15
0
        public static void SavePrescriptions(OnlineOutPatientManagementSystem.UI.Prescription.clsDataTypes.PrescriptionGenDataInfo oPrescriptionGenDataInfo)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            ORM.ClinicVisitHistory oClinicVisitHistory = new ORM.ClinicVisitHistory();

            //Basic Infp************************************
            //int intMaxClnVisutId = oOPresDataContext.ClinicVisitHistories.Max(u => u.ClinicVisitID) + 1;

            oClinicVisitHistory.ClinicVisitID = oOPresDataContext.ClinicVisitHistories.Max(u => u.ClinicVisitID) + 1;
            oClinicVisitHistory.VisitDate = DateTime.Now;

            oClinicVisitHistory.PatientID = oPrescriptionGenDataInfo.strPatientID;
            oClinicVisitHistory.Relations = oPrescriptionGenDataInfo.strRelations;

            oClinicVisitHistory.PatientAge = oPrescriptionGenDataInfo.strPatientAge;
            oClinicVisitHistory.DrugHistory = oPrescriptionGenDataInfo.strDrugHistory;

            oClinicVisitHistory.DrugAllergy = oPrescriptionGenDataInfo.strDrugAllergy;

            //On examinatin Info******************************
            oClinicVisitHistory.ExaAnemia = oPrescriptionGenDataInfo.strExaAnemia;
            oClinicVisitHistory.ExaJaundice = oPrescriptionGenDataInfo.strExaJaundice;
            oClinicVisitHistory.ExaClubbing = oPrescriptionGenDataInfo.strExaClubbing;
            oClinicVisitHistory.ExaOedema = oPrescriptionGenDataInfo.strExaOdema;
            oClinicVisitHistory.ExaL_N = oPrescriptionGenDataInfo.strExaL_N;

            oClinicVisitHistory.ExaHeart = oPrescriptionGenDataInfo.strExaHeart;
            oClinicVisitHistory.ExaLung = oPrescriptionGenDataInfo.strExaLung;
            oClinicVisitHistory.ExaLiver = oPrescriptionGenDataInfo.strExaLiver;
            oClinicVisitHistory.ExaSpleen = oPrescriptionGenDataInfo.strExaSpleen;
            oClinicVisitHistory.ExaOthers = oPrescriptionGenDataInfo.strExaOthers;

            //Blood Pressure
            oClinicVisitHistory.ExaSystolic = oPrescriptionGenDataInfo.strExaSystolic;
            oClinicVisitHistory.ExaDiastolic = oPrescriptionGenDataInfo.strExaDiastolic;

            oClinicVisitHistory.ExaSystolic = oPrescriptionGenDataInfo.strExaSystolic;
            oClinicVisitHistory.ExaDiastolic = oPrescriptionGenDataInfo.strExaDiastolic;
            oClinicVisitHistory.ExaPulse = oPrescriptionGenDataInfo.strExaPulse;
            oClinicVisitHistory.ExaTemp = oPrescriptionGenDataInfo.strExaTemp;
            oClinicVisitHistory.ExaWt = oPrescriptionGenDataInfo.strExaWt;

            oClinicVisitHistory.ExaVulva = oPrescriptionGenDataInfo.strExaVulva;
            oClinicVisitHistory.ExaVagina = oPrescriptionGenDataInfo.strExaVagina;
            oClinicVisitHistory.ExaOS = oPrescriptionGenDataInfo.strExaOS;
            oClinicVisitHistory.ExaCervix = oPrescriptionGenDataInfo.strExaCervix;

            //Other data
            oClinicVisitHistory.ReferredCode = oPrescriptionGenDataInfo.strReferredCode;
            //oClinicVisitHistory.Referred = oPrescriptionGenDataInfo.strReferred;
            oClinicVisitHistory.DoctorCode1 = oPrescriptionGenDataInfo.strDoctorCode1;

            //oPrescriptionGenDataInfo.strDoctorCode2;
            oClinicVisitHistory.DoctorCode2 = null;

            oClinicVisitHistory.NextVisitDt = null;
            oClinicVisitHistory.EntryDate = DateTime.Now;

            //Adds an entity in a pending insert state to this System.Data.Linq.Table<TEntity>and parameter is the entity which to be added
            oOPresDataContext.ClinicVisitHistories.InsertOnSubmit(oClinicVisitHistory);
            // executes the appropriate commands to implement the changes to the database
            oOPresDataContext.SubmitChanges();
        }
Example #16
0
        public object GetPatientInfo(string PatienID)
        {
            ORM.OnLinePrescriptionDataContext oOPresDataContext = new ORM.OnLinePrescriptionDataContext();
            oOPresDataContext.ObjectTrackingEnabled = false;

            var PatientInfo = from Patience in oOPresDataContext.PatientBasicInfos
                          where
                            Patience.PatientID == PatienID
                          select new
                          {
                              Relationship = Patience.Relationship,
                              PatientName = Patience.PatientName,
                              PatientSex = Patience.Gender,
                              PatientAge = Patience.PatientAge,

                          };

            JavaScriptSerializer oJSS = new JavaScriptSerializer();
            return oJSS.Serialize(PatientInfo);
        }