private void HandleInitializationCompleted(ReceivedResponses receivedResponses) { IsLoading = false; var lookupValueLists = new Dictionary <string, IList <LookupValueDto> >(); var responses = from response in receivedResponses.Responses where typeof(GetLookupValuesResponse).IsAssignableFrom(response.GetType()) select response; foreach (GetLookupValuesResponse response in responses) { lookupValueLists.Add(response.Name, response.LookupValues); } DocumentTypeDtos = new ObservableCollection <LookupValueDto>(lookupValueLists["PatientDocumentType"]); var patientDocumentResponse = receivedResponses.Get <GetPatientDocumentsByPatientResponse>(); var results = new ObservableCollection <PatientDocumentDto>(patientDocumentResponse.PatientDocumentDtos); PatientDocumentDtos = results; if (_mailAttachmentPatientDocumentDto != null) { if (_mailAttachmentPatientDocumentDto.FileName.ToLower().EndsWith(".xml")) { _mailAttachmentPatientDocumentDto.PatientDocumentType = _documentTypeDtos.First(p => p.WellKnownName == PatientDocumentType.C32); } else if (_mailAttachmentPatientDocumentDto.FileName.ToLower().EndsWith(".zip")) { _mailAttachmentPatientDocumentDto.PatientDocumentType = _documentTypeDtos.First(p => p.WellKnownName == PatientDocumentType.XDM); } else { _mailAttachmentPatientDocumentDto.PatientDocumentType = _documentTypeDtos.First(p => p.WellKnownName == PatientDocumentType.Other); } PatientDocumentDtos.Add(_mailAttachmentPatientDocumentDto); } }
private void ExecuteCancelNewDocument(PatientDocumentDto patientDocumentDto) { PatientDocumentDtos.Remove(patientDocumentDto); }