related field

Discuss the HanDBase for Windows Desktop program, conduits, and add-ons.

related field

Postby jenny143 » Wed Jul 11, 2012 11:53 pm

hi,

im asking for my database relational aspect

since im having a Doctor Database and Patient database

DoctorDB
DoctorCode (Unique)
DoctorName
DoctorSpecialization
DoctorTelNumber
DoctorCode(Link)

Patient
PatientName
PatientNumber
PatientDisease
DoctorCode(FK) (Linked)

Question, how can i use search button from my patient and im looking up for PatientName, DoctorName, Doctor Specialization, PatientDisease if im on my Patient Table?
jenny143
 
Posts: 4
Joined: Thu Jul 05, 2012 2:45 am

Re: related field

Postby Brian_Houghton » Thu Jul 12, 2012 7:50 am

Hi,

Thanks for posting. First, I'd like to explain a little bit about how the relationship field within HanDBase works. Assuming one has two databases, there needs to be a common field that each of the databases has. In your case, it could be DoctorCode. Let's pretend it is a text field that houses some long alphanumber combination like AB001-2.

Now let's assume that each doctor has his or her own unique code, like Dr Smith is AB001-2, Dr Jones is AB001-4, and so on. Each patient could be assigned to a doctor using the doctor's code. Maybe Lucy goes to see Dr Smith, so her record indicates the doctor code as AB001-2.

If you set up a relationship field, you will add it to the parent database. Let's assume the doctor database is the parent, since it might be a situation where a doctor is viewing his record and wants to see all of his patient information. In this case, we'd add a relationship field to the doctor database, and configure it to use the DoctorCode field to relate to the DoctorCode field in the patient database. If it were set up in this manner, when the doctor followed the relationship (pressed the label) he or she would see all of his or her patients.

The situation described above is only one of many possibilities, and it looks like you might be going in a slightly different direction. The implementation of the relationship field as described will work no matter how you massage what fields relate with one another. Give it a try and let us know if you have any questions, need additional information, etc.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: related field

Postby jenny143 » Fri Jul 13, 2012 8:38 pm

hi thanks for answering my question

i tried your sample with database and Jpeg for the data

im trying to do is appear PatientName, DoctorName, Doctor Specialization, PatientDisease for searching in this field

if im going to search in my DoctorDB, the only data that im searching is limited to patientDB
Attachments
Hospital.rar
(21.67 KiB) Downloaded 37 times
jenny143
 
Posts: 4
Joined: Thu Jul 05, 2012 2:45 am

Re: related field

Postby Brian_Houghton » Mon Jul 16, 2012 7:23 am

Hi,

Thanks for posting your sample databases. I've reviewed them and have a couple of questions:

- Are you wanting to relate records based on a doctor code, a doctor name or a patient name?
- What are you using the jpeg for?
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am


Return to HanDBase for Windows

Who is online

Users browsing this forum: No registered users and 2 guests