State Form Table Joins
Create join conditions to set as default in State Form Definition. Select any two tables and columns to be joined.
- Join conditions defined in this form are not specific to any state form.
- For two tables listed in Define Record Data Elements that have a join defined in this form, the Join Condition column will default to that join. Note that this only applies if the Primary Table column for the row is set to No. The primary table in the record will be checked first, and if no join is found for this table all other non-primary tables will be checked.
- In the Table 1 and Table 2 fields, select the tables to be joined.
- The Property 1 and Property 2 fields list all the columns for the selected tables. For each table, select which columns uniquely identify the rows in that table.
For example:- The Property 1 table, SYSTEM.admission_data, is uniquely identified by FACILITY, PATID, and EPISODE_NUMBER.
- The Property 2 table, SYSTEM.patient_current_demographics, is uniquely identified by FACILITY and PATID.
- Since the SYSTEM.admission_data table contains all fields that uniquely identify the SYSTEM.patient_current_demographics table, the two tables can be joined on FACILITY and PATID.
- In the Property 1 and Property 2 fields, select FACILITY and click Add.
Result: The partial join condition is then added to the Display field. - Repeat the process for PATID.
Note: If there is an existing condition for the two selected tables, it will default into the Display field once both tables have been selected. - To remove a partial join condition, select the property (for example, FACILITY) in each of the property fields and click Remove.
Result: The partial condition with the FACILITY property is removed from the display. - To clear the entire existing condition for these two tables, click Clear.
When there are no further properties to add, simply exit the form. The join has been activated and can be used in State Form Definition.
