Exemplo n.º 1
0
        public void Move_Change_Log_Transactions(string group_record)
        {
            List <SQLParam> parms = new List <SQLParam>();

            parms.Add(SQLParam.GetParam("@group_record", group_record));
            _stageProvider.ExecuteNonQuery("SYNC_Move_EtlChangeLog_Stage", parms);
        }
Exemplo n.º 2
0
        private bool Keyword_Map_Subscriber_Resident()
        {
            bool isMapped = true;

            try
            {
                _sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@locdef", _locationDef));
                this._sqlParms.Add(SQLParam.GetParam("@resdef", _residentDef));
                this._sqlParms.Add(SQLParam.GetParam("@subscriber", "-1"));

                _Subscriber_ID = _stageProvider.ExecuteScalar <string>("SYNC_Map_Subscriber_Resident", _sqlParms);

                if (_Subscriber_ID == "-1")
                {
                    isMapped = false;
                }
            }
            catch (Exception ex)
            {
                this.EntityMessage(string.Format("Keyword_Map_Subscriber_Resident error: {0} on resident_def {1}.", ex.Message, _residentDef.ToString()), "ERROR");
                isMapped = false;
            }

            //this.EntityMessage(string.Format("Keyword_Map_Subscriber_Resident is_mapped: {0} on resident_def {1}.", isMapped.ToString(), _residentDef.ToString()));
            return(isMapped);
        }
Exemplo n.º 3
0
        bool Map_Subscriber()
        {
            bool isMapped = true;

            try
            {
                _sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@locdef", this._locationDef));
                this._sqlParms.Add(SQLParam.GetParam("@resdef", this._residentDef));
                this._sqlParms.Add(SQLParam.GetParam("@subscriber", "-1"));
                _Subscriber_ID = _stageProvider.ExecuteScalar <string>("SYNC_Map_Subscriber_Resident", _sqlParms);

                if (_Subscriber_ID != "-1")
                {
                    this.EntityMessage(string.Format("Subscriber Id {0} found for call_def {1}", this._Subscriber_ID, this._call_def), "INFO");
                }
                else
                {
                    this.EntityMessage(string.Format("No Subscriber Id found for call_def {0}", this._call_def), "INFO");
                    isMapped = false;
                }
            }
            catch (Exception ex)
            {
                isMapped = false;
                this.EntityMessage(string.Format("Failed to map subscriber for call_def {0}. Error: {1}", _dataToMapp["call_def"].ToString(), ex.Message), "ERROR");
            }

            return(isMapped);
        }
Exemplo n.º 4
0
        private bool Subscriber_Medical_Info_Lookup()
        {
            bool isMapped = true;

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@subscriber_ID", _Subscriber_ID));
                _sqlParms.Add(SQLParam.GetParam("@id", _Code));
                _sqlParms.Add(SQLParam.GetParam("@type", _type));
                _SubscriberMedicalInfo = _stageProvider.ExecuteScalar <int>("SYNC_Subscriber_Medical_Info_Lookup", _sqlParms);
                if (_SubscriberMedicalInfo == -1)
                {
                    isMapped = false;
                }
            }
            catch (Exception ex)
            {
                this.EntityMessage(string.Format("Map_SubMedInfo_To_Keyword error: {0} on resident_def {1}, keyword_ref {2}.", ex.Message, _residentDef.ToString(), _keyword_ref.ToString()), "INFO");
                isMapped = false;
            }

            //this.EntityMessage(string.Format("Subscriber_Medical_Info_Lookup is_mapped {0} for Subscriber_ID {1} Type {2} Code {3}.",isMapped.ToString(),_Subscriber_ID,_type,_Code));
            return(isMapped);
        }
Exemplo n.º 5
0
        public void ProcessDataFlow()
        {
            bool processrelation = this.Map_Contact_Relation_Fields();

            if (processrelation)
            {
                try
                {
                    _sqlParms = new List <SQLParam>();
                    this._sqlParms.Add(SQLParam.GetParam("@process_type", "PNC"));
                    this._sqlParms.Add(SQLParam.GetParam("@subscriber", "-1"));
                    this._sqlParms.Add(SQLParam.GetParam("@subscriber_responder", "-1"));
                    this._sqlParms.Add(SQLParam.GetParam("@location_ref", this._locationDef.ToString()));
                    this._sqlParms.Add(SQLParam.GetParam("@resident_ref", this._residentDef.ToString()));
                    this._sqlParms.Add(SQLParam.GetParam("@contact_ref", this._contact_def.ToString()));
                    this._sqlParms.Add(SQLParam.GetParam("@type_ref", this._contact_type_ref.ToString()));
                    this._sqlParms.Add(SQLParam.GetParam("@priority", this._priority));

                    _stageProvider.ExecuteNonQuery("SYNC_Process_ContactRelation", _sqlParms);
                    this.EntityMessage(string.Format("Processed contact relation for contact_def {0}, relation_def {1}", _contact_def.ToString(), _relation_def), "INFO");
                }
                catch (Exception ex)
                {
                    this.EntityMessage(string.Format("Unable to process contact relation for contact_def {0}, relation_def {1}", _contact_def, _relation_def), "ERROR");
                }
            }
        }
