Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
patient portal
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { List<patient> pati = new List<patient>(); pati.Add(new patient(){ID =1,patientname = "james",facility="F1",careprovider = "nurse",testresults = 0, authorizedperson = "friend"}); pati.Add(new patient(){ID =2,patientname = "lewis",facility="F2",careprovider = "nurse2",testresults = 1, authorizedperson = "friend1"}); pati.Add(new patient(){ID =3,patientname = "mina",facility="F3",careprovider = "nurse3",testresults = 0, authorizedperson = "friend2"}); pati.Add(new patient(){ID =4,patientname = "manju",facility="F1",careprovider = "nurse1",testresults = 0, authorizedperson = "relatives"}); pati.Add(new patient(){ID =5,patientname = "toni",facility="F4",careprovider = "nurse4",testresults = 1, authorizedperson = "neighbour"}); pati.Add(new patient(){ID =6,patientname = "ron",facility="F1",careprovider = "nurse3",testresults = 1, authorizedperson = "parents"}); patient.test(pati, pat => pat.testresults==0); patient.test(pati, pat=>pat.facility=="F1"); } } } public delegate bool patientresults(patient patien); public class patient { public int ID{get;set;} public string patientname{get;set;} public string facility{get;set;} public string careprovider{get;set;} public int testresults{get;set;} public string authorizedperson{get;set;} public static void test(List<patient> listpatient,patientresults testfail) { foreach (patient p in listpatient) if(testfail(p)) { Console.WriteLine("Refer to Chemotherapy" + " " + p.patientname ); }else { Console.WriteLine("Refer to Medication" + " " + p.patientname ); } } }
run
|
edit
|
history
|
help
0
Program
Checking time span between two timezone times
derfgtredwcdf
bla bla
Калькулятор
Armstrong
give coins
random number generator
asdfrtgeryrutu
jjj