예제 #1
0
        private Diagnosis Prescribe(DoctorDiagnosis diagnosis)
        {
            //doctor chooses a aingle treatment and instantiates the diagnosis with the ailment and that specific treatment
            var treatment = ChooseTreatment(diagnosis);

            diagnosis.UpdateTreatment(this, treatment);
            return(diagnosis);
        }
예제 #2
0
        private Treatment ChooseTreatment(DoctorDiagnosis diagnosis)
        {
            var ailment             = diagnosis.GetAilment();
            var potentialTreatments = diagnosis.GetAilment().treatments;
            //choice logic
            var treatment = potentialTreatments[0]; //replace with logic

            return(treatment);
        }
예제 #3
0
        public Diagnosis Diagnose(List <Symptom> symptoms)
        {
            ///check symptoms against ailment dictionary
            //ailment with the most symptoms == diagnosed ailment
            Ailment ailment   = null; //placeholder
            var     diagnosis = new DoctorDiagnosis();

            diagnosis.UpdateAilment(this, ailment);
            return(diagnosis);
        }