Exemplo n.º 6
0
        private bool Map_Responder_Contact()
        {
            string msg;
            bool   isMatch = false;

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@contact_def", _contact_def));
                // DataRow drAgency = _stageProvider.GetData("SYNC_Map_Responder_Contact", _sqlParms).Rows[0];

                DataTable dtMapContact = _stageProvider.GetData("SYNC_Map_Responder_Contact", _sqlParms);
                if (dtMapContact.Rows.Count > 0)
                {
                    DataRow dr = dtMapContact.Rows[0];
                    _SubscriberResponder_ID = dr["SubscriberResponder_ID"].Parse <int>();
                    _Subscriber_ID          = dr["Subscriber_ID"].ToString();

                    isMatch = true;
                    EntityMessage(string.Format("SubscriberResponder Id {0} found for contact_def {1}", _SubscriberResponder_ID.ToString(), _contact_def.ToString()), "INFO");
                }
                else
                {
                    EntityMessage(string.Format("No mapping found for contact_def {0}. Row Count: {1}", _contact_def.ToString(), dtMapContact.Rows.Count.ToString()), "INFO");
                }
            }
            catch (Exception ex)
            {
                EntityMessage(string.Format("Map_Responder_Contact had a fatal error mapping contact_def {0}. ERROR: {1}", _contact_def.ToString(), ex.Message), "ERROR");
            }


            return(isMatch);
        }
Exemplo n.º 7
0
        public override void ProcessDataDelete()
        {
            bool isMapped = true;

            // map the fields
            try
            {
                _contact_def = this._dataToMapp["contact_def"].Parse <int>();
                //_contact_type_ref = this._dataToMapp["contact_type_ref"].Parse<int>();
                _residentDef = this._dataToMapp["resident_ref"].Parse <int>();
            }
            catch (Exception ex)
            {
                this.EntityMessage(string.Format("Failed to map contact_def {0} in Contact.ProcessDataDelete. ERROR: {1}", _contact_def.ToString(), ex.Message), "ERROR");
                isMapped = false;
            }

            if (isMapped)
            {
                try
                {
                    _sqlParms = new List <SQLParam>();
                    _sqlParms.Add(SQLParam.GetParam("@contact_def", _contact_def));
                    _sqlParms.Add(SQLParam.GetParam("@resident_def", _residentDef));
                    _stageProvider.ExecuteNonQuery("SYNC_Process_Responder_Delete", _sqlParms);
                    this.EntityMessage(string.Format("Processed responder delete for contact_def {0}", _contact_def), "INFO");
                }
                catch (Exception ex)
                {
                    this.EntityMessage(string.Format("Unable to process responder delete for contact_def: {0}. ERROR: {1}", _contact_def.ToString(), ex.Message), "ERROR");
                }
            }
        }
Exemplo n.º 8
0
        private string PNC_EPEC_MAP()
        {
            string processType = "INSERT";

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@locdef", _locationDef));
                _sqlParms.Add(SQLParam.GetParam("@resdef", _residentDef));
                _sqlParms.Add(SQLParam.GetParam("@subscriber", "-1"));
                //_Subscriber_ID = _stageProvider.ExecuteScalar<string>("SYNC_Map_Subscriber_Location", _sqlParms);
                DataRow dr = _stageProvider.ExecuteDataSet("SYNC_Map_Subscriber_Location", _sqlParms).Tables[0].Rows[0];
                _Subscriber_ID   = dr["Subscriber_ID"].ToString();
                _MasterReference = dr["MasterReference"].ToString();

                if (_Subscriber_ID != "-1")
                {
                    processType = "UPDATE";
                    EntityMessage(string.Format("Subscriber Id {0} found for location_def {1}", _Subscriber_ID, _locationDef.ToString()), "INFO");
                }
                else
                {
                    processType = "INSERT";
                    EntityMessage(string.Format("No Subscriber Id found for location_def {0}", _locationDef.ToString()), "INFO");
                }
            }
            catch (Exception ex)
            {
                processType = "NONE";
                EntityMessage(string.Format("Failed to map subsciber to location for location_def {0}. Error: {1}", _locationDef.ToString(), ex.Message), "ERROR");
            }


            return(processType);
        }
