Ejemplo n.º 1
0
        private static bool deleteDatabaseTableRelation(DatabaseTableRelation databaseTableRelation)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.Text;
                command.CommandText = das.DELETE_DATABASE_TABLE_RELATION;
                command.Parameters.AddWithValue(DatabaseTableRelationDAO.AT_ID, databaseTableRelation.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            databaseTableRelation.id = DAOUtility.GetData <int>(reader, DatabaseTableDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "DeleteDatabaseTableRelation()", databaseTableRelation.id.ToString());
                }
            }
            return(true);
        }
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, DatabaseTableRelationDAO.ID);
     this.sourceDatabaseTableId = DAOUtility.GetData <int>(reader, DatabaseTableRelationDAO.SOURCE_DATABASE_TABLE_ID);
     this.targetDatabaseTableId = DAOUtility.GetData <int>(reader, DatabaseTableRelationDAO.TARGET_DATABASE_TABLE_ID);
     this.requiresIdentity      = DAOUtility.GetData <bool>(reader, DatabaseTableRelationDAO.REQUIRES_IDENTITY);
 }
Ejemplo n.º 3
0
 private void fillDataReaderCustomView(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, CommunicationDAO.VIEW_COMMUNICATION_ID);
     this.directionTypeId     = DAOUtility.GetData <int>(reader, CommunicationDAO.VIEW_COMMUNICATION_DIRECTION_TYPE_ID);
     this.communicationTypeId = DAOUtility.GetData <int>(reader, CommunicationDAO.VIEW_COMMUNICATION_COMMUNICATION_TYPE_ID);
     this.applicationId       = DAOUtility.GetData <int>(reader, CommunicationDAO.VIEW_COMMUNICATION_APPLICATION_ID);
 }
Ejemplo n.º 4
0
        private static bool deleteMessageGroup(MessageGroup messageGroup)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.Text;
                command.CommandText = das.DELETE_MESSAGE_GROUP;
                command.Parameters.AddWithValue(MessageGroupDAO.AT_ID, messageGroup.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            messageGroup.id = DAOUtility.GetData <int>(reader, MessageGroupDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "DeleteMessageGroup()", messageGroup.id.ToString());
                }
            }
            return(true);
        }
Ejemplo n.º 5
0
        private static bool deleteCommunicationType(CommunicationType communicationType)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.Text;
                command.CommandText = das.DELETE_COMMUNICATION_TYPE;
                command.Parameters.AddWithValue(CommunicationTypeDAO.AT_ID, communicationType.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            communicationType.id = DAOUtility.GetData <int>(reader, CommunicationTypeDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "DeleteCommunicationType()", communicationType.id.ToString());
                }
            }
            return(true);
        }
Ejemplo n.º 6
0
 private void fillDataReaderCustomView(IDataRecord reader)
 {
     this.name      = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.VIEW_DATABASE_NAME);
     this.server    = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.VIEW_DATABASE_SERVER);
     this.ipAddress = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.VIEW_DATABASE_IP_ADDRESS);
     this.id        = DAOUtility.GetData <int>(reader, DatabaseInstanceDAO.VIEW_DATABASE_INSTANCE_ID);
 }
Ejemplo n.º 7
0
 public void fillDataReader(IDataRecord reader)
 {
     this.id               = DAOUtility.GetData <int>(reader, MessageLogDAO.ID);
     this.messageId        = DAOUtility.GetData <int>(reader, MessageLogDAO.MESSAGE_ID);
     this.messageLogTypeId = DAOUtility.GetData <int>(reader, MessageLogDAO.MESSAGE_LOG_TYPE_ID);
     this.createdDttm      = DAOUtility.GetData <DateTime>(reader, MessageLogDAO.CREATED_DTTM);
 }
 private void fillDataReaderCustomView(IDataRecord reader)
 {
     this.id   = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.VIEW_WEBSERVICE_PROPERTY_ID);
     this.name = DAOUtility.GetData <string>(reader, WebservicePropertySetDAO.VIEW_WEBSERVICE_PROPERTY);
     this.messageGroupInstanceId = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.VIEW_WEBSERVICE_PROPERTY_MESSAGE_GROUP_INSTANCE_ID);
     this.columnDataType         = DAOUtility.GetData <string>(reader, WebservicePropertySetDAO.VIEW_WEBSERVICE_PROPERTY_COLUMN_DATA_TYPE);
 }
