public void TestTransactionsDetailForDateNotMatchDate()
        {
            //Arrange
            var patient  = new NationalPatient(4532, "James", "Smith");
            var p        = new PatientHistory();
            var jaundise = new Disease("Jaundice", true);

            //Act
            p.AddPatientTransaction(patient, new DateTime(2014, 12, 26), jaundise);

            //Assert
            Assert.IsFalse(p.CheckTransactionLogAvailability(patient, new DateTime(2042, 09, 21)));
        }
        public void TestTransactionDiseaseLog()
        {
            //Arrange
            var patient = new NationalPatient(4532, "James", "Smith");
            var p       = new PatientHistory();
            var cancer  = new Disease("Cancer", true);

            // Act
            p.AddPatientTransaction(patient, new DateTime(2015, 12, 26), cancer);

            //Assert
            Assert.AreEqual("Cancer", p.ReturnDiseaseLog(patient, new DateTime(2015, 12, 26)));
        }
        public void TestNumberOfTransaction()
        {
            //Arrange
            var patient  = new NationalPatient(4532, "James", "Smith");
            var p        = new PatientHistory();
            var jaundise = new Disease("Jaundice", true);

            //Act
            p.AddPatientTransaction(patient, new DateTime(2014, 12, 26), jaundise);

            //Assert
            Assert.AreEqual(1, p.NumberOfTransactions());
        }
        static void Main(string[] args)
        {
            var disease         = new Disease("Cancer", true);
            var disease1        = new Disease("HIV", true);
            var historyInstance = new PatientHistory();
            var tony            = new NationalPatient(74565, "Tony", "Stark");
            var gaurav          = new InternationalPatient(54949, "Gaurav", "Rana");

            Console.WriteLine(gaurav.FirstName + "," + gaurav.LastName + ", "
                              + gaurav.PatientID + "," + gaurav.InsuraceDetail);

            historyInstance.AddPatientTransaction(tony, new DateTime(2015, 03, 21), disease);
            Console.WriteLine("Disease: " + historyInstance.ReturnDiseaseLog(tony, new DateTime(2015, 03, 21)));

            Console.WriteLine("Testing return patient history: " +
                              historyInstance.ReturnPatientDetails(new DateTime(2015, 03, 21), disease)
                              .PatientID + ", " + historyInstance.ReturnPatientDetails(new DateTime(2015, 03, 21), disease)
                              .FirstName + ", " + historyInstance.ReturnPatientDetails(new DateTime(2015, 03, 21), disease)
                              .LastName);

            historyInstance.AddPatientTransaction(tony, new DateTime(2015, 04, 22), disease1);
            historyInstance.GetAllPatientTransactions();
            Console.WriteLine(historyInstance.NumberOfTransactions());

            historyInstance.RemovePatientTransaction(tony, new DateTime(2015, 03, 21));
            historyInstance.GetAllPatientTransactions();
            Console.WriteLine(historyInstance.NumberOfTransactions());

            Patient pa = new NationalPatient();

            var pm = new PatientManagement();

            pm.AddPatient(tony);
            pm.AddPatient(pa);

            Console.WriteLine(pm.PatientCount());
            //pm.GetAllPatients();
        }
        public void TestPatientID_Detail()
        {
            // Arrange
            var patient = new InternationalPatient(25495, "James", "Smith");
            var aids    = new Disease("AIDS", false);
            var history = new PatientHistory();
            var date    = new DateTime(2015, 11, 26);

            // Act
            history.AddPatientTransaction(patient, date, aids);

            // Assert
            Assert.AreEqual(25495, history.ReturnPatientDetails(date, aids).PatientID);
        }