Dr.Gopala krishnam raju AMBATI Posted January 27, 2017 Posted January 27, 2017 above image shows my patient record regarding previous prescription ..... i made button with plus sign above assigning duplicate record request ...... problem is when i am clicking button nxt record is showing like below ... showing me incomplete data only few fileds data is visible why is this happening someone please help me thanks please
Wim Decorte Posted January 27, 2017 Posted January 27, 2017 What are the fields that have missing data? Related data? Data from the same table? If the first then you also need to duplicate those child records. If the latter then check for any auto-enter settings on those fields.
Dr.Gopala krishnam raju AMBATI Posted January 27, 2017 Author Posted January 27, 2017 40 minutes ago, Wim Decorte said: What are the fields that have missing data? Related data? Data from the same table? If the first then you also need to duplicate those child records. If the latter then check for any auto-enter settings on those fields. missing fields data is from related table but fifth one pantocid copied why didnt 2nd 3rd and 4th copied fbg and ppbg are from same table
Wim Decorte Posted January 27, 2017 Posted January 27, 2017 When you duplicate a parent, that does not duplicate the related children; you have to do that explicitly. and reset the foreign key in the new children to match the new parent's primary key value. The fact that some related does show up means that the relationship is probably not well defined - it probably should not show up.
Dr.Gopala krishnam raju AMBATI Posted January 28, 2017 Author Posted January 28, 2017 14 hours ago, Wim Decorte said: When you duplicate a parent, that does not duplicate the related children; you have to do that explicitly. and reset the foreign key in the new children to match the new parent's primary key value. The fact that some related does show up means that the relationship is probably not well defined - it probably should not show up. understood the point sir this time i guess my problem is very big have to think a lot with my medical brain for logical answer
comment Posted January 28, 2017 Posted January 28, 2017 (edited) 11 hours ago, Dr.Gopala krishnam raju AMBATI said: this time i guess my problem is very big The big problem here is understanding what exactly are you trying to do, and in which context. If (as it seem from your description) you are on a layout of Patients, it makes no sense whatsoever to duplicate it. To duplicate a patient's prescription, along with its children drug items (assuming you do have a structure of Patients -< Prescriptions -< DrugItems > Drugs), you need to start by going to the selected prescription's record in a layout of the Prescriptions table. From there you can proceed as described here: http://fmforums.com/topic/54552-duplicate-a-record-with-portals/?do=findComment&comment=257797 Edited January 28, 2017 by comment
Dr.Gopala krishnam raju AMBATI Posted January 28, 2017 Author Posted January 28, 2017 (edited) patient prescription record this pic 1 is related data from other table this pic 2 is from same table this pic 3 data from other table this pic 4 from same table now i am duplicating pic is below question is pic 1 & pic 4 data is getting copied when duplicated why not pic 2 and pic 3 is my question hope i am clear this tym if i made mistake in making relationship the data wont appear right , so i am not understanding why ?? duplicating copies data from same table without problem then why not pic 2 isnt copied as it is from same table ?? sir it has big sense in reality , i am duplicating because some drugs need to be continued some to be changed for being easier on me i thought of duplicating to make neccesary changes to new prescription Edited January 28, 2017 by Dr.Gopala krishnam raju AMBATI new question
Wim Decorte Posted January 28, 2017 Posted January 28, 2017 The record you want to duplicate is the patient's prescription. That's fine and understood. The patient's data still shows up on the duplicated record: that's normal because part of the duplicate record is the patient id and that one still points to the correct patient. Any data related to the prescription as 'children' of the prescription, like the things that you prescribe are not duplicated by the act of duplicating the prescription. That is normal and to be expected. As I have stated before: you have to explicitly also duplicate the children and reset their parent ID so that the new prescription will show the correct prescription items.
Dr.Gopala krishnam raju AMBATI Posted January 29, 2017 Author Posted January 29, 2017 14 hours ago, Wim Decorte said: you have to explicitly also duplicate the children and reset their parent ID so that the new prescription will show the correct prescription items. understood i need to change the design strategy , wish i was ur / comments neighbour no one available in india
Recommended Posts
This topic is 2854 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now