Ejemplo n.º 9
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, CredentialDAO.ID);
     this.credentialTypeId = DAOUtility.GetData <int>(reader, CredentialDAO.CREDENTIAL_TYPE_ID);
     this.username         = DAOUtility.GetData <string>(reader, CredentialDAO.USERNAME);
     this.password         = DAOUtility.GetData <string>(reader, CredentialDAO.PASSWORD);
 }
Ejemplo n.º 10
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, MessageGroupDAO.ID);
     this.messageGroupInstanceId = DAOUtility.GetData <int>(reader, MessageGroupDAO.MESSAGE_GROUP_INSTANCE_ID);
     this.messagePartId          = DAOUtility.GetData <int>(reader, MessageGroupDAO.MESSAGE_PART_ID);
     this.position = DAOUtility.GetData <int>(reader, MessageGroupDAO.POSITION);
 }
Ejemplo n.º 11
0
        private static DirectionType postUpdateDirectionType(DirectionType directionType)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.CommandText = das.PUT_DIRECTION_TYPE;
                command.Parameters.AddWithValue(DirectionTypeDAO.AT_NAME, directionType.name);
                command.Parameters.AddWithValue(DirectionTypeDAO.AT_ID, directionType.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            directionType.id = DAOUtility.GetData <int>(reader, DirectionTypeDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "postUpdateDirectionType()", directionType.id.ToString());
                }
            }
            return(directionType);
        }
Ejemplo n.º 12
0
        private static bool deleteWebservicePropertySet(WebservicePropertySet WebservicePropertySet)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.Text;
                command.CommandText = das.DELETE_WEBSERVICE_PROPERTY_SET;
                command.Parameters.AddWithValue(WebservicePropertySetDAO.AT_ID, WebservicePropertySet.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            WebservicePropertySet.id = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "DeleteWebservicePropertySet()", WebservicePropertySet.name);
                }
            }
            return(true);
        }
Ejemplo n.º 13
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.ID);
     this.webserviceObjectId = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.WEBSERVICE_OBJECT_ID);
     this.name = DAOUtility.GetData <string>(reader, WebservicePropertySetDAO.NAME);
     this.messageGroupInstanceId = DAOUtility.GetData <int>(reader, WebservicePropertySetDAO.MESSAGE_GROUP_INSTANCE_ID);
     this.columnDataType         = DAOUtility.GetData <string>(reader, WebservicePropertySetDAO.COLUMN_DATA_TYPE);
 }
Ejemplo n.º 14
0
 private void fillDataReaderCustomView(IDataRecord reader)
 {
     this.id                     = DAOUtility.GetData <int>(reader, ColumnSetDAO.VIEW_DATABASE_ID);
     this.name                   = DAOUtility.GetData <string>(reader, ColumnSetDAO.VIEW_DATABASE_COLUMN);
     this.isPrimaryKey           = DAOUtility.GetData <bool>(reader, ColumnSetDAO.VIEW_DATABASE_COLUMN_IS_PRIMARY_KEY);
     this.messageGroupInstanceId = DAOUtility.GetData <int>(reader, ColumnSetDAO.VIEW_DATABASE_COLUMN_MESSAGE_GROUP_INSTANCE_ID);
     this.columnDataType         = DAOUtility.GetData <string>(reader, ColumnSetDAO.VIEW_DATABASE_COLUMN_DATA_TYPE);
 }