Exemplo n.º 9
0
 public void Update_Sync_Step(string step_name)
 {
     try
     {
         List <SQLParam> parms = new List <SQLParam>();
         parms.Add(SQLParam.GetParam("@step_name", step_name));
         _stageProvider.ExecuteNonQuery("SYNC_Update_Sync_Step", parms);
     }
     catch { }
 }
Exemplo n.º 10
0
 public void Log_Service_Message(string log_type, string message)
 {
     try
     {
         List <SQLParam> parms = new List <SQLParam>();
         parms.Add(SQLParam.GetParam("@service_name", "Kshema_PNC_Sync"));
         parms.Add(SQLParam.GetParam("@log_type", log_type));
         parms.Add(SQLParam.GetParam("@message", message));
         _stageProvider.ExecuteNonQuery("SYNC_Insert_Sync_Log", parms);
     }
     catch { }
 }
Exemplo n.º 11
0
 protected void LogServiceMessage(string serviceName, string log_type, string message)
 {
     try
     {
         List <SQLParam> parms = new List <SQLParam>();
         parms.Add(SQLParam.GetParam("@service_name", serviceName));
         parms.Add(SQLParam.GetParam("@log_type", log_type));
         parms.Add(SQLParam.GetParam("@message", message));
         _stageProvider.ExecuteNonQuery("SYNC_Insert_Sync_Log", parms);
     }
     catch { }
 }
Exemplo n.º 12
0
 private void Save_Subscriber_Language(string command)
 {
     try
     {
         _sqlParms = new List <SQLParam>();
         _sqlParms.Add(SQLParam.GetParam("@subscriberId", _Subscriber_ID));
         _sqlParms.Add(SQLParam.GetParam("@type", _type));
         _sqlParms.Add(SQLParam.GetParam("@code", _Code));
         _sqlParms.Add(SQLParam.GetParam("@command", command));
         _stageProvider.ExecuteNonQuery("SYNC_Save_SubscriberLanguage", _sqlParms);
     }
     catch { }
 }
Exemplo n.º 13
0
        public void Save_Transaction_Record(string group_record, string entity, string transaction, string err_message)
        {
            try
            {
                List <SQLParam> parms = new List <SQLParam>();
                parms.Add(SQLParam.GetParam("@group_record", group_record));
                parms.Add(SQLParam.GetParam("@entity", entity));
                parms.Add(SQLParam.GetParam("@transaction", transaction));
                parms.Add(SQLParam.GetParam("@err_message", err_message));

                _stageProvider.ExecuteNonQuery("SYNC_Insert_Transaction_Log", parms);
            }
            catch { }
        }
