Results 1 to 4 of 4
  1. #1
    kpk is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    2

    Relationship between tables

    Experts are requested to help me improve my dbase. I have the following tables.



    tblProfile
    PtID PK
    PtName
    Age
    Sex
    Address
    .....

    tblDiagnosis
    DXID PK
    DX

    tblDrugs
    DrugID PK
    DrugName
    Strength
    Dose
    ......

    I have no problem entering drugs, one by one, for each patient. I want to relate the tables in such a way that I may become able to enter group of drugs ( based on diagnosis) instead of one drug at a time. Of course, I will first enter drugs for each diagnosis. I am not trained in access but I have managed to make a dbase which fulfils my needs. Thanks to all the experts whom I benefited from.
    kpk

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Tables shown do not have relationships.

    You will need another table to relate diagnosis with drugs.
    tblDiagDrugs
    ID (pk)
    DiagnosisID (fk)
    DrugID (fk)

    This doesn't quite make sense to me. How can you assign a dose attribute to a drug? Dosage is so variable according to patient. Not every patient will receive the exact same drug 'package' for same diagnosis.
    Last edited by June7; 10-14-2011 at 11:40 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kpk is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    2
    Many thanks.
    You are right about dosage variations. In fact my Form has combos with lookup values which i use for adjusting dose for each patient individually.
    I made a join table joining tblProfile, tblDX and tablDrugs. I have a tblProfile Form with tblDrugs as subform but the subform tbldrugs will not store the drugs selected through a combo (tblDX0). In fact i succeed in loading drugs through the combo but the subformDrugs wont move in synchrony with tblProfile Form. I mean the drugs selected through the combo should become a part of the patient's record but I can't figure it out.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I was assuming you had a table that related patient with diagnosis, assuming patient can have more than one visit and therefore more than one diagnosis, or even multiple diagnoses for one visit.

    tblPatientDiagnosis
    PatientID (fk)
    Diagnosis (fk)
    VisitDate (or VisitID - might need a Visits table)

    This will provide the link to the diagnosis/drug relationship. However, I still don't understand how you can 'package' drugs for each diagnosis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 10-04-2011, 12:53 PM
  2. Replies: 9
    Last Post: 09-28-2011, 11:56 AM
  3. relationship between the tables
    By mer in forum Queries
    Replies: 1
    Last Post: 07-05-2011, 05:52 AM
  4. Relationship - Three Tables - No Duplicates
    By Huddle in forum Database Design
    Replies: 15
    Last Post: 07-27-2010, 07:45 AM
  5. Replies: 1
    Last Post: 10-28-2008, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums