Jump to content

Recommended Posts

Ashampoo_Snap_2017.01.27_11h11m48s_002_.png

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

 

Ashampoo_Snap_2017.01.27_11h14m33s_003_.png

only few fileds data is visible why is this happening someone please help me thanks please :(

Ashampoo_Snap_2017.01.27_11h16m38s_004_.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites
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 :(

Share this post


Link to post
Share on other sites
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 by comment

Share this post


Link to post
Share on other sites

 

 

  patient prescription record

Ashampoo_Snap_2017.01.28_22h55m10s_001_.png

this pic 1 is related data from other table

Ashampoo_Snap_2017.01.28_22h56m07s_002_.png

this pic 2 is from same table

Ashampoo_Snap_2017.01.28_22h56m28s_003_.png

this pic 3 data from other table

Ashampoo_Snap_2017.01.28_22h56m46s_004_.png

this pic 4 from same table

Ashampoo_Snap_2017.01.28_22h56m58s_005_.png

now i am duplicating pic is below

Ashampoo_Snap_2017.01.28_22h57m08s_006_.png

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 ??

 

Ashampoo_Snap_2017.01.28_23h11m11s_007_.png 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 by Dr.Gopala krishnam raju AMBATI
new question

Share this post


Link to post
Share on other sites

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.

 

 

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.