This topic is locked

Add New with One-To-Many Relations

12/18/2011 5:04:29 PM
PHPRunner General questions
D
DouglasB author

I have a One-To-Many relationship setup at http://www.smgclinic.com/NPDB/tbl_Patient_Main_add.php . What I want to do is combind these two tables into one comprehensive ADD NEW. But I realize this might not be possible as the Patient Main Table is the master making Medical Conditions the MANY side of the equation. So a new patient would come to the page and add his/her patient contact info and one or more medical conditions before saving all the infomation entered.
So how do I modify this page to allow that to happen?

Sergey Kornilov admin 12/19/2011

It's not really clear how do you want to combine there two forms. Do you have a mockup or a screenshot?

D
DouglasB author 12/19/2011

Merry Christmas Serg & Jane,
Yes, I know I'm not explaining myself well. It's very confusing but take a look at http://www.smgclinic.com/NPDB/tbl_Patient_Main_add.php. As we see from this page a user would fill out the upper part of the form and this writes to the tbl_Patient_Main. Now IF the user does not click SAVE, they SHOULD NOT, but go down to the bottom of the page and there they and input multiple Medical Conditions by clicking the InLINE ADD. After they add all the medical conditions THEN they should click the SAVE button.
The current layout is very confusing so I'm looking for a way to simplfy this process for the user so it's not so complex. I know I can split this but using some DAL having the user complete the Patient Main then taking them to the Medical Condition portion but that seems complex too. Any ideas?

Sergey Kornilov admin 12/20/2011

I understand that you see this form as "too complicated". However it's not clear how do you want to modify it.

D
DouglasB author 12/20/2011



I understand that you see this form as "too complicated". However it's not clear how do you want to modify it.


I wanted to combind the two forms into one one but I see now that is not possible. I'll use the traditional way of using Master Detail Add http://xlinesoft.com/phprunner/docs/redirect_to_details_page_after_master_record_was_added.htm
Thanks for the assist!
Merry Christmas!!