Ejemplo n.º 15
0
 public void fillDataReader(IDataRecord reader)
 {
     this.id                    = DAOUtility.GetData <int>(reader, AcknowledgementDAO.ID);
     this.messageId             = DAOUtility.GetData <int>(reader, AcknowledgementDAO.MESSAGE_ID);
     this.acknowledgementTypeId = DAOUtility.GetData <int>(reader, AcknowledgementDAO.ACKNOWLEDGEMENT_TYPE_ID);
     this.raw                   = DAOUtility.GetData <string>(reader, AcknowledgementDAO.RAW);
     this.createdDttm           = DAOUtility.GetData <DateTime>(reader, AcknowledgementDAO.CREATED_DTTM);
 }
Ejemplo n.º 16
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id              = DAOUtility.GetData <int>(reader, ApplicationSettingDAO.ID);
     this.applicationId   = DAOUtility.GetData <int>(reader, ApplicationSettingDAO.APPLICATION_ID);
     this.communicationId = DAOUtility.GetData <int>(reader, ApplicationSettingDAO.COMMUNICATION_ID);
     this.autoStart       = DAOUtility.GetData <bool>(reader, ApplicationSettingDAO.AUTOSTART);
     this.disabled        = DAOUtility.GetData <bool>(reader, ApplicationSettingDAO.DISABLED);
 }
Ejemplo n.º 17
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, ColumnSetDAO.ID);
     this.databaseTableId        = DAOUtility.GetData <int>(reader, ColumnSetDAO.DATABASE_TABLE_ID);
     this.name                   = DAOUtility.GetData <string>(reader, ColumnSetDAO.NAME);
     this.isPrimaryKey           = DAOUtility.GetData <bool>(reader, ColumnSetDAO.IS_PRIMAR_KEY);
     this.messageGroupInstanceId = DAOUtility.GetData <int>(reader, ColumnSetDAO.MESSAGE_GROUP_INSTANCE_ID);
     this.columnDataType         = DAOUtility.GetData <string>(reader, ColumnSetDAO.COLUMN_DATA_TYPE);
 }
Ejemplo n.º 18
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id            = DAOUtility.GetData <int>(reader, MessageGroupInstanceDAO.ID);
     this.messageTypeId = DAOUtility.GetData <int>(reader, MessageGroupInstanceDAO.MESSAGE_TYPE_ID);
     this.segmentTypeId = DAOUtility.GetData <int>(reader, MessageGroupInstanceDAO.SEGMENT_TYPE_ID);
     this.createdDttm   = DAOUtility.GetData <DateTime>(reader, MessageGroupInstanceDAO.CREATED_DTTM);
     this.updatedDttm   = DAOUtility.GetData <DateTime>(reader, MessageGroupInstanceDAO.UPDATED_DTTM);
     this.description   = DAOUtility.GetData <string>(reader, MessageGroupInstanceDAO.DESCRIPTION);
 }
Ejemplo n.º 19
0
 private void fillDataReader(IDataRecord reader)
 {
     this.StreetOne    = DAOUtility.GetData <string>(reader, SectraDAO.Street1);
     this.StreetTwo    = DAOUtility.GetData <string>(reader, SectraDAO.Street2);
     this.City         = DAOUtility.GetData <string>(reader, SectraDAO.City);
     this.State        = DAOUtility.GetData <string>(reader, SectraDAO.State);
     this.ZipCode      = DAOUtility.GetData <string>(reader, SectraDAO.Zip);
     this.EnterpriseId = 1;
 }
Ejemplo n.º 20
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, DatabaseInstanceDAO.ID);
     this.communicationId = DAOUtility.GetData <int>(reader, DatabaseInstanceDAO.COMMUNICATION_ID);
     this.credentialId    = DAOUtility.GetData <int>(reader, DatabaseInstanceDAO.CREDENTIAL_ID);
     this.name            = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.NAME);
     this.server          = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.SERVER);
     this.ipAddress       = DAOUtility.GetData <string>(reader, DatabaseInstanceDAO.IP_ADDRESS);
 }
