//---------------------------------------------------------- public string GetEncounterIntakePatientID( string strEncounterID, long lEncounterIntakeID) { string strPatientID = ""; //add params for the DB call in paramaters //these will always be passed in to all sp calls CDataParameterList pList = ItemList(); pList.AddInputParameter("pi_vEncounterID", strEncounterID); pList.AddInputParameter("pi_nEncounterIntakeID", lEncounterIntakeID); pList.AddOutputParameter("po_vPatientID", strPatientID); //execute the stored procedure m_DBConn.ExecuteOracleSP("PCK_ENCOUNTER_INTAKE.getIntakePatientID", pList, out m_lErrorStatus, out m_strErrorComment); // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (m_lErrorStatus == 0) { CDataParameter param = new CDataParameter(); param = pList.GetItemByName("po_vPatientID"); if (param != null) { strPatientID = param.StringParameterValue; } } ErrorHandler(); return strPatientID; }
//---------------------------------------------------------- // returns the current treatment ID - //---------------------------------------------------------- public bool GetCurrentTreatmentID(out long lTreatmentID) { lTreatmentID = 0; //add params for the DB call in paramaters //these will always be passed in to all sp calls CDataParameterList pList = ItemList(); pList.AddInputParameter("pi_vPatientID", m_strPatientID); pList.AddOutputParameter("po_nTreatmentID", lTreatmentID); //execute the stored procedure if (m_DBConn.ExecuteOracleSP("PCK_TREATMENT.GetCurrentTreatmentID", pList, out m_lErrorStatus, out m_strErrorComment) == false) { return(ErrorHandler()); } CDataParameter paramValue = pList.GetItemByName("po_nTreatmentID"); lTreatmentID = paramValue.LongParameterValue; return(true); }
//---------------------------------------------------------- public bool GetEncounterIntakeAltLang(string strEncounterID, long lEncounterIntakeID) { long lOutLang = 0; CDataParameterList pList = ItemList(); pList.AddInputParameter("pi_vEncounterID", strEncounterID); pList.AddInputParameter("pi_nEncounterIntakeID", lEncounterIntakeID); pList.AddOutputParameter("po_nOutAltLang", lOutLang); //execute the stored procedure m_DBConn.ExecuteOracleSP("PCK_ENCOUNTER_INTAKE.getIntakeAltLang", pList, out m_lErrorStatus, out m_strErrorComment); // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (m_lErrorStatus == 0) { CDataParameter param = new CDataParameter(); param = pList.GetItemByName("po_nOutAltLang"); if (param != null) { lOutLang = param.LongParameterValue; } if (lOutLang > 0) { return true; } } return ErrorHandler(); }
//---------------------------------------------------------- // public bool GetEncounterIDFromForModule(Int32 nModuleID, string strPatientID, long lTreatmentID, out string strEncounterID) public bool GetEncounterIDFromForModule(long lTreatmentID, out string strEncounterID ) { strEncounterID = ""; //add params for the DB call in paramaters //these will always be passed in to all sp calls CDataParameterList pList = ItemList(); pList.AddInputParameter("pi_nModuleID", m_nMID); pList.AddInputParameter("pi_vPatientID", m_strPatientID); pList.AddInputParameter("pi_nTreatmentID", lTreatmentID); pList.AddOutputParameter("po_vEncounterID", strEncounterID); //execute the stored procedure m_DBConn.ExecuteOracleSP("PCK_ENCOUNTER_INTAKE.GetEncounterIDFromModule", pList, out m_lErrorStatus, out m_strErrorComment); if(m_lErrorStatus > 0) { return ErrorHandler(); } CDataParameter paramValue = pList.GetItemByName("po_vEncounterID"); strEncounterID = paramValue.StringParameterValue; m_strEncounterID = strEncounterID; return true; }
public bool InsertPage(long lAuthorID, string strTitle, string strContents, long lStatus, out long lPageID) { //status info long lStatusCode = -1; string strStatusComment = ""; lPageID = -1; //create a new parameter list with standard params from basemstr CDataParameterList plist = new CDataParameterList(m_BaseMstr); /* * pi_nAuthorID in number, * pi_vTitle in varchar2, * pi_cContents in clob, * pi_nStatus in number, * po_nPageID out number, */ //add params for the DB stored procedure call plist.AddInputParameter("pi_nAuthorID", lAuthorID); plist.AddInputParameter("pi_vTitle", strTitle); plist.AddInputParameterCLOB("pi_cContents", strContents); plist.AddInputParameter("pi_nStatus", lStatus); plist.AddOutputParameter("po_nPageID", lPageID); //Execute Stored Procedure Call m_BaseMstr.DBConn.ExecuteOracleSP("PCK_CMS.InsertPage", plist, out lStatusCode, out strStatusComment); //set the base master status code and status for display m_BaseMstr.StatusCode = lStatusCode; m_BaseMstr.StatusComment = strStatusComment; // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { CDataParameter paramValue = plist.GetItemByName("po_nPageID"); lPageID = paramValue.LongParameterValue; return(true); } return(false); }
//INSERT DIAGNOSIS --------------------------------------------------- public bool InsertDiagnosis(BaseMaster BaseMstr, string strPatientID, string strEncounterID, long lTreatmentID, // long lDiagnosisID, long lSpecifierID, string strAxis3Text, out long lNewProblemID) { lNewProblemID = -1; //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list with standard params from basemstr CDataParameterList pList = new CDataParameterList(BaseMstr); pList.AddInputParameter("pi_vPatientID", strPatientID); pList.AddInputParameter("pi_vEncounterID", strEncounterID); pList.AddInputParameter("pi_nTreatmentID", lTreatmentID); // pList.AddInputParameter("pi_nDiagnosisID", lDiagnosisID); pList.AddInputParameter("pi_nSpecifierID", lSpecifierID); pList.AddInputParameter("pi_vAxis3Text", strAxis3Text); pList.AddOutputParameter("po_nProblemID", lNewProblemID); //Execute Oracle stored procedure BaseMstr.DBConn.ExecuteOracleSP("PCK_DIAGNOSIS.InsertDiagnosis", pList, out lStatusCode, out strStatusComment); //set the base master status code and status for display BaseMstr.StatusCode = lStatusCode; BaseMstr.StatusComment = strStatusComment; if (lStatusCode == 0) { CDataParameter paramValue = pList.GetItemByName("po_nProblemID"); lNewProblemID = paramValue.LongParameterValue; return(true); } else { return(false); } }
public bool InsertTemplate(BaseMaster BaseMstr, long lSOAPsectID, string strName, string strTemplateText, long lGroupID, out long lTemplateID) { lTemplateID = 0; //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list with standard params from basemstr CDataParameterList plist = new CDataParameterList(BaseMstr); //add params for the DB stored procedure call plist.AddInputParameter("pi_nSOAPsectID", lSOAPsectID); plist.AddInputParameter("pi_vTemplateName", strName); plist.AddInputParameterCLOB("pi_vTemplateText", strTemplateText); plist.AddInputParameter("pi_nTempGroupID", lGroupID); //long lFXUserID = -1; plist.AddOutputParameter("po_nTemplateID", lTemplateID); BaseMstr.DBConn.ExecuteOracleSP("PCK_TEMPLATE.InsertTemplate", plist, out lStatusCode, out strStatusComment); //set the base master status code and status for display BaseMstr.StatusCode = lStatusCode; BaseMstr.StatusComment = strStatusComment; // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { CDataParameter paramValue = plist.GetItemByName("po_nTemplateID"); lTemplateID = paramValue.LongParameterValue; BaseMstr.StatusComment = "Template - Updated. "; return(true); } return(false); }
/// <summary> /// gets a cached session value from the database. /// stored encrypted and more secure then an asp.net session var /// </summary> /// <param name="strKey"></param> /// <param name="strKeyValue"></param> /// <returns></returns> public bool GetSessionValue(string strKey, out string strKeyValue) { strKeyValue = ""; //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list CDataParameterList pList = new CDataParameterList(); //in paramaters //these will always be passed in to all sp calls pList.AddParameter("pi_vDBSessionID", DBSessionID, ParameterDirection.Input); pList.AddParameter("pi_vWebSessionID", ASPSessionID, ParameterDirection.Input); pList.AddParameter("pi_vSessionClientIP", ClientIP, ParameterDirection.Input); pList.AddParameter("pi_nUserID", FXUserID, ParameterDirection.Input); // pList.AddParameter("pi_vKey", strKey, ParameterDirection.Input); pList.AddParameter("po_vKeyValue", strKeyValue, ParameterDirection.Output); // //execute the stored procedure DBConn.ExecuteOracleSP("PCK_FX_SEC.GetSessionValue", pList, out lStatusCode, out strStatusComment); // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { CDataParameter paramValue = pList.GetItemByName("po_vKeyValue"); strKeyValue = paramValue.StringParameterValue; return(true); } strKeyValue = ""; return(false); }
public bool SendMessage(string strRecipients, string strSubject, string strBody, out long lMessageID) { //status info long lStatusCode = -1; string strStatusComment = ""; lMessageID = -1; //create a new parameter list with standard params from basemstr CDataParameterList plist = new CDataParameterList(m_BaseMstr); //add params for the DB stored procedure call plist.AddInputParameter("pi_vKey", m_BaseMstr.Key); plist.AddInputParameter("pi_vRecipients", strRecipients); plist.AddInputParameter("pi_vSubject", strSubject); plist.AddInputParameterCLOB("pi_clobBody", strBody); plist.AddOutputParameter("po_nMessageID", lMessageID); //Execute Stored Procedure Call m_BaseMstr.DBConn.ExecuteOracleSP("PCK_MESSAGES.SendMessage", plist, out lStatusCode, out strStatusComment); //set the base master status code and status for display m_BaseMstr.StatusCode = lStatusCode; m_BaseMstr.StatusComment = strStatusComment; // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { CDataParameter paramValue = plist.GetItemByName("po_nMessageID"); lMessageID = paramValue.LongParameterValue; return(true); } return(false); }
//---------------------------------------------------------- //public bool NewEncounterIntake(Int32 lModuleID, bool bAltLang, string strPatientID, string strEncounterID, out int nEncounterIntakeID) public bool NewEncounterIntake(bool bAltLang, out int nEncounterIntakeID) { nEncounterIntakeID = 0; long lOutAltLang = 0; if (bAltLang) { lOutAltLang = 1; } else { lOutAltLang = 0; } //add params for the DB call in paramaters //these will always be passed in to all sp calls CDataParameterList pList = ItemList(); pList.AddInputParameter("pi_nModuleID", m_nMID); pList.AddInputParameter("pi_vEncounterID", m_strEncounterID); pList.AddInputParameter("pi_nAltLang", lOutAltLang); pList.AddOutputParameter("po_nEncounterIntakeID", nEncounterIntakeID); //execute the stored procedure m_DBConn.ExecuteOracleSP("PCK_ENCOUNTER_INTAKE.NewEncounterIntake", pList, out m_lErrorStatus, out m_strErrorComment); if (m_lErrorStatus > 0) { return ErrorHandler(); } CDataParameter paramValue = pList.GetItemByName("po_nEncounterIntakeID"); nEncounterIntakeID = (int) paramValue.LongParameterValue; m_lEncounterIntakeID = nEncounterIntakeID; return true; }
public bool InsertReferralClinic(BaseMaster BaseMstr, string strReferralDesc, string strReferralText, //Not Needed Now string strPersonContacted, string strProviderName, string strAddress, string strCity, string strStateID, string strPostalCode, string strPhone, string strFax, //Not Needed Now long lReleaseSigned, out long lReferralID ) { lReferralID = -1; //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list with standard params from basemstr CDataParameterList plist = new CDataParameterList(BaseMstr); //add params for the DB stored procedure call plist.AddInputParameter("pi_vReferralDesc", strReferralDesc); plist.AddInputParameter("pi_vReferralText", strReferralText); //Not Needed Now plist.AddInputParameter("pi_vPersonContacted", strPersonContacted); plist.AddInputParameter("pi_vProviderName", strProviderName); plist.AddInputParameter("pi_vAddress", strAddress); plist.AddInputParameter("pi_vCity", strCity); plist.AddInputParameter("pi_nStateID", strStateID); plist.AddInputParameter("pi_vPostalCode", strPostalCode); plist.AddInputParameter("pi_vPhone", strPhone); plist.AddInputParameter("pi_vFax", strFax); //Not Needed Now plist.AddInputParameter("pi_nReleaseSigned", lReleaseSigned); plist.AddOutputParameter("po_nReferralID", lReferralID); //get a dataset from the sp call todo change call to executeSP and use connection to //switch on type and call correct code BaseMstr.DBConn.ExecuteOracleSP("PCK_REFERRAL_CLINIC.InsertReferralClinic", plist, out lStatusCode, out strStatusComment); //set the base master status code and status for display BaseMstr.StatusCode = lStatusCode; BaseMstr.StatusComment = strStatusComment; CDataParameter parmReferralID = plist.GetItemByName("po_nReferralID"); lReferralID = parmReferralID.LongParameterValue; // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { BaseMstr.StatusComment = "Referral Clinic - Saved. "; return(true); } return(false); }