Example #1
0
        SaveDisposition(LG.Data.Models.Doctors.ConsultWizard.PlanOfCareEntity pc)
        {
            var client = ClientConnection.GetCDMS_Connection();

            try
            {
                client.Open();
                var response = await client.SavePlanOfCareAsync(new SavePlanOfCareRequest()
                {
                    PropBag         = PropBag,
                    MessageGuid     = Guid.NewGuid(),
                    PlanOfCareLegal = new PlanOfCareLegal()
                    {
                        PlanOfCare             = pc.Disposition,
                        ListOfLegalDisclaimers = pc.Disclaimers
                    }
                });

                pc.IsError = response.ReturnStatus.IsError;
                pc.Message = !response.ReturnStatus.IsError ? response.ReturnStatus.GeneralMessage: response.ReturnStatus.ErrorMessage;
            }
            catch (Exception ex)
            {
                client.Abort();
                pc.IsError = true;
                pc.Message = ex.ToString();
            }
            finally
            {
                if (client.State != CommunicationState.Closed)
                {
                    client.Close();
                }
            }
            return(pc);
        }
Example #2
0
        /// <summary>
        /// Plan Of Care
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public static async Task <LG.Data.Models.Doctors.ConsultWizard.PlanOfCareEntity> GetPlanOfCare(LG.Data.Models.Doctors.ConsultWizard.PlanOfCareEntity entity)
        {
            var client = ClientConnection.GetCDMS_Connection();

            try
            {
                client.Open();
                var response
                    = await client.GetPlanOfCareAsync(new GetPlanOfCareRequest()
                {
                    MessageGuid    = Guid.NewGuid(),
                    ConsultationID = entity.ConsultationID
                });

                entity.DispositionLegal = response.PlanOfCare;
                entity.IsError          = response.ReturnStatus.IsError;
                entity.Message          = response.ReturnStatus.GeneralMessage + response.ReturnStatus.ErrorMessage;
            }
            catch (Exception ex)
            {
                client.Abort();
                entity.IsError = true;
                entity.Message = ex.ToString();
            }
            finally
            {
                if (client.State != CommunicationState.Closed)
                {
                    client.Close();
                }
            }
            return(entity);
        }
Example #3
0
        public static async Task <LG.Data.Models.Doctors.ConsultWizard.PlanOfCareEntity> SavePlanOfCareDraft(LG.Data.Models.Doctors.ConsultWizard.PlanOfCareEntity entity)
        {
            var client = ClientConnection.GetCDMS_Connection();

            try
            {
                client.Open();
                var response
                    = await client.SavePlanOfCareDraftAsync(new SavePlanOfCareDraftRequest()
                {
                    PropBag         = PropBag,
                    MessageGuid     = Guid.NewGuid(),
                    PlanOfCareDraft = entity.Draft,
                });

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