Jump to content
Server Maintenance This Week. ×

Creating a new Table for a Tab


This topic is 4592 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have just created my first data table, and am looking to start another tab with a second data table.

What I am trying to do is create a database to input patient data. The tabs will be something like: "demographics" (this one I have completed), "classification of seizures," "classification of etiology," etc. I went to tab control and began a second tab. However, I am unable to find a way to create a second table...

Does anyone know how i can do this?

Additionally, after reading many of these forum threads, I am now wondering if this is the best way to organize my database. Since each record will be a patient, will I be able to remain on the same patient for each different tab/table as I work my way through the fields? Is it wiser to create the first tab with the patient name and then multiple buttons with links to tables like "demographics," "classification," etc.

I hope this makes sense...I am very new to FileMaker.

....I also have another question, though it might sound ridiculous. If I have one column/field in a table as "myoclonic" and then want to have two different subsets if the user chooses "yes" to this field, one as "myoclonic atonia" and the other as "myoclonic tonic"....what is the best way to do this? For instance, is there a way to have the atonia/tonic options appear if the user chooses "yes"? As of now, I have been entering all these options as separate fields in the same table. Then I go to "edit layout" and manually move the fields around so there is an indentation underneath "myoclonic?" with the two possible option "atonia" and "tonic"....all three have buttons of "yes" and "no" as available choices. Is this what most users do to create their forms?

Any help that you can give would be much appreciated, thank you!

Link to comment
Share on other sites

Hard to answer without knowing what "classification of seizures" means. The crucial question to ask here is: how many of [something] can one patient have? If the answer is "one at most" (such as date-of-birth, or address), use a field in the Patients table. If the answer is "more than one" (e.g. symptoms), you will need a related table with multiple related records.

Tab controls are purely a user interface element - don't confuse them with your data model. All a tab control does is to divide a layout into layers. It's still one layout, showing data from one table.

If you want to stay on the same patient record (and layout) while viewing data in a related table, use a portal. You can have several portals to different tables on the same layout, and each portal could be in a different panel of a tab control.

Link to comment
Share on other sites

