I think that's likely the best approach here. I toyed with the idea of constructing a relationship that would link such "chronic" diagnosis records to every visit, but since such diagnoses could change over time and I believe you wouldn't want such changes to modify past visit records, I ruled out that approach.
You might consider a "chronic diagnosis" table that lists the Diagnosis ID and PT_ID of every such Diagnosis. This "join" table could be regularly updated as a patient's condition (or the doctor's understanding of it) changes. Each new visit script could check this table for diagnosis records that should be replicated in the Diagnosis table and linked via MV_ID to the most recent MedicalVisit record.
ok, ive been going at it for a bit and seem to be in a brain lock here,
I created a new table named it ChronicDiagnosis with fields PT_ID, Chronic_ID, and Diagnosis.
I figure I can add a Button on the layout to open a new small window to a layout pertaining to this table and have the doctor create a list and then adjust the script for the new medical visit to copy these diagnosis and add them to the current visit upon creation of the visit, when the doctor get to the part of the layout with the portal to add any new diagnosis he can simply delete those diagnosis that dont pertain to the visit and at any time go back and adjust the list.
How would i copy the diagnosis over from that table to the current "Diagnosis" table?
Or did I misunderstand what you were suggesting?
I deliberately went light on the details until I got a response from you to make sure this idea made sense to you.
You'd have to loop through these records and for each such record, either perform a find on the diagnosis table or use Go To Related Records to find the diagnosis record, then use duplicate record to make a copy of the record and update the MV_ID field with the ID of the patient's latest visit. Final step would be to update the record in the chronic diagnosis table with the ID of the newly created duplicate entry so that if the doctor updates any of the data in the diagnosis record, the updated data will appear for the patient's future visits.