Ejemplo n.º 21
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, InterfaceDAO.ID);
     this.communicationId = DAOUtility.GetData <int>(reader, InterfaceDAO.COMMUNICATION_ID);
     this.credentialId    = DAOUtility.GetData <int>(reader, InterfaceDAO.CREDENTIAL_ID);
     this.ipAddress       = DAOUtility.GetData <string>(reader, InterfaceDAO.IP_ADDRESS);
     this.port            = DAOUtility.GetData <string>(reader, InterfaceDAO.PORT);
     this.maxConnections  = DAOUtility.GetData <int>(reader, InterfaceDAO.MAX_CONNECTIONS);
 }
Ejemplo n.º 22
0
 private void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, BrokerDAO.ID);
     this.interfaceStatusId = DAOUtility.GetData <int>(reader, BrokerDAO.INTERFACE_STATUS_ID);
     this.communicationId   = DAOUtility.GetData <int>(reader, BrokerDAO.COMMUNICATION_ID);
     this.processId         = DAOUtility.GetData <int>(reader, BrokerDAO.PROCESS_ID);
     this.lastMessageId     = DAOUtility.GetData <int>(reader, BrokerDAO.LAST_MESSAGE_ID);
     this.queueCount        = DAOUtility.GetData <int>(reader, BrokerDAO.QUEUE_COUNT);
     this.lastMessageDTTM   = DAOUtility.GetData <DateTime>(reader, BrokerDAO.LAST_MESSAGE_DTTM);
 }
Ejemplo n.º 23
0
        public static bool UpdateProcessedFlagAndMessageLog(MessageHeaderInstance messageHeaderInstance,
                                                            Message message,
                                                            bool isReprocess = false)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            // set the flag which determines the reprocess
            bool isProcessed = false;

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();
                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.CommandText = das.UPDATE_MESSAGE_HEADER_INSTANCE_PROCESS;
                command.Parameters.AddWithValue(MessageBucketDAO.AT_ID, messageHeaderInstance.id);
                command.Parameters.AddWithValue(MessageBucketDAO.AT_MESSAGE_ID, message.id);
                command.Parameters.AddWithValue(MessageBucketDAO.AT_ISREPROCESS, isReprocess);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();
                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            isProcessed = DAOUtility.GetData <bool>(reader, MessageBucketDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "MessageHeaderInstance messageHeaderInstance, Message message",
                                         messageHeaderInstance.id.ToString() + "|" + message.id.ToString());

                    ErrorLogger.LogError(new Exception("Message UpdateProcessedFlagAndMessageLog Retry"),
                                         "MessageHeaderInstance messageHeaderInstance, Message message", messageHeaderInstance.id.ToString() + "|" + message.id.ToString());

                    isProcessed = UpdateProcessedFlagAndMessageLog(messageHeaderInstance, message, isReprocess);
                }
            }

            return(isProcessed);
        }
Ejemplo n.º 24
0
        private void fillDataReader(IDataRecord reader)
        {
            this.examId               = DAOUtility.GetData <int>(reader, SectraDAO.EXAM_ID);
            this.patientNo            = DAOUtility.GetData <int>(reader, SectraDAO.EXAM_PATIENT_NO);
            this.requestedBy          = DAOUtility.GetData <int>(reader, SectraDAO.EXAM_REQUESTED_BY);
            this.accessionNo          = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_ACCESSION_NO);
            this.AccessionNo          = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_ACCESSION_NO);
            this.ExamCodeName         = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_CODE_NAME);
            this.ExamTypeName         = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_TYPE_NAME);
            this.ExamStatusName       = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_STATUS_NAME);
            this.ExamSideName         = DAOUtility.GetData <string>(reader, SectraDAO.EXAM_SIDE);
            this.ExamDate             = DAOUtility.GetData <DateTime>(reader, SectraDAO.EXAM_DATE);
            this.DateRequested        = DAOUtility.GetData <DateTime>(reader, SectraDAO.EXAM_DATE_REQUESTED);
            this.SourceOfReferralName = DAOUtility.GetData <string>(reader, SectraDAO.SOURCE_OF_REFERRAL_NAME);

            // handle source of referral name for older exams
            SectraUtility.handleSourceOfReferral(this);
        }
