Jump to content

Auto-enter of records


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

Recommended Posts

Hello everyone,

I'm kind of new in FileMaker and I'm trying to create a database for my in-hospital patients. I have two tables in my database (among others) Admissions and Days. Each patient can have many different admissions and each admission can last for many days. Based on the date of admission I am trying to create a calculation which will automatically add records to the Days table. So if a patient is admitted lets say on Feb 2 2010, every day until the discharge date a new record will be added in the Days table (records = days of stay of the patient in the hospital). However, if the admission of patient is registered two days after the actual admission lets say on Feb 4 2010 I need those two extra days to be automatically added immediately after the admission record is created. After that each new day will add the day record until discharge. Help appreciated.

Link to comment
Share on other sites

I am trying to create a calculation which will automatically add records to the Days table.

A calculation cannot create records - a script can. You could run the script automatically by attaching a trigger to the AdmissionDate field.

each new day will add the day record

Again, you will need to find a method to make this to happen, since nothing will be created as a result of time passing.

Can you explain the purpose of the daily records? Usually, it's not necessary nor desirable to create records before you have some data to input.

Link to comment
Share on other sites

Each day should represent a distinct record in the hospitalization of a patient so that as a parent record a day could have various child records (e.g. medications used, blood tests, procedures etc). You say that there is no way days to be added automatically as a result of time passing?

Link to comment
Share on other sites

You say that there is no way days to be added automatically as a result of time passing?

I'm afraid that can only happen with rabbits... :P In a computer system, there must be an explicit command to create a new object (for example, you could run a script on opening the file).

However, the good news is that it is not necessary to create daily records for your stated purpose. In fact, such a table would be redundant, as it holds no real information. All that's necessary is for each event (medication, blood test, procedure etc.) to have a date (or timestamp) attribute.

Link to comment
Share on other sites

This topic is 4391 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
 Share

×
×
  • Create New...

Important Information

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