public static string GetMedPassHistory(List <string> arr) { JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist(); if (KPIHlp.CVI64(arr[0]) != long.MinValue) { objJMMMedPrescriptionHist.JMBuildID = KPIHlp.CVI64(arr[0]); } if (KPIHlp.CVI64(arr[1]) != long.MinValue) { objJMMMedPrescriptionHist.JMPodID = KPIHlp.CVI64(arr[1]); } if (KPIHlp.CVI64(arr[2]) != long.MinValue) { objJMMMedPrescriptionHist.JMCellID = KPIHlp.CVI64(arr[2]); } if (KPIHlp.CVI64(arr[3]) != Int16.MinValue) { objJMMMedPrescriptionHist.IsActive = KPIHlp.CVI16(arr[3]); } if (KPIHlp.CVI64(arr[4]) != long.MinValue) { objJMMMedPrescriptionHist.JurisID = KPIHlp.CVI32(arr[4]); } if (objJMMMedPrescriptionHist.JMBuildID.HasValue && !objJMMMedPrescriptionHist.JMPodID.HasValue) { objJMMMedPrescriptionHist.JMBuildID = long.MinValue; } DataSet ds = new JMMMedPrescriptionHistBL().GetMedPassHistory(ref objJMMMedPrescriptionHist); System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >(); Dictionary <string, object> row; foreach (DataRow dr in ds.Tables[0].Rows) { row = new Dictionary <string, object>(); foreach (DataColumn col in ds.Tables[0].Columns) { row.Add(col.ColumnName, dr[col]); } rows.Add(row); } return(serializer.Serialize(rows)); }
protected DataSet GetData(bool blnExcel) { DataSet ds = new DataSet(); try { JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist(); objJMMMedPrescriptionHist.JMBuildID = cddBuilding.CodeValue == null ? long.MinValue : KPIHlp.CVI64(cddBuilding.CodeValue); objJMMMedPrescriptionHist.JMPodID = luppod.KPIID; objJMMMedPrescriptionHist.JMCellID = lupcell.KPIID; objJMMMedPrescriptionHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); DateTime Curdate = DateTime.Now; objJMMMedPrescriptionHist.IsActive = chkShowall.Checked ? KPIHlp.CVI16("1") : KPIHlp.CVI16("0"); if (objJMMMedPrescriptionHist.JMBuildID.HasValue && !objJMMMedPrescriptionHist.JMPodID.HasValue) { objJMMMedPrescriptionHist.JMBuildID = long.MinValue; } ds = new JMMMedPrescriptionHistBL().GetMedPassHistory(ref objJMMMedPrescriptionHist); grdMedreqlist.DataSource = ds; grdMedreqlist.DataBind(); if (grdMedreqlist.Rows.Count <= 0 && String.IsNullOrWhiteSpace(hdnAutoLoad.Value)) { ShowMsg(MsgType.Error, FrwkMsg.NO_RECORD_FOUND); } } catch (Exception objError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError); } return(ds); }
protected void LoadData() { try { KPITrace.Debug(TraceWeight.Five, "Getting Prescription History info from JmmMedPresHist DB."); string sCaller = ""; NameValueCollection nvcXMLResponseData = new NameValueCollection(); NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); sCaller = nvcXMLPOSTData.Get("Caller") == null ? string.Empty : nvcXMLPOSTData.Get("Caller"); if (sCaller.Equals("RefillHist")) { string sMode, sActDttm, sBalQuan, sPresID, sRefill, sBalRefill = ""; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sActDttm = nvcXMLPOSTData.Get("ActivityDate") == null ? string.Empty : nvcXMLPOSTData.Get("ActivityDate"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); sBalQuan = nvcXMLPOSTData.Get("BalQuan") == null ? string.Empty : nvcXMLPOSTData.Get("BalQuan"); sRefill = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sBalRefill = nvcXMLPOSTData.Get("RefillBal") == null ? string.Empty : nvcXMLPOSTData.Get("RefillBal"); ///JmmMedPresHist--Adding into prescription History table JmmMedPresHist objJmmMedPresHist = new JmmMedPresHist(); JmmMedPresHistBL objJmmMedPresHistBL = new JmmMedPresHistBL(); objJmmMedPresHist.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmMedPresHist.JurisID = GetPageJuris(); objJmmMedPresHist.MedPresHistID = KPICounter.GetCounterID(objJmmMedPresHist.JurisID); objJmmMedPresHist.ActivityDttm = KPIHlp.CVDttm(sActDttm); objJmmMedPresHist.BalanceQty = KPIHlp.CVI32(sBalQuan); objJmmMedPresHist.DispenseQty = 0; objJmmMedPresHist.FillQty = KPIHlp.CVI32(sRefill); objJmmMedPresHist.IsFill = 1; objJmmMedPresHist.OfficerPFID = State.sPFID; objJmmMedPresHist.PendRefills = KPIHlp.CVI32(sBalRefill); ////Updating Prescription Table on refill. JmmMedPrescribe objMedPres = new JmmMedPrescribe(); JmmMedPrescribeBL objMedPresBL = new JmmMedPrescribeBL(); objMedPres.MedPrescribeID = KPIHlp.CVI64(sPresID); objMedPres.JurisID = GetPageJuris(); objMedPres.CurQuantity = KPIHlp.CVI32(sBalQuan); objMedPres.RefillBal = KPIHlp.CVI16(sBalRefill); if (sMode.Equals("A")) { objJmmMedPresHistBL.Insert(objJmmMedPresHist); objMedPresBL.UpdateBalance(objMedPres); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); nvcXMLResponseData.Add("PFid", objJmmMedPresHist.OfficerPFID.ToString()); } else { objJmmMedPresHistBL.Update(objJmmMedPresHist); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } else if (sCaller.Equals("PrescripUseEnd")) { string sMode, sUseEnd, sComments, sPresID = ""; int result = 0; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sUseEnd = nvcXMLPOSTData.Get("UseEnd") == null ? string.Empty : nvcXMLPOSTData.Get("UseEnd"); sComments = nvcXMLPOSTData.Get("comments") == null ? string.Empty : nvcXMLPOSTData.Get("comments"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPresc.EndedDttm = KPIHlp.CVDttm(sUseEnd); objJmmPresc.PrescribeNotes = sComments; objJmmPresc.JurisID = GetPageJuris(); if (sMode.Equals("C")) { try { result = objJmmPrescBL.UpdateUseEnd(objJmmPresc); } catch (Exception ex) { string exp = ex.Message; } if (result == 1) { nvcXMLResponseData.Add("Success", "1"); } else { nvcXMLResponseData.Add("Success", "0"); } } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } try { KPITrace.Debug(TraceWeight.Five, "Getting Doctor info from JmsDoctor DB."); string sDoctor, sCallertype = ""; string sDrug, sDosage, sPrescribedAmt, sRefills, sGenericAllowed, sNotes, sPresID, sVisitID, sBookID, sMode, sCurBalance = ""; string JurisID = string.Empty; string JMMDentVisitID = string.Empty; string RecType = string.Empty; string JMMMedVisitID = string.Empty; NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); NameValueCollection nvcXMLResponseData = new NameValueCollection(); sCallertype = nvcXMLPOSTData.Get("CallerType") == null ? string.Empty : nvcXMLPOSTData.Get("CallerType"); if (sCallertype.Equals("PrimaryDoctor")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 0; objJmsDoc = objJmsDocBL.SelectDoctor(ref objJmsDoc); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("PrimaryDentist")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 1; objJmsDoc = objJmsDocBL.SelectDentist(objJmsDoc.DoctorID); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("Prescription")) { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sVisitID = nvcXMLPOSTData.Get("VisitId") == null ? string.Empty : nvcXMLPOSTData.Get("VisitId"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sPrescribedAmt.ToString()); //need to change objJmmPresc.cMode = KPIHlp.CVC(sMode); objJmmPresc.IsPersonalProp = 0; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #region else if (sCallertype == "DentistEntryNotes") { JMMDentVisitID = nvcXMLPOSTData.Get("JMMDentVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMDentVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMDentVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion #region Medical Visit Facility Notes else if (sCallertype == "MedicalVisitNotes") { JMMMedVisitID = nvcXMLPOSTData.Get("JMMMedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMMedVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMMedVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion else { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sCurBalance = nvcXMLPOSTData.Get("CurBalance") == null ? string.Empty : nvcXMLPOSTData.Get("CurBalance"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); sVisitID = nvcXMLPOSTData.Get("MedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("MedVisitID"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sCurBalance.ToString()); //need to change if (!String.IsNullOrEmpty(sMode)) { objJmmPresc.cMode = KPIHlp.CVC(sMode); } objJmmPresc.IsPersonalProp = 1; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } }
protected void Page_Load(object sender, EventArgs e) { cmdAdd.Attributes.Add("OnClick", "return fn_ManipulationVitalTab();"); cmdClear.Attributes.Add("OnClick", "return fn_CancelVitals();"); cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';"); cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); if (Request.QueryString.Get("hdnJurisID") != null && Request.QueryString.Get("hdnJurisID") != string.Empty) { hdnJurisId.Value = Request.QueryString.Get("hdnJurisID").ToString(); JurisID = KPIHlp.CVI32(hdnJurisId.Value); hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value)); } if (Request.QueryString.Get("BookingID") != null && Request.QueryString.Get("BookingID") != string.Empty) { hdnBookingID.Value = Request.QueryString.Get("BookingID").ToString(); JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); } if (Request.QueryString.Get("JMMedicalHistID") != null && Request.QueryString.Get("JMMedicalHistID") != string.Empty) { hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID").ToString(); JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); } if (Request.QueryString.Get("Mode") != null && Request.QueryString.Get("Mode") != string.Empty) { hdnMode.Value = Request.QueryString.Get("Mode").ToString(); } if (Request.QueryString.Get("Status") != null && Request.QueryString.Get("Status") != string.Empty) { hdnStatus.Value = Request.QueryString.Get("Status").ToString(); Status = KPIHlp.CVI16(hdnStatus.Value); } if (Status == 1) { tdstatusbar.Style.Remove("display"); } else { tdstatusbar.Style.Add("display", "none"); } if (State.sJurisID == KPIHlp.CVI32(hdnJurisId.Value)) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } if (!IsPostBack) { if (JMMedicalHistID != Int64.MinValue && JMBookingID != Int64.MinValue && JurisID != Int32.MinValue) { Inquiry(JMMedicalHistID, JMBookingID, JurisID, Status); } } }
public JmmMedVitalList ReadScr() { JmmMedVitalList objJmmMedVitalList = null; JMMMedVitals objJmmMedVitals = null; try { objJmmMedVitalList = new JmmMedVitalList(); KPITrace.Debug(TraceWeight.Five, "Reading Data from Medical vitals Scrn"); for (int iRowCount = 0; iRowCount < grdMedicalVital.Rows.Count; iRowCount++) { if (grdMedicalVital.IsActiveRow(iRowCount)) { objJmmMedVitals = new JMMMedVitals(); objJmmMedVitals.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); objJmmMedVitals.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); objJmmMedVitals.JurisID = KPIHlp.CVI32(hdnJurisId.Value); objJmmMedVitals.Status = KPIHlp.CVI16(hdnStatus.Value); objJmmMedVitals.cMode = grdMedicalVital.GetChar(iRowCount, "KPIMode"); objJmmMedVitals.VitalDttm = grdMedicalVital.GetDateTime(iRowCount, "VitalDttm"); objJmmMedVitals.VitalPFID = grdMedicalVital.GetLong(iRowCount, "VitalPFID"); if (grdMedicalVital.GetInt(iRowCount, "Height") != Int32.MinValue) { objJmmMedVitals.Height = grdMedicalVital.GetInt(iRowCount, "Height"); } if (grdMedicalVital.GetDecimal(iRowCount, "Weight") != Decimal.MinValue) { objJmmMedVitals.Weight = grdMedicalVital.GetDecimal(iRowCount, "Weight"); if (grdMedicalVital.GetShort(iRowCount, "WeightType") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "WeightType") > 0) { objJmmMedVitals.WeightType = grdMedicalVital.GetShort(iRowCount, "WeightType"); } if (grdMedicalVital.GetShort(iRowCount, "WeightStatus") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "WeightStatus") > 0) { objJmmMedVitals.WeightStatus = grdMedicalVital.GetShort(iRowCount, "WeightStatus"); } } if (grdMedicalVital.GetInt(iRowCount, "Respiration") != Int32.MinValue) { objJmmMedVitals.Respiration = grdMedicalVital.GetInt(iRowCount, "Respiration"); } if (grdMedicalVital.GetDecimal(iRowCount, "Temperature") != Decimal.MinValue) { objJmmMedVitals.Temperature = grdMedicalVital.GetDecimal(iRowCount, "Temperature"); if (grdMedicalVital.GetShort(iRowCount, "TemperatureType") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "TemperatureType") > 0) { objJmmMedVitals.TemperatureType = grdMedicalVital.GetShort(iRowCount, "TemperatureType"); } } if (grdMedicalVital.GetInt(iRowCount, "SpoxAtRest") != Int32.MinValue) { objJmmMedVitals.SpoxAtRest = grdMedicalVital.GetInt(iRowCount, "SpoxAtRest"); } if (grdMedicalVital.GetInt(iRowCount, "SpoxActivity") != Int32.MinValue) { objJmmMedVitals.SpoxActivity = grdMedicalVital.GetInt(iRowCount, "SpoxActivity"); } if (grdMedicalVital.GetInt(iRowCount, "PulseApical") != Int32.MinValue) { objJmmMedVitals.PulseApical = grdMedicalVital.GetInt(iRowCount, "PulseApical"); } if (grdMedicalVital.GetInt(iRowCount, "PulseRadial") != Int32.MinValue) { objJmmMedVitals.PulseRadial = grdMedicalVital.GetInt(iRowCount, "PulseRadial"); } if (grdMedicalVital.GetLong(iRowCount, "KPIID") > 0) { objJmmMedVitals.JMMedVitaltID = grdMedicalVital.GetLong(iRowCount, "KPIID"); } else { objJmmMedVitals.JMMedVitaltID = KPICounter.GetCounterID(objJmmMedVitals.JurisID.Value); objJmmMedVitals.cMode = 'A'; } if ((objJmmMedVitals.PulseApical != null && objJmmMedVitals.PulseApical != Int32.MinValue) || (objJmmMedVitals.PulseRadial != null && objJmmMedVitals.PulseRadial != Int32.MinValue)) { if (grdMedicalVital.GetShort(iRowCount, "PulseRhythm") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "PulseRhythm") > 0) { objJmmMedVitals.PulseRhythm = grdMedicalVital.GetShort(iRowCount, "PulseRhythm"); } } else { objJmmMedVitals.PulseRhythm = 0; } if (!String.IsNullOrWhiteSpace(grdMedicalVital.GetString(iRowCount, "BloodPressure"))) { objJmmMedVitals.BloodPressure = grdMedicalVital.GetString(iRowCount, "BloodPressure"); if (grdMedicalVital.GetShort(iRowCount, "BloodPressureType") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "BloodPressureType") > 0) { objJmmMedVitals.BloodPressureType = grdMedicalVital.GetShort(iRowCount, "BloodPressureType"); } if (grdMedicalVital.GetShort(iRowCount, "BloodPressureStatus") != Int16.MinValue && grdMedicalVital.GetShort(iRowCount, "BloodPressureStatus") > 0) { objJmmMedVitals.BloodPressureStatus = grdMedicalVital.GetShort(iRowCount, "BloodPressureStatus"); } } if (!String.IsNullOrWhiteSpace(grdMedicalVital.GetString(iRowCount, "BloodPressureMax"))) { objJmmMedVitals.BloodPressureMax = grdMedicalVital.GetString(iRowCount, "BloodPressureMax"); } if (!String.IsNullOrWhiteSpace(grdMedicalVital.GetString(iRowCount, "CmtsNotes"))) { objJmmMedVitals.Cmts = System.Web.HttpUtility.HtmlDecode(grdMedicalVital.GetString(iRowCount, "CmtsNotes")); if (!String.IsNullOrEmpty(objJmmMedVitals.Custom1)) { if (objJmmMedVitals.Cmts.Length <= 400) { objJmmMedVitals.Cmts = objJmmMedVitals.Cmts.Substring(0, objJmmMedVitals.Cmts.Length); } else { objJmmMedVitals.Cmts = objJmmMedVitals.Cmts.Substring(0, txtNotes.MaxLength); } } } objJmmMedVitalList.Add(objJmmMedVitals); } } return(objJmmMedVitalList); } catch (Exception objError) { throw objError; } finally { objJmmMedVitals = null; objJmmMedVitalList = null; } }