Пример #1
0
        public static async Task <LG.Data.Models.Doctors.ConsultWizard.Note> ToggleGeneralNote(LG.Data.Models.Doctors.ConsultWizard.Note entity)
        {
            var client = ClientConnection.GetCDMS_Connection();

            try
            {
                client.Open();
                var response
                    = await client.ToggleIsHiddenGeneralNoteAsync(new ToggleIsHiddenGeneralNoteRequest()
                {
                    MessageGuid = Guid.NewGuid(),
                    ID          = entity.ID,
                    IsHidden    = entity.IsHidden,
                    PropBag     = PropBag
                });

                entity.IsError = response.ReturnStatus.IsError;
            }
            catch (Exception ex)
            {
                client.Abort();
                entity.IsError = true;
                entity.Message = ex.ToString();
            }
            finally
            {
                if (client.State != CommunicationState.Closed)
                {
                    client.Close();
                }
            }
            return(entity);
        }
Пример #2
0
        /// <summary>
        /// Consult Notes
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public static async Task <LG.Data.Models.Doctors.ConsultWizard.Note> InsertGeneralNote(LG.Data.Models.Doctors.ConsultWizard.Note entity)
        {
            var client = ClientConnection.GetCDMS_Connection();

            try
            {
                client.Open();
                var response
                    = await client.InsertGeneralNoteAsync(new InsertGeneralNoteRequest()
                {
                    PropBag        = PropBag,
                    MessageGuid    = Guid.NewGuid(),
                    OrderID        = entity.ConsultationID,
                    ConsultationID = entity.ConsultationID,
                    Note           = entity.NoteText,
                    MemberRID      = entity.PatientRID,
                    CreatedByRID   = entity.CreatedByRID,
                    IsHidden       = entity.IsHidden
                });

                entity.ID      = response.ID;
                entity.IsError = response.ReturnStatus.IsError;
            }
            catch (Exception ex)
            {
                client.Abort();
                entity.IsError = true;
                entity.Message = ex.ToString();
            }
            finally
            {
                if (client.State != CommunicationState.Closed)
                {
                    client.Close();
                }
            }
            return(entity);
        }