private void displayHopitalInfo(info i) { edtHosNameOutput.Text = i.Hospital_Name; edtHosAddressOutput.Text = i.Hospital_Address; edtHosProvinceOutput.Text = i.CProvince.ToString(); edtHosTypeOutput.Text = i.BType.ToString(); }
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); } }
private void loadPatients(info i) { lbxPatientInfo.Items.Clear(); for (int x = 0; x < i.ArraySize; x++) { lbxPatientInfo.Items.Add("Patient Name and ID: " + i.StrName[x] + " " + i.StrSurname + "\t" + i.StrID[x]); lbxPatientInfo.Items.Add("Medical Aid: " + i.StrMedAid[x]); lbxPatientInfo.Items.Add("Blood Type:" + i.CBloodType[x]); lbxPatientInfo.Items.Add("Referring Dr: " + i.StrRefDoc[x]); lbxPatientInfo.Items.Add("Allergies: " + i.StrAllergies[x]); lbxPatientInfo.Items.Add("Vaccine: " + i.StrVaccine[x]); lbxPatientInfo.Items.Add("Patient had COVID-19: " + i.BHasCovid.ToString()[x]); lbxPatientInfo.Items.Add("====================================="); } }
private void setPatientDetails(info i) { string strID = edtPID.Text; string strFirstName = edtPName.Text; string strSurname = edtSurname.Text; string strMedAid = edtMedAid.Text; string strRefDoc = edtRefDoc.Text; char cBloodType = edtBloodType.Text[0]; string strAllergies = edtAllergies.Text; string strVaccine = edtVaccine.Text; bool bHadCovid = cbxHadCovid.Checked; i.setArrays(i.ArraySize + 1); i.AddPatient(strID, strMedAid, strFirstName, strSurname, strRefDoc, cBloodType, strAllergies, bHadCovid, strVaccine); }
private void setHospitalinfo(info i) { i.Hospital_Name = edtHosNameInput.Text; i.Hospital_Address = edtHosAddressInput.Text; i.CProvince = edtHosProvinceInput.Text[0]; switch (cbxType.SelectedIndex) { case 0: i.BType = true; break; default: i.BType = false; break; } }
public void printDetails() { info x = new info(); Console.Clear(); Console.WriteLine("Welcome to " + x.Hospital_Name + " hospital."); Console.WriteLine("============================================"); Console.WriteLine("Hospital Info:"); Console.WriteLine("Address: " + x.Hospital_Address); Console.WriteLine("Private/Public?: " + x.BType); Console.WriteLine("Province: " + x.CProvince); Console.WriteLine("============================================"); Console.WriteLine("Patient ID|Patient Name|Patient Surname|Patient Medical Aid|Patient Referring Dr.|Patient Blood Type|Patient Allergies|Patient has C-19|Vaccine Administerred"); for (int i = 0; i < x.ArraySize; i++) { Console.Write(x.StrID[i] + "|" + x.StrName[i] + "|" + x.StrSurname[i] + "|" + x.StrMedAid[i] + "|" + x.StrRefDoc[i] + "|" + x.CBloodType[i] + "|" + x.StrAllergies[i] + "|" + x.BHasCovid[i] + "|" + x.StrVaccine[i]); } }