public GetAllPatientNotesDataResponse Get(GetAllPatientNotesDataRequest request) { GetAllPatientNotesDataResponse response = new GetAllPatientNotesDataResponse(); try { RequireUserId(request); response.PatientNotes = Manager.GetAllPatientNotes(request); response.Version = request.Version; } catch (Exception ex) { RaiseException(response, ex); } return(response); }
public void GetPatientNotes_Test() { GetAllPatientNotesDataRequest request = new GetAllPatientNotesDataRequest { Context = context, ContractNumber = contractNumber, PatientId = "5325da92d6a4850adcbba6aa", UserId = userId, Version = version }; //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{PatientId}/Notes/{Count}", "GET")] GetAllPatientNotesDataResponse response = client.Get <GetAllPatientNotesDataResponse>( string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Notes/{5}?UserId={6}", url, context, version, contractNumber, request.PatientId, 10, request.UserId)); Assert.IsNotNull(response); }
public override List <PatientNote> Visit(ref List <PatientNote> result) { //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{PatientId}/Notes/{Count}", "GET")] IRestClient client = new JsonServiceClient(); var url = Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Notes/{5}", DDPatientNoteUrl, "NG", Version, ContractNumber, PatientId, Count), UserId); GetAllPatientNotesDataResponse ddResponse = client.Get <GetAllPatientNotesDataResponse>(url); if (ddResponse == null || ddResponse.PatientNotes == null || ddResponse.PatientNotes.Count <= 0) { return(result); } List <PatientNoteData> dataList = ddResponse.PatientNotes; result = dataList.Select(n => 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 }).ToList(); return(result); }