Beispiel #1
0
        public void GetPaitentNote_Test()
        {
            GetPatientNoteRequest request = new GetPatientNoteRequest();

            request.ContractNumber = "InHealth001";
            request.UserId         = "AD_TestHarness";
            request.Version        = 1;
            request.Id             = "5307b27fd433232ed88e5020";
            request.PatientId      = "52f55877072ef709f84e69b0";
            request.UserId         = "Snehal";

            NotesManager gManager = new NotesManager();
            PatientNote  response = gManager.GetPatientNote(request);

            Assert.IsNotNull(response);
        }
Beispiel #2
0
        public PatientNote GetPatientNote(GetPatientNoteRequest request)
        {
            try
            {
                PatientNote result = null;
                //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{PatientId}/Note/{Id}", "GET")]
                IRestClient client = new JsonServiceClient();
                string      url    = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Note/{5}",
                                                                          DDPatientNoteUrl,
                                                                          "NG",
                                                                          request.Version,
                                                                          request.ContractNumber,
                                                                          request.PatientId,
                                                                          request.Id), request.UserId);

                GetPatientNoteDataResponse ddResponse = client.Get <GetPatientNoteDataResponse>(url);

                if (ddResponse != null && ddResponse.PatientNote != null)
                {
                    PatientNoteData n = ddResponse.PatientNote;
                    result = new PatientNote
                    {
                        Id                = n.Id,
                        PatientId         = n.PatientId,
                        Text              = n.Text,
                        ProgramIds        = n.ProgramIds,
                        CreatedOn         = n.CreatedOn,
                        CreatedById       = n.CreatedById,
                        TypeId            = n.TypeId,
                        MethodId          = n.MethodId,
                        OutcomeId         = n.OutcomeId,
                        WhoId             = n.WhoId,
                        SourceId          = n.SourceId,
                        Duration          = n.Duration,
                        ValidatedIdentity = n.ValidatedIdentity,
                        ContactedOn       = n.ContactedOn,
                        UpdatedById       = n.UpdatedById,
                        UpdatedOn         = n.UpdatedOn,
                        DataSource        = n.DataSource
                    };
                }
                return(result);
            }
            catch (WebServiceException ex) { throw ex; }
        }