Fields in Network reports
Available fields
Fields are available in Network Reporting if they are enabled.
After a field is exported to Network Reporting, it permanently exists; the column will always be available to report on.
Data Stewardship tables
For the change_request tables, the field behavior is different.
When a field is enabled, it is not available in the change_request tables in Network Reporting until a DCR is submitted for that field. Then, the appropriate columns in the change_request table will be dynamically created. Four columns are created for each field.
After the columns are created in Network Reporting, they will always be available to report on.
For more information about fields in change_request tables, see Change Request sample queries.
Disabled fields
If field is disabled, it will not be removed completely to ensure that existing behavior and functionality is not affected. For example, if you have saved reports that query a disabled field, the reports will still validate and do not need to be updated to remove that field.
Masking disabled fields
Data model fields that have been disabled in an instance are masked in SQL query results.
This applies only to fields that were enabled and populated with data and then were later disabled. Fields that have never been enabled are not affected.
Queries containing disabled fields
If users write an advanced SQL query containing a disabled field, NULL is the only value returned for the field; every value is replaced with NULL when the query is executing.
For example, if the query contains the disabled field in the WHERE clause, ON clause, or when the query performs a calculation, NULL will be the only value returned.
Example
In this example, the field major_class_of_trade__v is a disabled field.
SELECT vid__v, hco_type__v, major_class_of_trade__v FROM hco WHERE major_class_of_trade__v IS NULL ;
This query will return all HCO records because every value for major_class_of_trade__v is considered NULL to the query.
Query disabled field values
Users cannot query on actual values for disabled fields because the query builder replaces the values with NULL.
For example, if the query contained an actual value for major_class_of_trade__v, no results would be returned.
SELECT vid__v, hco_type__v, major_class_of_trade__v FROM hco WHERE major_class_of_trade__v = '11'
The query will find no HCOs where the major class of trade is Pharmacy (Network code, 11) because the data is masked for that disabled field.
Masking data
When the field is disabled in the Network Data model, the data is immediately masked in reports; it is not dependent on the reporting database updates.
In the report results in the Network UI, field names for disabled fields display but the data is masked with Field Disabled.
If users download the report, two options are available: Description and Code.
The behavior of field data in the report depends on the option that you select.
Codes
The downloaded report contains the field name but the column is NULL; no data displays.
Tip: If you are using the report for downstream systems, use this option so that the field data is blank and doesn't affect your integration.
Descriptions
The downloaded report will contain the field names with the data masked as Field Disabled. This is a string masking that can be used on fields that are not string fields (for example, integer fields).
This option provides feedback for users who would not know that the field is disabled.
Saved and scheduled reports
When saved reports are run and downloaded, any masked fields will contain NULL values. Likewise, after a field is disabled, the next time a scheduled report runs, the field will contain NULL values. Reports that are sent to an FTP location will also contain NULL values for disabled fields.
Re-enabling fields
If the data model field is enabled again after being disabled, the field values are available again in reports. Any changes to the data while the field was disabled is tracked and available for users.