sql_ltt: Extract Scottish Morbidity Record (SMR) data for long term...

query_smr01_lttR Documentation

Extract Scottish Morbidity Record (SMR) data for long term trends using SQL

Description

The long term trend query functions take an extract start date and, in the case of query_smr01_ltt, an extract end date. They define the SQL queries used to extract data for long term trends as part of the HSMR publication.

  • query_smr01_ltt extracts the relevant data from the SMR01 database from the beginning of the baseline period for the long term trend data until the end date cut off for the current publication.

  • query_gro_ltt extracts data from the SMR Deaths database from the beginning of the baseline period for the long term trend data.

Usage

query_smr01_ltt(extract_start, extract_end)

query_gro_ltt(extract_start)

Arguments

extract_start

The extract start date, supplied with Date class. Must be the first day of either January, April, July or October.

extract_end

The extract end date, supplied with Date class. Must be the final day of either March, June, September or December.


NHS-NSS-transforming-publications/hsmr documentation built on June 30, 2024, 11:48 a.m.