Exemplo n.º 14
0
        protected void LogServiceMessage(string log_type, string message)
        {
            try
            {
                Console.WriteLine(string.Format("{0}    {1}", DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss"), message));

                List <SQLParam> parms = new List <SQLParam>();
                parms.Add(SQLParam.GetParam("@service_name", "Agency_Import"));
                parms.Add(SQLParam.GetParam("@log_type", log_type));
                parms.Add(SQLParam.GetParam("@message", message));
                _stageProvider.ExecuteNonQuery("SYNC_Insert_Sync_Log", parms);
            }
            catch { }
        }
Exemplo n.º 15
0
 private void Delete_Resident_Directions()
 {
     try
     {
         _sqlParms = new List <SQLParam>();
         _sqlParms.Add(SQLParam.GetParam("@entity_ref", _script_entity_ref));
         _stageProvider.ExecuteNonQuery("SYNC_Delete_Resident_Directions", _sqlParms);
         this.EntityMessage(string.Format("Deleted resident direction for resident_def {0}", _script_entity_ref), "INFO");
     }
     catch (Exception ex)
     {
         this.EntityMessage(string.Format("Unable to delete resident direction for resident_def: {0}. ERROR: {1}", _script_entity_ref.ToString(), ex.Message), "ERROR");
     }
 }
Exemplo n.º 16
0
 private void _Process_Delete_Resonder_Contact_Note()
 {
     try
     {
         _sqlParms = new List <SQLParam>();
         _sqlParms.Add(SQLParam.GetParam("@entity_ref", _entity_ref));
         _stageProvider.ExecuteNonQuery("SYNC_Delete_ResponderContact_Note", _sqlParms);
         this.EntityMessage(string.Format("Processed responder/contact note for note_def {0}", _entity_ref.ToString()), "INFO");
     }
     catch (Exception ex)
     {
         this.EntityMessage(string.Format("Unable to delete responder/contact notes for note_def: {0}, entity_type: {1}. ERROR: {2}", _entity_ref.ToString(), _entity_type.ToString(), ex.Message), "ERROR");
     }
 }
Exemplo n.º 17
0
 private void Process_Resident_Epec_Directions()
 {
     try
     {
         _sqlParms = new List <SQLParam>();
         _sqlParms.Add(SQLParam.GetParam("@note_entity", _note_entity));
         _sqlParms.Add(SQLParam.GetParam("@note_text", _note_text));
         _stageProvider.ExecuteNonQuery("SYNC_Process_Resident_NearestIntersection", _sqlParms);
         this.EntityMessage(string.Format("Processed resident_epec direction for note_entity {0}", _note_entity.ToString()), "INFO");
     }
     catch (Exception ex)
     {
         this.EntityMessage(string.Format("Unable to process resident_epec direction for note_entity: {0}", _note_entity.ToString()), "ERROR");
     }
 }
Exemplo n.º 18
0
        bool Can_Sync_Call_History()
        {
            bool can_sync = false;

            try
            {
                _sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@subscriber_id", this._Subscriber_ID));
                can_sync = _stageProvider.ExecuteScalar <bool>("SYNC_Can_Sync_Call_History", _sqlParms);
            }
            catch { }


            return(can_sync);
        }
Exemplo n.º 19
0
        bool Subscriber_Has_Keyword()
        {
            bool has_keyword = false;

            try
            {
                this._sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@resident_def", this._resident_ref));
                this._sqlParms.Add(SQLParam.GetParam("@keyword_def", this._keyword_def));
                this._sqlParms.Add(SQLParam.GetParam("@keyword_no", this._keyword_num));
                has_keyword = this._stageProvider.ExecuteScalar <bool>("SYNC_Subscriber_Has_Keyword", this._sqlParms);
            }
            catch {}

            return(has_keyword);
        }
Exemplo n.º 20
0
        protected bool Check_Agency_Mapping(string agency_id)
        {
            bool ismapped = false;

            try
            {
                this._sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@agency_id", agency_id));
                ismapped = _stageProvider.ExecuteDataSet("SYNC_Is_Mapped_Agency ", this._sqlParms).Tables[0].Rows[0]["Is_Mapped"].Parse <bool>();
            }
            catch (Exception ex)
            {
                EntityMessage(string.Format("Fatal exception in Check_Agency_Mapping for agency {0}. Error: {1}", agency_id, ex.Message), "ERROR");
            }

            return(ismapped);
        }
Exemplo n.º 21
0
        private void Insert_Keyword_To_Queue()
        {
            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@subscriber_ID", _Subscriber_ID));
                _sqlParms.Add(SQLParam.GetParam("@Id", _Code));
                _sqlParms.Add(SQLParam.GetParam("@type", _type));
                _stageProvider.ExecuteNonQuery("SYNC_Insert_Keyword_SSIS_Q", _sqlParms);

                this.EntityMessage(string.Format("Insert_Keyword_To_Queue successfully inserted Type {0} Code {1} for Subscriber_Id {2}", _type, _Code, _Subscriber_ID), "INFO");
            }
            catch (Exception ex)
            {
                this.EntityMessage(string.Format("Insert_Keyword_To_Queue failed to insert Type {0} Code {1} for Subscriber_ID {2}. ERROR: {3}", _type, _Code, _Subscriber_ID, ex.Message), "ERROR");
            }
        }
Exemplo n.º 22
0
 private void Process_Responder_Contact_Note()
 {
     try
     {
         _sqlParms = new List <SQLParam>();
         _sqlParms.Add(SQLParam.GetParam("@notes_def", _notes_def));
         _sqlParms.Add(SQLParam.GetParam("@note_entity", _note_entity));
         _sqlParms.Add(SQLParam.GetParam("@entity_type", _entity_type));
         _sqlParms.Add(SQLParam.GetParam("@note_title", _note_title));
         _sqlParms.Add(SQLParam.GetParam("@note_text", _note_text));
         _stageProvider.ExecuteNonQuery("SYNC_Process_Responder_Note", _sqlParms);
         this.EntityMessage(string.Format("Processed responder note for note_def {0}", _notes_def.ToString()), "INFO");
     }
     catch (Exception ex)
     {
         this.EntityMessage(string.Format("Unable to process responder notes for note_def: {0}, entity_type: {1}, note_entity: {2}", _notes_def.ToString(), _entity_type.ToString(), _note_entity.ToString()), "ERROR");
     }
 }
Exemplo n.º 23
0
 public void Fetch(string subscriber)
 {
     try
     {
         this._sqlParms = new List <SQLParam>();
         this._sqlParms.Add(SQLParam.GetParam("@subscriber", subscriber));
         DataRow drMapping = _stageProvider.ExecuteDataSet("SYNC_Get_Subscriber_Mapping", this._sqlParms).Tables[0].Rows[0];
         _location_def  = drMapping["Location_Ref"].Parse <int>();
         _resident_def  = drMapping["Resident_Def"].Parse <int>();
         _authority_ref = drMapping["Authority_Ref"].Parse <int>();
         _equip_id      = drMapping["Equip_Id"].Parse <long>();
         _subscriber    = subscriber;
     }
     catch (Exception ex)
     {
         this.EntityMessage(string.Format("Failed to fetch the subscriber mapping for {0}", subscriber), "ERROR");
     }
 }
Exemplo n.º 24
0
        private bool Map_Resident_Characteristic()
        {
            bool isMatch = false;

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@attr_choice_def", _attr_choice_def));
                _Status = _stageProvider.ExecuteScalar <string>("SYNC_Map_Resident_Status", _sqlParms);

                isMatch = true;
            }
            catch (Exception ex)
            {
                EntityMessage(string.Format("Failed to map resident status for resident_def {0}. Error: {1}", _residentDef.ToString(), ex.Message), "ERROR");
            }

            return(isMatch);
        }
