简体   繁体   中英

Search one table (Encounters Table) for all records - Insert Totals into a Providers Table

Search one table (Encounters Table) for all records - Insert Totals into a Providers Table

Encounters table lists every hospital encounter over time. Each Encounter record has a Provider (Provider is also in the Providers Table one time as a record - 229 providers, presently.)

The encounter table lists the date and the provider, so that one provider may have 15 to 20 encounter records for that date.

In the Providers table I have been trying to get a count in different fields (formula fields) that will list the number of encounters for the provider in a time frame. Examples of the time frame are current week, past week... or could be last month, two months ago, etc. So the Providers Table primarily would have a key field of Providers which would relate to the Providers in the Encounter table.

Now the software used is Quickbase which is a Cloud Based Database used by the hospital I work for.

I have been unable to use a one-to-many relationship to pull the Provider from the Encounters table into the Provider's table. The column generated is blank. So when I try to pull encounter counts into formula number fields like 'current_week', last_week, last_month, etc. the counts just say 0.

The Quickbase help tells me that I need to populate the related Provider fields so the names appear, but I'm thinking I can't just use a file import (ie CSV file) to fill in the Encounters table since it has thousands of records and there are only 229 providers.

Queries can be done, and knowing that SQL handles this type of work, it just seems that may be the best way to handle this. My SQL isn't that good, but I think I could write a formula that handles this with two tables. I just am not certain how to fill the Encounter Count fields.

This is a bit of a hurdle and perhaps because I'm using a proprietary software package 'Quickbase' it may not be possible.

I do know that queries are used in Quickbase, so the logic of a SQL statement should work in the dialog box used to write formulas in QB.

Any help would be appreciated.

If the only place you need the see the # of Encounters Per Provider in a time frame, I'd try to make it work with a Summary Field in Quickbase and apply a filter for a date range (I'm assuming there is an existing relationship between Providers and Encounters where Providers is the parent).

You can get some good tips on how to configure that field in the Quickbase Community https://community.quickbase.com/home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM