private void TextBoxClientName_TextChanged(object sender, TextChangedEventArgs e) { if (this.TextBoxClientName.Text.Length > 0) { this.m_ClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientsByClientName(this.TextBoxClientName.Text); NotifyPropertyChanged("ClientCollection"); } }
private void ButtonRemoveFromGroup_Click(object sender, RoutedEventArgs e) { if (this.ListViewMembers.SelectedItem != null) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client) this.ListViewMembers.SelectedItem; YellowstonePathology.Business.Gateway.PhysicianClientGateway.DeleteClientGroupClient(client.ClientId, this.m_ClientGroup.ClientGroupId); this.m_MembersClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId(this.m_ClientGroup.ClientGroupId); this.NotifyPropertyChanged("MembersClientCollection"); } }
public ClientGroupEntry(YellowstonePathology.Business.Client.Model.ClientGroup clientGroup) { this.m_ClientGroup = clientGroup; this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_MembersClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId(this.m_ClientGroup.ClientGroupId); InitializeComponent(); this.DataContext = this; Closing += ProviderEntry_Closing; }
public static YellowstonePathology.Business.Client.Model.ClientCollection GetClientsByClientName(string clientName) { YellowstonePathology.Business.Client.Model.ClientCollection result = new YellowstonePathology.Business.Client.Model.ClientCollection(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection collection = server.Database.GetCollection <BsonDocument>("Client"); MongoCursor cursor = collection.FindAs <BsonDocument>(Query.Matches("ClientName", BsonRegularExpression.Create("^" + clientName + ".*", "i"))); foreach (BsonDocument bsonDocument in cursor) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client)YellowstonePathology.Business.Mongo.BSONObjectBuilder.Build(bsonDocument, typeof(YellowstonePathology.Business.Client.Model.Client)); result.Add(client); } return(result); }
public static YellowstonePathology.Business.Client.Model.ClientCollection GetAllClients() { YellowstonePathology.Business.Client.Model.ClientCollection result = new YellowstonePathology.Business.Client.Model.ClientCollection(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection collection = server.Database.GetCollection <BsonDocument>("Client"); MongoCursor cursor = collection.FindAllAs <BsonDocument>(); foreach (BsonDocument bsonDocument in cursor) { YellowstonePathology.Business.Client.Model.Client client = new YellowstonePathology.Business.Client.Model.Client(); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(bsonDocument, client); result.Add(client); } return(result); }
public static YellowstonePathology.Business.Client.Model.ClientCollection GetAllClients() { YellowstonePathology.Business.Client.Model.ClientCollection result = new YellowstonePathology.Business.Client.Model.ClientCollection(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection collection = server.Database.GetCollection<BsonDocument>("Client"); MongoCursor cursor = collection.FindAllAs<BsonDocument>(); foreach (BsonDocument bsonDocument in cursor) { YellowstonePathology.Business.Client.Model.Client client = new YellowstonePathology.Business.Client.Model.Client(); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(bsonDocument, client); result.Add(client); } return result; }
private void ButtonAddToGroup_Click(object sender, RoutedEventArgs e) { if (this.ListViewSearchClient.SelectedItem != null) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client) this.ListViewSearchClient.SelectedItem; if (this.m_MembersClientCollection.Exists(client.ClientId) == false) { string clientGroupClientId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Client.Model.ClientGroupClient clientGroupClient = new Business.Client.Model.ClientGroupClient(clientGroupClientId, client.ClientId, this.m_ClientGroup.ClientGroupId); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(clientGroupClient, this); this.m_MembersClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId(this.m_ClientGroup.ClientGroupId); this.NotifyPropertyChanged("MembersClientCollection"); } } }
public ProviderEntry(YellowstonePathology.Business.Domain.Physician physician) { this.m_Physician = physician; this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_PhysicianClientView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianClientView(this.m_Physician.ObjectId); this.m_HpvStandingOrders = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPVStandingOrders(); this.m_HPV1618StandingOrderCollection = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPV1618StandingOrders(); this.m_ClientCollection = new YellowstonePathology.Business.Client.Model.ClientCollection(); InitializeComponent(); this.m_ParentWindow = Window.GetWindow(this); this.DataContext = this; Loaded += ProviderEntry_Loaded; Closing += ProviderEntry_Closing; }
private void ButtonNewClient_Click(object sender, RoutedEventArgs e) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); int clientId = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetLargestClientId() + 1; YellowstonePathology.Business.Client.Model.Client client = new YellowstonePathology.Business.Client.Model.Client(objectId, "New Client", clientId); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(client, this); ClientEntry clientEntry = new ClientEntry(client); clientEntry.ShowDialog(); if (this.m_ClientCollection == null) { this.m_ClientCollection = new Business.Client.Model.ClientCollection(); } this.m_ClientCollection.Insert(0, client); }
public ProviderEntry(YellowstonePathology.Business.Domain.Physician physician, bool isNewProvider) { YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullPhysician(physician, this); this.m_Physician = physician; this.m_IsNewProvider = isNewProvider; this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_PhysicianClientView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianClientView(this.m_Physician.ObjectId); this.m_HpvStandingOrders = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPVStandingOrders(); this.m_HPV1618StandingOrderCollection = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPV1618StandingOrders(); this.m_ClientCollection = new YellowstonePathology.Business.Client.Model.ClientCollection(); InitializeComponent(); this.m_ParentWindow = Window.GetWindow(this); this.DataContext = this; Loaded += ProviderEntry_Loaded; Closing += ProviderEntry_Closing; }
public BillingPage(string reportNo, YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_AccessionOrder = accessionOrder; this.m_ReportNo = reportNo; this.m_FacilityCollection = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance; this.m_FacilityCollection.Insert(0, new Business.Facility.Model.Facility()); this.m_SVHClients = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId("1"); this.m_PanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); this.m_PanelSetOrderCPTCodeCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection; this.m_PanelSetOrderCPTCodeBillCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection; this.m_CaseDocumentCollection = new Business.Document.CaseDocumentCollection(this.m_ReportNo); this.m_PageHeaderText = "Billing For: " + this.m_AccessionOrder.PatientDisplayName + " - " + this.m_AccessionOrder.PBirthdate.Value.ToShortDateString(); InitializeComponent(); DataContext = this; this.Loaded += new RoutedEventHandler(BillingPage_Loaded); this.Unloaded += BillingPage_Unloaded; }
public ProviderEntry(YellowstonePathology.Business.Domain.Physician physician) { this.m_Physician = physician; this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_PhysicianClientView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianClientView(this.m_Physician.ObjectId); this.m_HpvStandingOrders = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPVStandingOrders(); this.m_HPV1618StandingOrderCollection = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPV1618StandingOrders(); this.m_ClientCollection = new YellowstonePathology.Business.Client.Model.ClientCollection(); this.m_HPVStandingOrderCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetHPVStandingOrderCollectionByPhysicianId(this.m_Physician.PhysicianId); this.m_HPVRuleAgeCollection = Business.Client.Model.HPVRuleCollection.GetHPVRuleAgeCollection(); this.m_HPVRulePAPResultCollection = Business.Client.Model.HPVRuleCollection.GetHPVRulePAPResultCollection(); this.m_HPVRulePreviousTestingCollection = Business.Client.Model.HPVRuleCollection.GetHPVRulePreviousTestingCollection(); this.m_HPVRuleEndocervicalCollection = Business.Client.Model.HPVRuleCollection.GetHPVRuleEndocervicalCollection(); InitializeComponent(); this.m_ParentWindow = Window.GetWindow(this); this.DataContext = this; Loaded += ProviderEntry_Loaded; Closing += ProviderEntry_Closing; }
/*private static YellowstonePathology.Business.Client.Model.ProviderClient BuildHomeBaseProviderClient(XElement providerElement) { YellowstonePathology.Business.Client.Model.ProviderClient result = new Client.Model.ProviderClient(); YellowstonePathology.Business.Domain.Physician physician = new Domain.Physician(); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriterP = new Persistence.XmlPropertyWriter(providerElement, physician); xmlPropertyWriterP.Write(); result.Physician = physician; XElement clientElement = providerElement.Element("Client"); if (clientElement != null) { YellowstonePathology.Business.Client.Model.Client client = new Client.Model.Client(); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriterC = new Persistence.XmlPropertyWriter(clientElement, client); xmlPropertyWriterC.Write(); result.Client = client; } XElement providerClientElement = providerElement.Element("ProviderClient"); if (providerClientElement != null) { YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriterPC = new Persistence.XmlPropertyWriter(providerClientElement, result); xmlPropertyWriterPC.Write(); } return result; }*/ private static YellowstonePathology.Business.Client.Model.ProviderClientCollection BuildProviderClientCollection(SqlCommand cmd) { YellowstonePathology.Business.Client.Model.ProviderClientCollection result = new Client.Model.ProviderClientCollection(); YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = new YellowstonePathology.Business.Client.Model.ClientCollection(); using (SqlConnection cn = new SqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString)) { cn.Open(); cmd.Connection = cn; using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.KeyInfo)) { while (dr.Read()) { YellowstonePathology.Business.Client.Model.ProviderClient providerClient = new Client.Model.ProviderClient(); YellowstonePathology.Business.Domain.Physician physician = new Domain.Physician(); Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(physician, dr); sqlDataReaderPropertyWriter.WriteProperties(); providerClient.Physician = physician; result.Add(providerClient); } dr.NextResult(); while (dr.Read()) { YellowstonePathology.Business.Client.Model.Client client = new YellowstonePathology.Business.Client.Model.Client(); Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(client, dr); sqlDataReaderPropertyWriter.WriteProperties(); clientCollection.Add(client); } dr.NextResult(); while (dr.Read()) { string providerClientId = dr["PhysicianClientId"].ToString(); string physicianObjectId = dr["ProviderId"].ToString(); foreach(Client.Model.ProviderClient providerClient in result) { if(providerClient.Physician.ObjectId == physicianObjectId) { providerClient.PhysicianClientId = providerClientId; break; } } } } } foreach (Client.Model.ProviderClient providerClient in result) { foreach (Client.Model.Client client in clientCollection) { if (client.ClientId == providerClient.Physician.HomeBaseClientId) { providerClient.Client = client; break; } } } return result; }
private void ButtonAddToGroup_Click(object sender, RoutedEventArgs e) { if (this.ListViewSearchClient.SelectedItem != null) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client)this.ListViewSearchClient.SelectedItem; if (this.m_MembersClientCollection.Exists(client.ClientId) == false) { int clientGroupClientId = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetLargestClientGroupClientId() + 1; string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Client.Model.ClientGroupClient clientGroupClient = new Business.Client.Model.ClientGroupClient(objectId, clientGroupClientId, client.ClientId, this.m_ClientGroup.ClientGroupId); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(clientGroupClient, this); this.m_MembersClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId(this.m_ClientGroup.ClientGroupId); this.NotifyPropertyChanged("MembersClientCollection"); } } }
private void ButtonRemoveFromGroup_Click(object sender, RoutedEventArgs e) { if (this.ListViewMembers.SelectedItem != null) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client)this.ListViewMembers.SelectedItem; YellowstonePathology.Business.Gateway.PhysicianClientGateway.DeleteClientGroupClient(client.ClientId, this.m_ClientGroup.ClientGroupId); this.m_MembersClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientCollectionByClientGroupId(this.m_ClientGroup.ClientGroupId); this.NotifyPropertyChanged("MembersClientCollection"); } }
private void TextBoxClientNameSearchText_TextChanged(object sender, TextChangedEventArgs e) { if (this.TextBoxClientNameSearchText.Text.Length > 0) { this.m_SearchClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientsByClientName(this.TextBoxClientNameSearchText.Text); this.NotifyPropertyChanged("SearchClientCollection"); } }
public static YellowstonePathology.Business.Client.Model.ClientCollection GetClientsByClientName(string clientName) { YellowstonePathology.Business.Client.Model.ClientCollection result = new YellowstonePathology.Business.Client.Model.ClientCollection(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection collection = server.Database.GetCollection<BsonDocument>("Client"); MongoCursor cursor = collection.FindAs<BsonDocument>(Query.Matches("ClientName", BsonRegularExpression.Create("^" + clientName + ".*", "i"))); foreach (BsonDocument bsonDocument in cursor) { YellowstonePathology.Business.Client.Model.Client client = (YellowstonePathology.Business.Client.Model.Client)YellowstonePathology.Business.Mongo.BSONObjectBuilder.Build(bsonDocument, typeof(YellowstonePathology.Business.Client.Model.Client)); result.Add(client); } return result; }
public void GetAllClientsTest() { YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGatewayMongo.GetAllClients(); Assert.IsTrue(clientCollection.Count > 0); }
private static YellowstonePathology.Business.Client.Model.ClientCollection BuildClientCollection(XElement sourceElement) { YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = new YellowstonePathology.Business.Client.Model.ClientCollection(); if (sourceElement != null) { foreach (XElement clientElement in sourceElement.Elements("Client")) { ClientBuilder builder = new ClientBuilder(); builder.Build(clientElement); YellowstonePathology.Business.Client.Model.Client client = builder.Client; clientCollection.Add(client); } } return clientCollection; }
private void DoClientSearch(string clientName) { this.m_ClientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientsByClientName(clientName); NotifyPropertyChanged("ClientCollection"); this.ListViewProviders.SelectedIndex = -1; }
public void GetClientsByClientNameTest() { YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = YellowstonePathology.Business.Gateway.PhysicianClientGatewayMongo.GetClientsByClientName("yellow"); Assert.IsTrue(clientCollection.Count >= 13); }