Ejemplo n.º 25
0
        private void fillDataReader(IDataRecord reader)
        {
            this.fullName = DAOUtility.GetData <string>(reader, SectraDAO.Name);

            string[] arrParsedName = SectraUtility.handleName(this.fullName);

            // set the name
            this.LastName  = arrParsedName[LASTNAME];
            this.FirstName = arrParsedName[FIRSTNAME];

            // does patient have middle name?
            if (arrParsedName.Length > 2)
            {
                this.MiddleName = arrParsedName[MIDDLENAME];
            }

            this.Npi          = DAOUtility.GetData <string>(reader, SectraDAO.NPI);
            this.Type         = DAOUtility.GetData <string>(reader, SectraDAO.TypeOfUser);
            this.EnterpriseId = 1;
        }
Ejemplo n.º 26
0
        private static bool reprocessMessage(int messageHeaderInstanceId, string messageControlId)
        {
            if (messageHeaderInstanceId == Convert.ToInt32(ZERO) && messageControlId == BLANK)
            {
                throw new ArgumentNullException("There is no message header instance id or message control id, can't reprocess");
            }

            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            // set the flag which determines the reprocess
            bool isProcessed = false;

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();
                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.CommandText = das.UPDATE_MESSAGE_HEADER_INSTANCE_FOR_REPROCESS;
                command.Parameters.AddWithValue(MessageBucketDAO.AT_ID, messageHeaderInstanceId);
                command.Parameters.AddWithValue(MessageBucketDAO.AT_MESSAGE_CONTROL_ID, messageControlId);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();
                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            isProcessed = DAOUtility.GetData <bool>(reader, MessageBucketDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "reprocessMessage(int messageHeaderInstanceId, string messageControlId)", messageHeaderInstanceId.ToString() + "|" + messageControlId);
                }
            }
            return(isProcessed);
        }
Ejemplo n.º 27
0
 public void fillDataReader(IDataRecord reader)
 {
     this.id = DAOUtility.GetData <int>(reader, MessageHeaderInstanceDAO.ID);
     this.sendingApplication   = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.SENDING_APPLICATION);
     this.receivingApplication = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.RECEIVING_APPLICATION);
     this.sendingFacility      = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.SENDING_FACILITY);
     this.receivingFacility    = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.RECEIVING_FACILTIY);
     this.messageDTTM          = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.MESSAGE_DTTM);
     this.messageControlId     = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.MESSAGE_CONTROL_ID);
     this.messageType          = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.MESSAGE_TYPE);
     this.versionId            = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.VERSION_ID);
     this.applicationAckType   = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.APPLICATION_ACK_TYPE);
     this.acceptAckType        = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.ACCEPT_ACK_TYPE);
     this.patientIdentifier    = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.PATIENT_IDENTIFIER);
     this.orderControlCode     = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.ORDER_CONTROL_CODE);
     this.processed            = DAOUtility.GetData <string>(reader, MessageHeaderInstanceDAO.PROCESSED);
     this.processedDttm        = DAOUtility.GetData <DateTime>(reader, MessageHeaderInstanceDAO.PROCESSED_DTTM);
     this.pendingReprocessDttm = DAOUtility.GetData <DateTime>(reader, MessageHeaderInstanceDAO.PENDING_REPROCESS_DTTM);
     this.createdDttm          = DAOUtility.GetData <DateTime>(reader, MessageHeaderInstanceDAO.CREATED_DTTM);
     this.processedCount       = DAOUtility.GetData <int>(reader, MessageHeaderInstanceDAO.PROCESSED_COUNT);
 }
