static void Main(string[] args) { info A = new info(); //Prompting the user Console.WriteLine("please indicate if it as a private or an public Hospital "); A.setHospitalPUBPRIV(Console.ReadLine()); Console.WriteLine("please enter wich hospital"); A.setHospitalName(Console.ReadLine()); Console.WriteLine("please enter the address"); A.setAddress(Console.ReadLine()); Console.WriteLine("In wich province is the Hospital"); A.setProvince(Console.ReadLine()); //capture the info from the capture class Capture c = new Capture(); c.addPerson(); //Print all information that is inside the class printDetails p = new printDetails(); p.PrintItems(); }
public void print_Report() { info i = new info(); Console.Clear(); Console.WriteLine("Covid-19 Vaccine"); Console.WriteLine("******************************************"); Console.WriteLine("General Information"); Console.WriteLine("------------------------------------------"); Console.WriteLine("Hospital name: " + i.getHospital_Name()); Console.WriteLine("Address: " + i.getAddress()); Console.WriteLine("Public or Private: " + i.getType()); Console.WriteLine("------------------------------------------"); Console.WriteLine("Information on each patient: "); Console.WriteLine("------------------------------------------"); for (int x = 0; x < i.size(); x++) { Console.WriteLine("ID Number: {0} " + "\nMedical Aid: {1} " + "\nName: {2} " + "\nSurname: {3} " + "\nRefering Dr: {4} " + "\nAllergies: {5}" + "\nHad Covid: {6}" + "\nVaccine they are getting: {6}", i.getIDNumber(x), i.getMedicalAid(x), i.getName(x), i.getSurname(x), i.getRefDr(x), i.getAllergies(x), i.getCovidPostive(x), i.getVaccine(x)); Console.WriteLine("###############################################################"); } Console.ReadLine(); }
public void PrintItems() { info A = new info(); Console.Clear(); //Asking user Console.WriteLine("HOSPITAL REPORT\n---------------------------------------------------"); Console.WriteLine("Hospital name " + A.getHospital_Name()); Console.WriteLine("Hospital name " + A.getAddress()); Console.WriteLine("Hospital name " + A.getHospitalPUBPRIV()); Console.WriteLine("---------------------------------------------------"); //wanting to loop the array for (int x = 0; x < A.size(); x++) { Console.WriteLine("PATIENT REPORT\n---------------------------------------------------"); Console.WriteLine("ID Number : " + A.getIDNumber(x) + "\nMedical Aid: " + A.getMedicalAid(x) + "\nName: " + A.getName(x) + "\nSurname: " + A.getSurname(x) + "\nRefering Dr: " + A.getRefDr(x) + "\nAllergies: " + A.getAllergies(x) + "\nHad covid: " + A.getCovidPostive(x) + "\nVaccine brand : " + A.getVaccine(x) + "\n---------------------------------------------------")); } }
static void Main(string[] args) { capture cp = new capture(); info i = new info(); PrintOut p = new PrintOut(); cp.getInfo(); p.print_Report(); }
public void setPatientInfo() { info x = new info(); Console.Clear(); for (int i = 0; i < x.ArraySize; i++) { Console.WriteLine("Please enter Patient ID:"); string strID = Console.ReadLine(); Console.WriteLine("Please enter Patient Medical Aid:"); string strMedAid = Console.ReadLine(); Console.WriteLine("Please enter Patient First Name:"); string strName = Console.ReadLine(); Console.WriteLine("Please enter Patient Surname:"); string strSurname = Console.ReadLine(); Console.WriteLine("Please enter Patient Referrer Dr:"); string strRefDoc = Console.ReadLine(); Console.WriteLine("Please enter Patient Allergies:"); string strAllergies = Console.ReadLine(); Console.WriteLine("Please enter Vaccine Administerred:"); string strVaccine = Console.ReadLine(); Console.WriteLine("Please enter Patient Blood Type:"); char cBloodType = Console.ReadLine()[0]; Console.WriteLine("Is Patient C-19 Positive?:"); bool bHasCovid; switch (Console.ReadLine()) { case "true": case "Yes": case "yes": case "YES": case "True": case "TRUE": case "y": case "Y": bHasCovid = true; break; default: bHasCovid = false; break; } x.AddPatient(strID, strMedAid, strName, strSurname, strRefDoc, cBloodType, strAllergies, bHasCovid, strVaccine); } }
static void Main(string[] args) { capture cp = new capture(); info i = new info(); printout p = new printout(); cp.getHospitalInfo(); cp.getPatientInfo(); p.printoutHospital(); p.printoutPatients(); }