Results 1 to 8 of 8
  1. #1
    jsinger is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6

    Matching blood types

    Hi,



    I'm trying to set up an application that matches blood donors with patients according to blood type.
    It's easy to match up blood type A donors to blood type A patients. (3 tables: donors, patients, blood type)
    However - type A donors can donate blood not only to type A patients, but also to type AB patients. Type O donors can donate to A, B, AB, or O. And so on.
    Any ideas how I can build this into a database?
    TIA

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    First you have to create an algorithm to match the logic in your post. Have you built a sample with pencil and paper to verify/test/validate your logic?
    There is an old adage in database/IT ---If you can't define it, nobody can program/build it. Applies here.

    Eg: If DonorBT is type "A" Then
    Patient may be "A" or "AB"
    .......

    tblDonor
    DonorID
    DonorName
    DonorBT

    tblPatient
    PatientID
    PatientName
    PatientBT
    OtherPatientInfo

    tblValidBTCombos
    ValidBTID
    DonorBT
    PatientBT


    This table would have records such as:
    Code:
    1,A,A                     Donor Type A can donate to Patient Type A
    2,A,AB                    Donor Type A can donate to Patient Type AB
    3,O,A
    3,O,B
    3,O,AB
    3,O,O

  3. #3
    jsinger is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6
    Great, thanks, but can you help me define the relationships?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Can you supply a few of the business rules involved?
    What are the specifications/instructions for this?
    Who wants this database? What di d they give you for instructions/requirements?

  5. #5
    jsinger is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6
    Just volunteering to help out a non-profit blood bank. Nothing special.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I'm trying to set up an application that matches blood donors with patients according to blood type.
    What is your plan of attack? What exactly will your application do?

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Need a lookup table with records that associate Donee/Donor blood types.
    Here is example, for whole blood (apparently red cells and plasma can be different http://www.bloodbook.com/compat.html)

    Donee Donor
    O+ O+
    O+ O-
    O- O-
    A+ A+
    A+ A-
    A- A-
    B+ B+
    B+ B-
    B- B-
    AB+ AB+
    AB+ AB-
    AB- AB-

    Now can search either column to locate associated types. If table is too restrictive by including +/-, adjust as appropriate.

    If you want to connect people, then have a table for people with their blood types. Suggest a single table because people can be donor or donee. Build a query that includes the People table twice, 1 each linked to fields of the Types table. Apply filter for a specific Donee to see people who can be Donors.

    If you are not matching people directly but instead need to match patient request with units in inventory, I expect another table will be involved. How does your bank operate - do you receive requests from hospitals for blood? Do you track patient info or just get a generic RequestID? I presume you do have personal details about donors on record. Maybe more appropriate tables would be:

    tblTypes

    tblDonors

    tblInventory

    tblRequests
    Last edited by June7; 01-20-2015 at 03:41 PM.
    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.

  8. #8
    jsinger is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6
    Very helpful! Thanks so much.

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

Similar Threads

  1. different types of currencies
    By tommyried in forum Forms
    Replies: 3
    Last Post: 03-02-2014, 02:18 AM
  2. Field Types
    By ccordner in forum Access
    Replies: 2
    Last Post: 12-13-2011, 12:33 PM
  3. Replies: 7
    Last Post: 10-25-2011, 08:32 PM
  4. Replies: 1
    Last Post: 10-24-2011, 08:01 AM
  5. Replies: 1
    Last Post: 08-11-2011, 11:33 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