Ejemplo n.º 28
0
        private void fillDataReader(IDataRecord reader)
        {
            this.fullName = DAOUtility.GetData <string>(reader, SectraDAO.PATIENT_FULL_NAME);

            // parse the full name
            string[] arrParsedName = SectraUtility.handleName(this.fullName);

            // set the name
            this.LastName  = arrParsedName[LASTNAME];
            this.FirstName = arrParsedName[FIRSTNAME];

            // does patient have middle name?
            if (arrParsedName.Length > 2)
            {
                this.MiddleName = arrParsedName[MIDDLENAME];
            }

            // get rest of properties
            this.MedicalRecordNo = DAOUtility.GetData <string>(reader, SectraDAO.PATIENT_MRN);
            this.DateOfBirth     = DAOUtility.GetData <DateTime>(reader, SectraDAO.PATIENT_DATE_OF_BIRTH);
        }
Ejemplo n.º 29
0
 private void fillDataReaderCustomView(IDataRecord reader)
 {
     this.brokerId = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_ID);
     this.applicationDescription     = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_APPLICATION_DESCRIPTION);
     this.applicationName            = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_APPLICATION_NAME);
     this.brokerQueueCount           = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_QUEUE_COUNT);
     this.interfaceStatusName        = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_INTERFACE_STATUS_NAME);
     this.interfaceStatusColor       = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_INTERFACE_STATUS_COLOR);
     this.communicationTypeName      = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_COMMUNICATION_TYPE_NAME);
     this.directionTypeName          = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_DIRECTION_TYPE_NAME);
     this.brokerProcessId            = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_PROCESS_ID);
     this.brokerLastMessageDTTM      = DAOUtility.GetData <DateTime>(reader, BrokerDAO.VIEW_BROKER_LAST_MESSAGE_DTTM);
     this.brokerLastMessageId        = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_LAST_MESSAGE_ID);
     this.messageHl7Raw              = DAOUtility.GetData <string>(reader, BrokerDAO.VIEW_MESSAGE_HL7_RAW);
     this.messageHeaderInstanceId    = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_MESSAGE_HEADER_INSTANCE_ID);
     this.directionTypeId            = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_DIRECTION_TYPE_ID);
     this.communicationTypeId        = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_COMMUNICATION_TYPE_ID);
     this.brokerCommunicationId      = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_COMMUNICATION_ID);
     this.brokerInterfaceStatusId    = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_BROKER_INTERFACE_STATUS_ID);
     this.communicationApplicationId = DAOUtility.GetData <int>(reader, BrokerDAO.VIEW_COMMUNICATION_APPLICATION_ID);
 }
Ejemplo n.º 30
0
        private static Broker postUpdateBroker(Broker broker)
        {
            SysDataAccessCredential dac = DAOUtility.GetSysCredentials();
            DataAccess das = new DataAccess();

            using (SqlConnection conn = new SqlConnection(DAOUtility.GetConnectionString(dac)))
            {
                conn.Open();

                SqlCommand command = new SqlCommand();
                command.Connection  = conn;
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.CommandText = das.PUT_BROKER;
                command.Parameters.AddWithValue(BrokerDAO.AT_INTERFACE_STATUS_ID, broker.interfaceStatusId);
                command.Parameters.AddWithValue(BrokerDAO.AT_COMMUNICATION_ID, broker.communicationId);
                command.Parameters.AddWithValue(BrokerDAO.PROCESS_ID, broker.processId);
                command.Parameters.AddWithValue(BrokerDAO.LAST_MESSAGE_ID, broker.lastMessageId);
                command.Parameters.AddWithValue(BrokerDAO.QUEUE_COUNT, broker.queueCount);
                command.Parameters.AddWithValue(BrokerDAO.LAST_MESSAGE_DTTM, broker.lastMessageDTTM);
                command.Parameters.AddWithValue(BrokerDAO.AT_ID, broker.id);

                try
                {
                    SqlDataReader reader = command.ExecuteReader();

                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            broker.id = DAOUtility.GetData <int>(reader, BrokerDAO.ID);
                        }
                    }
                }
                catch (Exception e)
                {
                    ErrorLogger.LogError(e, "postUpdateBroker()", broker.id.ToString());
                }
            }
            return(broker);
        }