//public static internal static bool IsImage(string hn, CacheConnection con) { var dt = InterSystemsDa.DtBindDataCommand(QueryString.GetPatientImage(hn), con); var flag = Helper.CheckPatientImage(dt); return(flag); }
public static List <Allergy> GetAllergys(string hn, CacheConnection con) { var cmdString = QueryString.GetAllergy(hn); var dtAlg = InterSystemsDa.DtBindDataCommand(cmdString, con); var results = Helper.DataTableToAllergy(dtAlg, con); return(results); }
public static Episode GetEpisode(string hn, CacheConnection con) { Episode epi = new Episode(); var dtEpiIn = InterSystemsDa.DtBindDataCommand(QueryString.GetEpisodeInquiry(hn), con); if (dtEpiIn.Rows.Count > 0) { epi = Helper.DataTableToEpisode(dtEpiIn, con); } else { epi.EpisodeInquiry = new List <EpisodeInquiry>(); } return(epi); }
public static Tuple <bool, PatientImage> GetPatientImage(string hn, CacheConnection con) { try { var ptImg = new PatientImage(); var dt = InterSystemsDa.DtBindDataCommand(QueryString.GetPatientImage(hn), con); var isImage = Helper.CheckPatientImage(dt); //ptImg.Image = isImage ? Helper.DataTableToBase64(dt, 500, 500) : ""; return(new Tuple <bool, PatientImage>(isImage, ptImg)); } catch (Exception) { return(new Tuple <bool, PatientImage>(false, new PatientImage())); } }
public static Episode DataTableToEpisode(DataTable dtEpiIn, CacheConnection con) { var epi = new Episode(); var epiInqList = new List <EpisodeInquiry>(); foreach (DataRow row in dtEpiIn.Rows) { var PAADM_ADMNo = row["PAADM_ADMNo"].ToString(); var epiInq = new EpisodeInquiry() { PAADM_ADMNo = PAADM_ADMNo, PAADM_AdmDate = ConvertDate(row["PAADM_AdmDate"].ToString()), PAADM_AdmTime = ToDateTime(row["PAADM_AdmTime"].ToString()).ToString("HH:mm"), CTLOC_Code = row["CTLOC_Code"].ToString(), CTLOC_Desc = row["CTLOC_Desc"].ToString(), CTPCP_Code = row["CTPCP_Code"].ToString(), CTPCP_Desc = row["CTPCP_Desc"].ToString(), PAADM_Type = row["PAADM_Type"].ToString(), PAADM_VisitStatus = row["PAADM_VisitStatus"].ToString(), WARD_Code = row["WARD_Code"].ToString(), WARD_Desc = row["WARD_Desc"].ToString(), ROOM_Code = row["ROOM_Code"].ToString() }; var dtIcd10 = InterSystemsDa.DtBindDataCommand(QueryString.GetIcd10(epiInq.PAADM_ADMNo), con); var dtIcd9 = InterSystemsDa.DtBindDataCommand(QueryString.GetIcd9(epiInq.PAADM_ADMNo), con); epiInq.ICD10 = DataTableToIcd10(dtIcd10); epiInq.ICD9 = DataTableToIcd9(dtIcd9); epiInq.AppConsults = InterSystemsDa.GetApptConsult(PAADM_ADMNo, con); epiInqList.Add(epiInq); } epi.EpisodeInquiry = epiInqList; return(epi); }