Example #1
0
        public SmUserTO(mdo.domain.sm.User user)
        {
            if (user == null)
            {
                return;
            }

            id = user.Id;
            username = user.Username;
            lastName = user.LastName;
            firstName = user.FirstName;
            middleName = user.MiddleName;
            email = user.Email;
            ssn = user.Ssn;
            nSsn = user.Nssn;
            lastNotification = user.LastNotification;

            if (user.Groups != null && user.Groups.Count > 0)
            {
                groups = new TriageGroupTO[user.Groups.Count];
                for (int i = 0; i < user.Groups.Count; i++)
                {
                    groups[i] = new TriageGroupTO(user.Groups[i]);
                }
            }

            if (user.Mailbox != null)
            {
                mailbox = new MailboxTO(user.Mailbox);
            }
        }
Example #2
0
 public TimeSlotTO(mdo.TimeSlot timeSlot)
 {
     if (timeSlot == null)
     {
         return;
     }
     this.available = timeSlot.Available;
     this.end = timeSlot.End;
     this.start = timeSlot.Start;
     this.text = timeSlot.Text;
 }
Example #3
0
 public FolderTO(mdo.domain.sm.Folder folder)
 {
     if (folder == null)
     {
         return;
     }
     this.id = folder.Id;
     this.oplock = folder.Oplock;
     this.name = folder.Name;
     isSystemFolder = folder.SystemFolder;
 }
Example #4
0
        public SmClinicianTO(mdo.domain.sm.Clinician clinician)
        {
            if (clinician == null)
            {
                return;
            }

            id = clinician.Id;
            stationNo = clinician.StationNo;
            duz = clinician.Duz;
            provider = clinician.Provider;
        }
Example #5
0
        public MessageTO(mdo.domain.sm.Message message)
        {
            if (message == null)
            {
                return;
            }

            this.id = message.Id;
            this.oplock = message.Oplock;
            this.assignedTo = new SmClinicianTO(message.AssignedTo);
            this.attachment = message.Attachment;
            this.attachmentId = Convert.ToInt32(message.AttachmentId);
            this.body = gov.va.medora.utils.StringUtils.stripInvalidXmlCharacters(message.Body); // quickly found some invalid XML characters
            this.ccRecipientId = Convert.ToInt32(message.CcRecipientId);
            this.ccRecipientName = message.CcRecipientName;
            this.checksum = gov.va.medora.utils.StringUtils.stripInvalidXmlCharacters(message.Checksum);
            this.completedDate = message.CompletedDate;
            this.escalatedDate = message.EscalatedDate;
            this.escalationNotificationDate = message.EscalationNotificationDate;
            this.escalationNotificationTries = Convert.ToInt32(message.EscalationNotificationTries);
            this.readReceipt = message.ReadReceipt;
            this.recipientId = Convert.ToInt32(message.RecipientId);
            this.recipientName = message.RecipientName;
            //this.recipientType = message.RecipientType;
            this.senderId = Convert.ToInt32(message.SenderId);
            this.senderName = message.SenderName;
            //this.senderType = message.SenderType;
            this.sentDate = message.SentDate;
            this.sentDateLocal = message.SentDateLocal;
            //this.status = message.Status;
            this.statusSetBy = new SmClinicianTO(message.StatusSetBy);

            if (message.MessageThread != null)
            {
                threadId = message.MessageThread.Id;
                threadOplock = message.MessageThread.Oplock;
            }
            if (message.Addressees != null && message.Addressees.Count > 0)
            {
                addressees = new AddresseeTO[message.Addressees.Count];
                for (int i = 0; i < message.Addressees.Count; i++)
                {
                    addressees[i] = new AddresseeTO(message.Addressees[i]);
                }
            }
        }
Example #6
0
        public AddresseeTO(mdo.domain.sm.Addressee addressee)
        {
            if (addressee == null)
            {
                return;
            }

            this.id = addressee.Id;
            this.oplock = addressee.Oplock;
            folder = new FolderTO(addressee.Folder);
            readDate = addressee.ReadDate;
            owner = new SmUserTO(addressee.Owner);
            //message = new MessageTO(addressee.Message); // having the message object was making it too easy to cause an infinite recursive loop - hopefully the message ID is enough
            reminderDate = addressee.ReminderDate;
            role = (Int32)addressee.Role;

            if (addressee.Message != null)
            {
                messageId = addressee.Message.Id;
            }
        }
Example #7
0
 public SmPatientTO(mdo.domain.sm.Patient patient)
 {
     id = patient.Id;
     icn = patient.Icn;
     relationshipUpdate = patient.RelationshipUpdate;
 }