@Html.ActionLink("Details", "Details", new { id = item.PatientsId })
So I can choose what record to edit or view the details.
This works for one model
var patients = ((from p in _db.Patients
select new PatientsModel()
{
PatientsId = p.PatientsId,
ClientID = p.ClientID,
DOB = p.DOB,
Gender = p.Gender,
Handedness = p.Handedness,
RecordingDate = p.RecordingDate,
TimeRecording = p.TimeRecording,
EO = p.EO,
EC = p.EC,
Task = p.Task,
Referred_for = p.Referred_for,
Evaluation_Number = p.Evaluation_Number,
Years_of_Education = p.Years_of_Education.Value,
Marital_Status = p.Marital_Status,
Abnormality = p.Abnormality,
Vision = p.Vision,
Appearance = p.Appearance,
Sleep_Disorder = p.Sleep_Disorder,
Accident = p.Accident,
Employed = p.Employed,
Veteran = p.Veteran,
Activities = p.Activities,
FileUrl = p.FilesUrl,
}).SingleOrDefault(i => i.PatientsId == id));
return View(patients);
which represents one table. I have 11 more that need to populate rest of the form.
Any help will be appreciated.
The other 11 tables or models are(MedicalBackgroundModel,PsycologicalModel, CurrentMoodModel, DietInformationModel, BehaviorModel, MedicationModel, SupplementsInformationModel, AssessmentModel, NeurofeedbackModel, OtherDataModel, NarrativeModel )
Thanks, |