public IHCMolecularRequisition(int clientId) { this.m_PrintDocument = new System.Drawing.Printing.PrintDocument(); this.m_ClientId = clientId; this.m_ClientPhysicianView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientPhysicianViewByClientIdV2(this.m_ClientId); this.m_Barcode = new YellowstonePathology.Business.BarcodeScanning.BarcodeVersion1(YellowstonePathology.Business.BarcodeScanning.BarcodePrefixEnum.CLNT, this.m_ClientId.ToString()); }
public CytologyRequisition(int clientId) { this.m_PrintDocument = new System.Drawing.Printing.PrintDocument(); this.m_ClientId = clientId; this.m_ClientPhysicianView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientPhysicianViewByClientIdV2(this.m_ClientId); this.m_Barcode = new Business.BarcodeScanning.BarcodeVersion1(Business.BarcodeScanning.BarcodePrefixEnum.CLNT, this.m_ClientId.ToString()); }
public static View.ClientPhysicianView GetClientPhysicianViewByClientId(int clientId) { YellowstonePathology.Business.View.ClientPhysicianView result = new YellowstonePathology.Business.View.ClientPhysicianView(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection clientCollection = server.Database.GetCollection <BsonDocument>("Client"); BsonDocument clientBsonDocument = clientCollection.FindOneAs <BsonDocument>(Query.EQ("ClientId", BsonValue.Create(clientId))); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(clientBsonDocument, result); MongoCollection physicianClientCollection = server.Database.GetCollection <BsonDocument>("PhysicianClient"); MongoCursor physicianClientCursor = physicianClientCollection.FindAs <BsonDocument>(Query.EQ("ClientId", BsonValue.Create(clientId))); List <BsonValue> physicianIdList = new List <BsonValue>(); foreach (BsonDocument bsonDocument in physicianClientCursor) { physicianIdList.Add(bsonDocument.GetValue("PhysicianId")); } MongoCollection physicianCollection = server.Database.GetCollection <BsonDocument>("Physician"); MongoCursor physicianCursor = physicianCollection.FindAs <BsonDocument>(Query.In("PhysicianId", physicianIdList)).SetSortOrder(SortBy.Ascending("FirstName")); foreach (BsonDocument bsonDocument in physicianCursor) { YellowstonePathology.Business.Domain.Physician physician = new YellowstonePathology.Business.Domain.Physician(); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(bsonDocument, physician); result.Physicians.Add(physician); } return(result); }
public ClientEntry(YellowstonePathology.Business.Client.Model.Client client) { this.m_Client = client; this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_ClientPhysicianView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientPhysicianViewByClientIdV2(this.m_Client.ClientId); if (this.m_ClientPhysicianView == null) { this.m_ClientPhysicianView = new Business.View.ClientPhysicianView(); } this.m_InsuranceTypeCollection = new Business.Billing.Model.InsuranceTypeCollection(true); this.m_FacilityTypes = new List<string>(); this.m_FacilityTypes.Add("Hospital"); this.m_FacilityTypes.Add("Hospital Owned Clinic"); this.m_FacilityTypes.Add("Non-Grandfathered Hospital"); this.m_FacilityTypes.Add("Non-Hospital"); this.m_DistributionTypeList = new YellowstonePathology.Business.ReportDistribution.Model.DistributionTypeList(); this.m_BillingRuleSetCollection = YellowstonePathology.Business.Billing.Model.BillingRuleSetCollection.GetAllRuleSets(); this.m_ClientSupplyOrderCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientSupplyOrderCollectionByClientId(this.m_Client.ClientId); InitializeComponent(); this.DataContext = this; Closing += ClientEntry_Closing; }
public ClientEntryV2(YellowstonePathology.Business.Client.Model.Client client, bool isNewClient) { this.m_Client = client; this.m_IsNewClient = isNewClient; if (this.m_IsNewClient == true) { YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(this.m_Client, this); } else { YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullClient(client, this); } this.m_SystemIdentity = Business.User.SystemIdentity.Instance; this.m_ClientPhysicianView = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientPhysicianViewByClientIdV2(this.m_Client.ClientId); if (this.m_ClientPhysicianView == null) { this.m_ClientPhysicianView = new Business.View.ClientPhysicianView(); } this.m_InsuranceTypeCollection = new Business.Billing.InsuranceTypeCollection(true); this.m_FacilityTypes = new List <string>(); this.m_FacilityTypes.Add("Hospital"); this.m_FacilityTypes.Add("Hospital Owned Clinic"); this.m_FacilityTypes.Add("Non-Grandfathered Hospital"); this.m_FacilityTypes.Add("Non-Hospital"); this.m_DistributionTypeList = new YellowstonePathology.Business.ReportDistribution.Model.DistributionTypeList(); this.m_BillingRuleSetCollection = YellowstonePathology.Business.Billing.Model.BillingRuleSetCollection.GetAllRuleSets(); this.m_ClientSupplyOrderCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientSupplyOrderCollectionByClientId(this.m_Client.ClientId); InitializeComponent(); this.DataContext = this; Closing += ClientEntry_Closing; }
public static View.ClientPhysicianView GetClientPhysicianViewByClientId(int clientId) { YellowstonePathology.Business.View.ClientPhysicianView result = new YellowstonePathology.Business.View.ClientPhysicianView(); YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(YellowstonePathology.Business.Mongo.MongoTestServer.LISDatabaseName); MongoCollection clientCollection = server.Database.GetCollection<BsonDocument>("Client"); BsonDocument clientBsonDocument = clientCollection.FindOneAs<BsonDocument>(Query.EQ("ClientId", BsonValue.Create(clientId))); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(clientBsonDocument, result); MongoCollection physicianClientCollection = server.Database.GetCollection<BsonDocument>("PhysicianClient"); MongoCursor physicianClientCursor = physicianClientCollection.FindAs<BsonDocument>(Query.EQ("ClientId", BsonValue.Create(clientId))); List<BsonValue> physicianIdList = new List<BsonValue>(); foreach (BsonDocument bsonDocument in physicianClientCursor) { physicianIdList.Add(bsonDocument.GetValue("PhysicianId")); } MongoCollection physicianCollection = server.Database.GetCollection<BsonDocument>("Physician"); MongoCursor physicianCursor = physicianCollection.FindAs<BsonDocument>(Query.In("PhysicianId", physicianIdList)).SetSortOrder(SortBy.Ascending("FirstName")); foreach (BsonDocument bsonDocument in physicianCursor) { YellowstonePathology.Business.Domain.Physician physician = new YellowstonePathology.Business.Domain.Physician(); YellowstonePathology.Business.Mongo.BSONPropertyWriter.Write(bsonDocument, physician); result.Physicians.Add(physician); } return result; }
public void GetClientPhysicianViewByClientIdTest() { YellowstonePathology.Business.View.ClientPhysicianView result = YellowstonePathology.Business.Gateway.PhysicianClientGatewayMongo.GetClientPhysicianViewByClientId(280); Assert.IsTrue(result.ClientId == 280); Assert.IsTrue(result.Physicians.Count > 0); }