Пример #1
0
        public static void Main(string[] args)
        {
            IPatient inPatient = new Inpatient((Inpatient)connectDB());

            inPatient.DisplayPatientDetails();
            inPatient.sendPatientAlert();
        }
Пример #2
0
        // Just initializing with dummy data to test.
        // later data must be taken from db.
        public Inpatient(Inpatient objPatient)
        {
            PatientID   = objPatient.PatientID;
            PatientName = objPatient.PatientName;
            PatientAge  = objPatient.PatientAge;

            usageInfo.UsageID         = objPatient.usageInfo.UsageID;
            usageInfo.ExpectedStartDt = objPatient.usageInfo.ExpectedStartDt;
            usageInfo.ActualStartDt   = objPatient.usageInfo.ActualStartDt;

            usageInfo.DeclineHistory = objPatient.usageInfo.DeclineHistory;
        }
Пример #3
0
        // connect to DB and get data.
        public static Inpatient connectDB()
        {
            // Dummy data. will fetch data from DB later.
            Inpatient inPatient = new Inpatient();

            inPatient.PatientID   = 100;
            inPatient.PatientAge  = 20;
            inPatient.PatientName = "someone";
            //inPatient.PatientType = inPatient.PatientType;
            inPatient.DoctorID = 100;

            inPatient.usageInfo.UsageID         = 10020;
            inPatient.usageInfo.ExpectedStartDt = DateTime.Now.AddDays(-15);
            inPatient.usageInfo.ActualStartDt   = DateTime.Now.AddDays(-10);
            inPatient.usageInfo.DeclineHistory.Add(DateTime.Now.AddDays(-2), 100);

            return((Inpatient)inPatient);
        }