Title
Multiple Value Frequency Search
Post
I have tried searching for this, but have come up empty. I apologize up front if I am not describing my requirements well enough, so please ask for clarification where needed.
I have a Table, "VISIT_CLINIC", that contains a patient's visits to a Medical Clinic (often many visits) and the associated treatment code. This table is related to the "CLINIC" table via the clinic's unique ID, "clinic_fk" (and each new patient creates a new clinic UID for other reasons). To allow for multiple treatments on a single visit, a "Visit Number" field is required which contains the visit number (1, 2, 3, etc.). This, along with a treatment code field, "CPTCode_fk", (which is related to a treatment table that contains the treatment description) and other pertinent fields make up the Visit Table.
What I need to do now is generate a Sub-Summary report (summarized by Visit #) that shows how often a set of codes, "CPTCode_fk", are ALL billed on the same visit, "Visit Number", for each Patient, "clinic_fk". Example: How often to ALL the codes 123, 567, 910, and 1112 show up under the same visit number for any Patient.
Thank you in advance for you assistance!
The Database is setup as below (table names are the first line, the following lines are the <Primary Key>--<Foreign key> that define the relationships.
Patient >-----------<CLINIC>--------<VISIT_CLINIC>-------<TREATMENT_CLINIC
Patient_UID>---<patient_fk>
<clinic_UID>----------<clinic_fk>
<CPTCode_fk>--------------<CPT Code>
So you want to find all records with the codes: 123, 567, 910, or 1112?
This is normally described as an Or type find.
There are two basic approaches:
Enter find mode
Specify code 123
New request
specify code 567
New Request
Specify code 910
new Request
specify code 1112
or:
Perform find for code 123
Return to find mode
Specify code 567
Extend found set
Return to find mode....
and so forth
Both approaches can be done manually or in a script.
For examples of scripted finds, see: Scripted Find Examples