Exemplo n.º 25
0
        protected bool IsSubscriberMapped(string subscriberId)
        {
            bool isMapped = false;

            try
            {
                this._sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@subscriber_id", subscriberId));
                DataTable dtMapping = this._stageProvider.ExecuteDataSet("SYNC_Get_Subscriber_Mapping", this._sqlParms).Tables[0];

                if (dtMapping.Rows.Count >= 1)
                {
                    isMapped = true;
                }
            }
            catch { }


            return(isMapped);
        }
Exemplo n.º 26
0
        private void Process_Doctor_Note()
        {
            int hospitalid = this.Parse_Hospital_Id();

            if (hospitalid != -1)
            {
                try
                {
                    _sqlParms = new List <SQLParam>();
                    _sqlParms.Add(SQLParam.GetParam("@note_entity", _note_entity));
                    _sqlParms.Add(SQLParam.GetParam("@note_title", _note_title));
                    _sqlParms.Add(SQLParam.GetParam("@note_text", _note_text));
                    _stageProvider.ExecuteNonQuery("SYNC_Process_Doctor_Note ", _sqlParms);
                    this.EntityMessage(string.Format("Processed doctor note for note_def {0}", _notes_def.ToString()), "INFO");
                }
                catch (Exception ex)
                {
                    this.EntityMessage(string.Format("Unable to process doctor note for note_def: {0}, entity_type: {1}, note_entity: {2}", _notes_def.ToString(), _entity_type.ToString(), _note_entity.ToString()), "ERROR");
                }
            }
        }
Exemplo n.º 27
0
        private bool Map_Resident_SubscriberId()
        {
            bool isMatch = false;

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@subscriber", -1));
                _sqlParms.Add(SQLParam.GetParam("@locdef", _locationDef));
                _sqlParms.Add(SQLParam.GetParam("@resdef", _residentDef));
                _Subscriber_ID = _stageProvider.ExecuteScalar <string>("SYNC_Map_Subscriber_Resident", _sqlParms);

                isMatch = true;
            }
            catch (Exception ex)
            {
                EntityMessage(string.Format("Map_Resident_SubscriberId had a fatal error. ERROR: {0}", ex.Message), "ERROR");
            }

            return(isMatch);
        }
Exemplo n.º 28
0
        private void Insert_Temp_Repsonder_Q()
        {
            string msg = string.Empty;

            try
            {
                if (_Subscriber_ID != "-1")
                {
                    _sqlParms = new List <SQLParam>();
                    _sqlParms.Add(SQLParam.GetParam("@subscriber_id", _Subscriber_ID));
                    _sqlParms.Add(SQLParam.GetParam("@responder_name", _responder_name));
                    _sqlParms.Add(SQLParam.GetParam("@work_phone", _work_phone));
                    _sqlParms.Add(SQLParam.GetParam("@cell_phone", _cell_phone));
                    _sqlParms.Add(SQLParam.GetParam("@home_phone", _home_phone));
                    _sqlParms.Add(SQLParam.GetParam("@has_key", _hasKey == false ? "N" : "Y"));
                    _sqlParms.Add(SQLParam.GetParam("@nvi_order", _NVIOrder));
                    _sqlParms.Add(SQLParam.GetParam("@nvi", _NVI == false ? "N" : "Y"));
                    _sqlParms.Add(SQLParam.GetParam("@relation_type", _type));
                    _sqlParms.Add(SQLParam.GetParam("@relation_code", _Code));
                    _sqlParms.Add(SQLParam.GetParam("@contact_def", _contact_def));
                    _sqlParms.Add(SQLParam.GetParam("@contact_type_def", _contact_type_ref));
                    _sqlParms.Add(SQLParam.GetParam("@priority", _priority));
                    _sqlParms.Add(SQLParam.GetParam("@location_def", _locationDef));
                    _sqlParms.Add(SQLParam.GetParam("@resident_def", _residentDef));
                    _sqlParms.Add(SQLParam.GetParam("@entity_type", _entity_type));

                    _stageProvider.ExecuteNonQuery("SYNC_Insert_Responder_Q", _sqlParms);

                    EntityMessage(string.Format("New contact record inserted into TEMP_PNC_CONTACT_SSIS_Q. Subscriber Id: {0}", _Subscriber_ID), "INFO");
                }
                else
                {
                    throw new Exception("The process failed to map a Subscriber Id for the contact.");
                }
            }
            catch (Exception ex)
            {
                EntityMessage(string.Format("Failed to insert contact_def {0} for subscriber id {1} into TEMP_PNC_CONTACT_SSIS_Q. ERROR:{2}", _contact_def.ToString(), _Subscriber_ID, ex.Message), "ERROR");
            }
        }
Exemplo n.º 29
0
        private bool Map_SubMedInfo_To_Keyword()
        {
            bool isMapped = true;

            try
            {
                _sqlParms = new List <SQLParam>();
                _sqlParms.Add(SQLParam.GetParam("@keyword_ref", _keyword_ref));
                DataRow drKeyword = _stageProvider.ExecuteDataSet("SYNC_Map_SubMedInfo_Keyword", _sqlParms).Tables[0].Rows[0];

                _type = drKeyword["Type"].ToString();
                _Code = drKeyword["Code"].ToString();

                this.EntityMessage(string.Format("Map_SubMedInfo_To_Keyword found Type {0}, Code {1} for keyword_ref {2}.", _type, _Code, _keyword_ref.ToString()), "INFO");
            }
            catch (Exception ex)
            {
                this.EntityMessage(string.Format("No mapping found for keyword_ref {0} for resident_def {1}.", _keyword_ref.ToString(), _residentDef.ToString()), "INFO");
                isMapped = false;
            }
            return(isMapped);
        }
Exemplo n.º 30
0
        bool Map_Alarm_Code()
        {
            bool isMapped = true;

            try
            {
                _sqlParms = new List <SQLParam>();
                this._sqlParms.Add(SQLParam.GetParam("@call_code", this._call_code));
                this._alarm_code = _stageProvider.ExecuteDataSet("SYNC_Get_Call_Code_Mapping", _sqlParms).Tables[0].Rows[0]["Alarm_Code"].ToString();

                this.EntityMessage(string.Format("Successfully mapped call_code {0} to alarm_code {1} for call_def {2}, Subscriber Id {3}.",
                                                 this._call_code, this._alarm_code, this._call_def.ToString(), this._Subscriber_ID), "INFO");
            }
            catch (Exception ex)
            {
                isMapped = false;
                this.EntityMessage(string.Format("Failed to map call_code {0} for call_def {1}, Subscriber Id {2}.",
                                                 this._call_code, this._call_def.ToString(), this._Subscriber_ID), "INFO");
            }

            return(isMapped);
        }