예제 #1
0
        public static string GetStatReasonNotAvail(string bedRowId)
        {
            string result    = string.Empty;
            string cmdString = QueryString.GetStatReasonNotAvailQueryString(bedRowId);
            var    value     = InterSystemsDA.ExecuteScalarBindDataCommand(cmdString, Constants.Cache89ConnectionString);

            if (!string.IsNullOrEmpty(value))
            {
                int intValue = 0;
                if (Int32.TryParse(value, out intValue))
                {
                    if (intValue == 3)
                    {
                        result = "W";
                    }
                    else if (intValue == 6)
                    {
                        result = "R";
                    }
                    else if (intValue == 7)
                    {
                        result = "O";
                    }
                    else if (intValue > 0)
                    {
                        result = "C";
                    }
                }
            }

            return(result);
        }
예제 #2
0
        // Return [ward, room] with datatable from cache
        public static DataTable GetBedRoom(string wardCode)
        {
            dt = new DataTable();

            dt = InterSystemsDA.DataTableBindDataCommand(QueryString.GetBedRoomQueryString(wardCode), Constants.Cache89ConnectionString);

            return(dt);
        }
예제 #3
0
        public static double GetRevenueByEPI(string epino)
        {
            double revenue = 0.0;

            var cmdString = QueryString.GetRevenueFromCache(epino);
            var rev       = InterSystemsDA.BindDataCommand(cmdString, Constants.Chache89);
            var result    = double.TryParse(rev, out revenue) ? revenue : 0.0;

            return(result);
        }
예제 #4
0
        public static string GetAllergenCategory(string algName)
        {
            string result = string.Empty;

            var cmdString = QueryString.GetAllergyCategory(algName);

            result = InterSystemsDA.BindDataCommand(cmdString, Constants.Chache89);

            return(result);
        }
예제 #5
0
        public static string GetHospitalSite(string siteCode)
        {
            string hos = string.Empty;

            var cmdString = QueryString.GetHospitalSites(siteCode);

            hos = InterSystemsDA.BindDataCommand(cmdString, Constants.Chache89);

            return(hos);
        }
예제 #6
0
        public PatientOrder GetPatientOrder(string epiRowId, string dateFrom, string dateTo)
        {
            PatientOrder ptOrder = new PatientOrder();

            var dtOneDay   = InterSystemsDA.DTBindDataCommand(QueryString.GetOrders(epiRowId, dateFrom, dateTo, "OneDay"), conString);
            var dtContinue = InterSystemsDA.DTBindDataCommand(QueryString.GetOrders(epiRowId, dateFrom, dateTo, "Continue"), conString);

            ptOrder = Helper.DataTableToPatientOrder(epiRowId, dtOneDay, dtContinue);

            return(ptOrder);
        }
예제 #7
0
        public List <Allergy> GetAllergys(string hn)
        {
            List <Allergy> results = new List <Allergy>();

            var cmdString = QueryString.GetAllergy(hn);
            var dtAlg     = InterSystemsDA.DTBindDataCommand(cmdString, GlobalVariables.Cache89);

            results = Helper.DataTableToAllergy(dtAlg);

            return(results);
        }
예제 #8
0
        public static string GetBedType(string bedRowId)
        {
            string result = string.Empty;

            string cmdString = QueryString.GetBedTypeQueryString(bedRowId);

            result = InterSystemsDA.ExecuteScalarBindDataCommand(cmdString, Constants.Cache89ConnectionString);
            result = result.Substring(2, 1);

            return(result.Trim());
        }
예제 #9
0
        public static List <PatientPhone> GetPatientPhone(string hn)
        {
            List <PatientPhone> result = new List <PatientPhone>();

            var cmdString = QueryString.GetPatientPhone(hn);
            var dt        = InterSystemsDA.DTBindDataCommand(cmdString, Constants.Chache89);

            result = Helper.DataTableToPatientPhon(dt);

            return(result);
        }
예제 #10
0
        public static List <Allergen> GetAllergens(string hn)
        {
            List <Allergen> results = new List <Allergen>();

            var cmdString = QueryString.GetAllergy(hn);
            var dtAlg     = InterSystemsDA.DTBindDataCommand(cmdString, Constants.Chache89);

            results = Helper.DataTableToAllergen(dtAlg);

            return(results);
        }
예제 #11
0
        public static PatientInfo GetPatientInfo(string hn)
        {
            PatientInfo ptInfo = new PatientInfo();

            var cmdString = QueryString.GetPatientInfo(hn);
            var dt        = InterSystemsDA.DTBindDataCommand(cmdString, Constants.Chache89);

            ptInfo = Helper.DataTableToPatientInfo(dt);

            return(ptInfo);
        }
예제 #12
0
        public static List <Location> GetAllLocations(string siteCode)
        {
            List <Location> locs = new List <Location>();

            var cmdString = QueryString.GetAllLocations(siteCode);
            var dt        = InterSystemsDA.DTBindDataCommand(cmdString, Constants.Chache89);

            locs = Helper.DataTableToLocationsList(dt);

            return(locs);
        }
예제 #13
0
        public static PatientEpisode GetPatientEpisodes(string hn)
        {
            PatientEpisode ptEpi = new PatientEpisode();

            var cmdString = QueryString.GetPatientEpisodes(hn);
            //var dt = InterSystemsDA.DTBindDataCommand(cmdString, Constants.Chache89);
            var dt = InterSystemsDA.GetDTGetPatientEpisode(hn);

            ptEpi = Helper.DataTablePatientEpisode(dt, hn);

            return(ptEpi);
        }
예제 #14
0
        // Return [hn, episode] with tuple from cache
        public static Tuple <string, string> PatientHnAdm(string bedRowId)
        {
            dt = new DataTable();
            string papmi_No    = "";
            string paadm_Admno = "";

            dt = InterSystemsDA.DataTableBindDataCommand(QueryString.GetPatientIPDQueryString(bedRowId), Constants.Cache89ConnectionString);

            if (dt.Rows.Count > 0)
            {
                papmi_No    = dt.Rows[0]["RN_No"].ToString();
                paadm_Admno = dt.Rows[0]["EpisodeNo"].ToString();
            }

            return(Tuple.Create(papmi_No, paadm_Admno));
        }