Thank you very much for your response! Each tab (i.e. demographics, classification of seizures, etc.) has a series of questions, that range from name, birthday, race, family history to specifics about seizure type. My goal was to create a single tab for each set of questions. If I would access a record (i.e. an individual patient's data), would I be able to remain on that individual record as I go from tab to tab (or rather, still be able to identify which patient I am looking at if I go into the "classification of seizures" tab).

I'm not sure if my second question makes sense (I just added it moments ago).

Thank you for clarifying that each individual tab does not equal a new table. This was helpful, as I was looking everywhere to find a way to create a second table for the second tab. So if I wish to make a new table, I must create a new layout? If I do this, is there a way to create easy access to this layout, or separate these layouts into tabs?...I think the last portion of your response address this, right? I should create separate portals for each of these sections (i.e. demographics, classification, etc.) and then put these portals into different panels of tab control (which is the same layout?).

Sorry, I don't know if this is very clear (or very silly)...

Link to comment
Share on other sites

would I be able to remain on that individual record as I go from tab to tab

Switching tabs does not change the current record (or layout). Think of tabs as no more than an alternative to scrolling.

So if I wish to make a new table, I must create a new layout?

No, but you certainly should. A table without any layouts is difficult to handle in all kinds of situations. In fact, when you create a new table, Filemaker will automatically create a new layout for you.

is there a way to create easy access to this layout, or separate these layouts into tabs?..

You cannot "separate layouts into tabs" - but as I said, you can have portals to other tables inside the tab panels (or outside them - again, it's purely a matter of arranging your layout).

You can also easily access the related records in a layout of their own table, by having a button that does Go to Related Record[].

Link to comment
Share on other sites

"You can have several portals to different tables on the same layout, and each portal could be in a different panel of a tab control."

If I understand correctly, you mean that I can create multiple tab panels, and place a separate portal onto each of them. How does one create separate portals onto separate tabs? (When i look at each tab within a tab control it has exactly the same table.)

Also, if I am on one record in one layout (say for instance, demographics) and I wish to go to another layout (say, classification), will information put in that record in the second layout remain "linked" (related?) to the information in the first layout. Stated another way, if I have all demographic information for one patient, can I keep the information/record I input for classification attached to the specific demographic information....can I make sure that patient data does not get mixed up.

My idea is to have one database with multiple layouts, and each record being a new patient....i'm not sure if this is possible?

Thanks very much for your help, I really appreciate it.

Link to comment
Share on other sites

Have you done the tutorial? You must understand a few basic concepts in order for the conversation to be effective. Esp. table, layout, relationship and portal. Otherwise we'll keep going in a circle.

How does one create separate portals onto separate tabs?

Tabs have very little to do with this. A portal into a related table allows you to view related records without switching to a layout of the related table. Placing a portal inside a tab panel is no different than placing any other object there. I'd suggest you put tabs aside for the moment and concentrate on the issue of how many tables you need - see the first paragraph in my first post.

Link to comment
Share on other sites

yes, i have done the tutorial. i think the hangup is coming from this..."Placing a portal inside a tab panel is no different than placing any other object there." --> my issue is that, regardless of what i put in the first tab (portal or any other fields), it also appears in the second tab, third one, etc. How can i fix this? I have made separate layouts for the different types of information i wish to have, but my concern for the tabs arose chiefly of easy access to these various layouts/tables.

thanks. i will look more closely at the portal section of the tutorial tonight...

Link to comment
Share on other sites

what i put in the first tab (portal or any other fields), it also appears in the second tab, third one, etc.

Make sure the tab control is entirely within the body part layout, and that the objects placed inside the tab control are entirely within it.

Link to comment
Share on other sites

ok thanks, i had the tab portion of the tab panel inside the header.

I have a question concerning the portals. I created a relationship between "NAME" field in "DEMOGRAPHICS" layout and the "NAME" field in "CLASSIFICATION OF SEIZURE" layout. What I would like is for when a user begins entering new patient data into the demographics layout, he/she will then be able to pull up the classification layout and already see the name of the patient. Do you know how I can achieve this? (I tried creating a portal on the classification layout, but this did not work for me...)

thanks very much

Link to comment
Share on other sites

I created a relationship between "NAME" field in "DEMOGRAPHICS" layout and the "NAME" field in "CLASSIFICATION OF SEIZURE" layout.

No. You do not create relationships between layouts. Relationships are between tables (or more precisely, between table occurrences).

Also your relationships should be based on a PatientID (ideally, an auto-entered serial number in the Patients table), not on a name that may be changed.

I would like is for when a user begins entering new patient data into the demographics layout, he/she will then be able to pull up the classification layout and already see the name of the patient.

I'm afraid this makes no sense to me.

Link to comment
Share on other sites

when i say layout, i mean separate tables. i have two tables, in two different layouts. is this not appropriate? (my initial problem was attempting to create multiple tables in the layout, and you helpfully suggested making separate tables into separate layouts)

so i linked name in demographics table with name in classification table

also, yes you are correct, the name will ultimately be a randomly generated serial #, not a name (though both will remain unchanged)

-----

my last question is basically saying, i want to create a relationship between these two different tables. I want this relationship to be based on patient name, since this makes the most sense...

when i enter in demographic data for a patient, then move onto a new table with classification data, I would like not have to enter the patient's name again into the record

---

i also have a somewhat silly specific question, but do you happen to know how to lengthen the layout page in "edit layout"....I am in form view and would like to make the "page" longer so that I can add in some text. i've looked all over, and ended up creating more fields so that the form page was longer and then deleting those fields so that I had more space to work with, but this seems really silly...

Link to comment
Share on other sites

i have two tables, in two different layouts. is this not appropriate?

This is a highly technical matter and terminology is important. So no, it is not appropriate to say you have "two tables, in two different layouts". A table is not "in a layout" - on the contrary: a table can have many layouts, while each layout belongs to one table only.

Speaking of terminology: the terms "demographics", "classification of seizures", "classification of etiology" etc. are meaningless in this context (at least to me). I haven't yet met a person who has a demographics, let alone a classification of seizures or two (perhaps I need to get out more often...).

In a relational database, a relationship is described in terms of cardinality: one parent has many children. I urge you once more to check your data structure in these terms, and create additional tables only if they are child tables to a parent patient.

To answer your question: in a Parent -< Child relationship, you can create a new child record through a portal (provided the relationship is set to allow this). In such case, the new child will be automatically related to the current parent record. If you create a new child record in a layout of the Child table, you need to fill out the matchfield yourself, otherwise the child will remain an orphan.

Link to comment
Share on other sites

"two tables, in two different layouts" --> "two tables, with their own individual layouts" apologies for the incorrect idiom usage, i realize terminology is important.

i only included the table headings to try to help fill in the context of what I am aiming to do.

all of these tables are child tables to the parent table of individual patient names...or at least, that is how i have been viewing this.

as of now, i have made a relationship between "name" field in the Patient table and "name" field in the classification. i tried mirroring the information provided in page 80 of the tutorial to create a portal, but am running into difficulty. I would like to enter a patient name into the Patient table, then switch to "Classification layout" (with its own table) and see the name appear as the last record. Can you help?

Link to comment
Share on other sites

I would like to enter a patient name into the Patient table, then switch to "Classification layout" (with its own table) and see the name appear as the last record.

That 's not going happen unless such record is created first. You could have a "Add New Classification" button on the Patients layout that would run this as a scripted process.

Link to comment
Share on other sites

Hi again,

I've been thinking more about the best way to set up the relationships between these different tables that I have. For simplicity, let's say I have three tables. One is a simply a list of records of patient IDs. The other is a table with demographic type informations within its fields. The third is a table with classification of an individual's seizure type information within its fields. What I would like to have the very first page of this database be the first table with the list of patient ID #s. Then I would like to be able to choose a particular patient and "pull up" a second page containing a table with 2 buttons to these last two tables (the demographics and seizure types tables) for that specific patient.

Is there a way to create button for a particular record within a particular table?

For example, say I want to get all the information we have on John Doe, I scroll through the fields in my first "PatientID" table, find John Doe, and somehow get that to take to me to a second table (maybe a button...i have to look into this more) containing portals showing the "demographics" table (for john doe) and "seizure type" table (for john doe).

So my parent table would be the Patient ID table, and all the child tables would be the demographics and seizure type tables.

Link to comment
Share on other sites

Hi,

Thanks very much for your help! I found it very helpful. I have made a parent table (PatientID), with two child tables (Demographic and Seizure Type). I made a one-to-many relationship between the patientID table and two child tables. I then made a tab control on the patientID table, with portals to the child tables. This seems like it is working well, and it seems like it is the best way to enter all of the patient data. However, I am curious if this set-up will be the best way to analyze the data once many patients are entered. For instance, if I wish to generate a record of all the patients with have tonic clonic seizures (i.e. "yes" for tonic clonic field in seizure type table), would I be able to do this?

I attached a simplified file with my database setup, if this is helpful in explaining my current setup.

Patient Database copy.fp7.zip

Link to comment
Share on other sites

I then made a tab control on the patientID table, with portals to the child tables.

I do not see any portals in your file. Nor do I see anything that would justify splitting the patient information into 3 tables.

The crucial question to ask here is: how many of [something] can one patient have? If the answer is "one at most" (such as date-of-birth, or address), use a field in the Patients table.

In a relational database, a relationship is described in terms of cardinality: one parent has many children. I urge you once more to check your data structure in these terms, and create additional tables only if they are child tables to a parent patient.

  • Like 1
Link to comment
Share on other sites

it makes it more organized to separate these information into separate tables, based on type

No. You will end up with the information of a single patient split out into 10 tables, all of them with a 1:1 relationship to the parent Patients table. It may seem "neater" to have each group of fields in another table - but the only real "advantage" you can expect is slower search.

  • Like 2
Link to comment
Share on other sites

I have another question, that I was hoping you might be able to help me with.

I need to create a set of fields related to MRI imaging and neurological exam. Some of this information will be relevant to some patients, while some will not. For instance, one question would be "any abnormalities in cranial nerves." If yes, then the user would need to select which cranial nerve(s) (there are 12, so 1-12) are abnormal, and then explain what exactly is abnormal about them. Is there a way to present a question in a field, such as "Any abnormalities in cranial nerves?" then based on the response (Y or N), have a field appear or not appear. If no, then move onto a different question. But if yes, then "which cranial nerve(s) abnormal?" and then have perhaps a set of checkboxes 1-12 as the available responses to this question. Do you know if this is possible to do, and how I could maybe set it up this way?

Otherwise, the way to go would just be to include all of this on the form layout, and if there is no abnormalities in the cranial nerves, the user can just scroll down and skip this set of questions

Link to comment
Share on other sites

Hi, Do you know if it is possible to create a button to go to a new tab control?

I decided to merge many of the tables together, per your advice re: parent-child relationships. I put patient demographic information, seizure type, seizure etiology, and symptoms all into one table, and displayed this into 4 separate tabs in one tab control. (This can be considered under the "disease related information" heading.)

However, now I have a bunch of information regarding "examination information"....including about 15 topics, such as MRI, fMRI, neurological exam, physical exam, etc. (all with various questions). I would like to make a second tab control for all of this "examination information," with separate tabs for each of these sub-categories. Do you know if it is possible to create a button in the first "disease related information" tab control that will allow me to get to this second tab control.

Any help you can give would be much appreciated, thank you.

Link to comment
Share on other sites

Note: Previously, there was a 1:1 ratio between patient table and demographic, etiology, seizure type, and symptoms information (i.e. only one record from each of these categories would be necessary for each patient). However, it is likely that there will be multiple records for, say, MRI results for any one specific patient (taken on different dates). So this necessitates a separate table, right? So maybe a I could just include a 5th tab on my first tab control titled "examinations," and in that tab, have a series of buttons that send the user to different tables, such as MRI, fMRI, PET, neurological exam, etc.? How would this work out for ensuring that multiple records in these tables are still linked to one single patient?

Thanks for your help.

Link to comment
Share on other sites

First of all, forget about the Tabs for a moment. Tabs are only user interface, and do not have anything to do with your data structure. Right now, your data structure is, to be kind, cloudy.

Start with a patients table. This would contain fields for patient id, plus all patient-specific data (name, address, DOB, etc.--what you are calling demographics).

Now list all of the other entities you are going to track (tests, symptoms, etiology, seizure type, etc) and ask yourself the following questions about each:

• Are there more than one of them?

• Are there likely to be more of them defined in the future?

If both answers are yes, then you need a separate table for that entity

• Is there a one-to-one correspondence between each one and only one other entity?

If the answer is yes, then this entity should be a field in the other entity's table, not a separate table.

• What information do I need about each entity?

This will define the fields you need in that entity's table.

Each table you create must have a unique id number for each record. THIS IS CRITICAL--do not skip this step.

After all these tables are created, you can create the relationships. The relationships between each entity are many-to-many, so you will have to create Join tables.

For example, you will need to create a join between patients and tests. Let's call it Patient~Test. Each record will be unique to one test performed on one patient. you will need fields for P~T ID, patientID, testID, Date, and all the other information you wish to track for that particular instance of that test on that patient.

Create join tables between patients and all the other entities.

Then and only then can you begin to be concerned about how to display this information.

Link to comment
Share on other sites

thanks for your response. i've thought about this a lot. there is a 1:1 ratio between patient demographic information, seizure type, etiology, and syndromes. thus, i have this all in the same table.

Then i am going to make separate tables for: neurological/physical exams, imaging tests, and treatment logs.

Currently, I plan to include a field for every table that says "patient ID" (type: number, serial number). then i go to the relationships window and define an equal relationship between patientID in the first demographic table and patientID in the MRI table, for instance. Is this the correct way to establish a parent child relationship between the two tables, such that I can enter a patient ID in the first table and then go to the second MRI table and see an already created record for that same patientID (and then proceed to enter the MRI test results)? (Or say, select from a drop down list the patient's ID while in the MRI table, to create multiple records for that patient.)

Link to comment
Share on other sites

No, you will need to create a record in a patient-ImagingTest join table. It will contain a field for patient ID which will NOT be an autoenter serial number, and the id of the MRI record in the ImagingTest table. I will post an example later today showing how to auto-enter the patient ID in the new record in the join table. Remember, an MRI is only one type of test available in the ImagingTest "inventory"; the specific test incidence for this patient is the record in the join table.

Link to comment
Share on other sites

To create a new child record:

create a script Create new patient test:

Set Variable [$Key; Patient::PatientID]

Go to Layout [someLayout (Patient-ImagingTest) ]

New Record/Request

Set Field [Patient-ImagingTest::PatientID; $Key]

Go to Layout [original layout]

Create a button named New Test and have it Perform Script->Create new patient test

Link to comment
Share on other sites

Hi,

I have all of my tables created, but am now thinking about the best way to put the database together. My main problem concerns having multiple MRI records for any one patient. I am at a loss for how to "present" multiple MRI records for any one patient. I have it set up so that each record entry in the MRI table has the patient id, a unique # for the MRI record, and then about 12 other different fields pertaining to the actual MRI data. Do you have any ideas as to the best way to present this information?

Link to comment
Share on other sites

In general:

In the table on which the layout with the portal is based, have a field which defines the data you want to display (In this case, PatientID).

Create a new Table Occurrence of the table which contains the data you wish to view in the portal (in this case, MRI. Name it MRIDisplayPortal).

Make a relationship between the defining field in the display table and the related field in the TO copy (in this case Patient::PatientID = MRIDisplayPortal::PatientID).

Create a portal on the layout showing related data from the related table (In this case, MRIDisplayPortal).

Populate the portal with the fields you wish to display.

Link to comment
Share on other sites

This topic is 4592 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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