Scopes Tags
The scopes block defines the summary scopes on data sets used in the factory. Scopes provide efficiency by limiting which portion of the data set to act upon. A factory can have multiple scopes defined. Different scopes can reference the same data set. Each measure block can use one scope tag.
In the following example, the individual scope blocks are collapsed:
scopes { scope "Adjustments" { scope "Admissions" data-set="Accounts" { scope "Census Capacity" { scope "Procedures" { }
Scopes Tags
Tags | Examples | Notes |
---|---|---|
scopes |
scopes { scope "Discharges" data-set="Accounts" { ... } scope "Diagnoses" { ... } ... } |
Defines the container block for scope tags. |
scope "Discharges" data-set="Accounts" { filter `value("Date") != null and value("Date") <= current_date()` alias "Date" "Discharge Date" alias "Day of Week" "Discharge Day of Week" } |
Defines an abstraction layer into the data set. Use of the data-set tag is optional NOTE: Each data set defined in the data-sets block must be used in at least one |
|
file | scope "Admissions" file="scopes/Admissions.factory-scope" | Supporting tag for scope when using separate factory-scope files along with the main cfg.factory. See Multiple Configuration Files. |
filter |
filter `value("Date") != null and value("Date") <= current_date()` | Defines a filter on the data for this scope. |
alias |
alias "Date" "Discharge Date" alias "Day of Week" "Discharge Day of Week" |
Defines an alias for a date column in this scope so the name is more meaningful. NOTE:
|
See also Anatomy of a Measure.