{"text_format":"2","workbook":"xlsx","n_sheets":6,"sheets":["Front Sheet","Version Control","Monthly Data Measures","Currency and Payment Measures","MHMDS v4.1 derivations","Glossary"],"not_rendered":{"charts":0,"images":1,"macros":0,"external_links":0,"defined_names":40,"comments":1,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Front Sheet","index":0,"n_rows":41,"n_cols":2,"rows_kept":41,"cut":false,"hidden":false,"merged":[[35,1,35,6],[29,1,29,6],[19,1,19,3],[0,1,0,2],[2,1,2,5],[3,1,3,4],[5,1,5,6],[7,1,7,6],[10,1,10,6],[12,1,12,6],[17,1,17,6],[11,1,11,6],[13,1,13,6],[18,1,18,6],[14,1,14,6],[9,1,9,6],[15,1,15,6],[16,1,16,6],[41,1,41,7],[43,1,43,7],[45,1,45,7],[20,1,20,6],[22,1,22,6],[21,1,21,3],[37,1,37,6],[38,1,38,7],[40,1,40,7],[23,1,23,3],[24,1,24,3],[26,1,26,3],[28,1,28,3],[30,1,30,3],[32,1,32,3],[34,1,34,3],[27,1,27,3],[31,1,31,3],[33,1,33,3]]}
[]
[]
[null,"Monthly Mental Health Minimum Dataset (MHMDS) reports"]
[]
[null,"Metadata file"]
[]
[null,"Introduction"]
[null,"This document describes the content of the monthly MHMDS data files in the Monthly MHMDS Reports publication, which were published for the first time in September 2013 starting with information for April 2013. The Currency and Payment (CaP) file was added in July 2014, starting with information for April 2014.  Further information about these changes can be found in the related Methodological Change paper."]
[null,"What data files are included in the monthly MHMDS release?"]
[null,"The monthly MHMDS release contains two data files - the monthly MHMDS data file and the monthly CaP data file. Both of these files are available in csv format and share the same suppression and aggregations. To prevent the release of disclosive information, any number less than five (including zero) is replaced by a “*” symbol. All other numbers are rounded to the nearest five, apart from the England totals which are unrounded. Calculated values in the data files are based on unrounded numbers but rounded to one decimal place to prevent backward calculation. This approach prevents identification of a person through cross referencing different publications. Instances where data are not applicable are shown with a dash \"-\".\nAs a result of the new suppression rules we have added a reporting level field and reporting level totals to these reports. This allows users of the files to filter data based on the comparisons they wish to make (provider, CCG or CCG-provider)."]
[null,"The monthly MHMDS data file contains 39 measures produced from analysis of providers’ monthly MHMDS submissions.  These measures include some information that was previously included in Summary Statistics and Experimental Analysis within the Routine Quarterly MHMDS Reports until Q4 2012/13, as well as new measures that show caseload and activity in NHS funded adult mental health services."]
[null,"The measures are presented at national, provider, Clinical Commissioning Group (CCG) and provider/CCG levels to show where patients who fall within each CCG are receiving services and the volume of activity for each reporting level.  The unit of measurement for the majority of measures is a person's open spell of care in adult Mental Health services ‘as at’ the end of the month .  These measures are effectively a count of open caseload, categorised by the type of service being received at the end of the month.  The file also includes a set of ‘in month’ activity counts, showing the volume of services provided within the month.  Taken as a whole these measures provide the building blocks of information to help stakeholders understand what services are being delivered and to whom.  "]
[null,"Some of the measures can be combined to calculated percentages which could be used for making comparisons at various levels, such as by provider, by CCG, or by other aggregated health geographies.  However, the data are not presented as official indicators; these will be released through separate publications (e.g. the CCG Outcomes Indicator Set)."]
[null,"All the measures can be produced from analysis of the monthly extracts supplied to providers and commissioners with access to the Bureau Service on the Open Exeter system. All except 10 of the measures can be produced from a single month’s submissions.  "]
[null,"The monthly CaP data file contains 75 measures (including calculated measures) to support the implementation of currencies and payment in mental health. These measures include the 10 national recommended quality and outcome indicators, along with other measures to add context."]
[null,"The measures are presented at national, provider, CCG and provider/CCG levels to show where patients who fall within each CCG are receiving services and the volume of activity for each reporting level.  This report is limited to a subset of the people in the MHMDS, namely those who are 'in scope' for mental health currencies and payment. The measures in this file are a combination measures ‘as at’ the end of the month and in month activity counts and are ordered by theme – all of the measures relating to new service users are next to each other, for example."]
[null,"All the measures can be produced from analysis of the monthly extracts supplied to providers and commissioners with access to the Bureau Service on the Open Exeter system. However, unlike the monthly MHMDS data file, these measures are built using our year to date (YTD) and annual files. YTD data reconciles the duplication that occurs across monthly submissions for spells of care that are open in more than one submission period and removes identical duplicate episodes (overlapping or inconsitent episodes remain) within individual periods. Analysis based on the YTD MHMDS data may therefore differ from analysis of the same period using monthly data, where there are greater issues with duplication and consistency. Further information can be found in the Background Quality Statement and Data Quality Measures."]
[null,"What is included in the metadata file?"]
[null,"The document provides for each field in the monthly MHMDS and CaP files:\n\n• A reference number, name and description (data items in the NHS Data Dictionary are underlined for reference) for each measure and whether it is included in the Executive Summary national totals; \n• The name of the data item in the monthly file;\n• Cross references to data derivations used in the analysis;\n• A construction describing the logic used in the analysis, referencing data items in providers’ and commissioners’ record level MHMDS data extracts and any derivations produced by the Health and Social Care Information Centre (HSCIC) used in the analysis;\n• Descriptions of the derivations produced by the HSCIC to make the production of these measures more efficient, so that users of record level monthly MHMDS data can apply the same logic to their analysis;\n• Further notes to describe the status and uses of the measure and whether it is a new or existing measure (further details on changes in methodology can be found in the Methodological Change Paper);\n• A glossary of abbreviations, special terms and acronyms. \n"]
[null,"Who is it intended for and how will it be used?"]
[null,"The primary use of this metadata is to provide clear descriptions of the measures presented in this file, which can be understood by key stakeholders.  This information should be used in combination advice on assessing the reliability of individual measures, which is provided in the Background Quality Report.\nThe metadata will also help people with access to record level MHMDS extracts from the Bureau Service who wish to reproduce these measures from record level monthly MHMDS.\nWe welcome feedback on this document and any suggestions for improvement.\n"]
[null,"Useful Links"]
[null,"• More about Monthly MHMDS Reports, including the Background Quality Report    \n"]
[null,"http://www.hscic.gov.uk/mhmdsmonthly"]
[null,"• Methodological Change Papers"]
[null,"http://www.hscic.gov.uk/pubs/methchanges"]
[null,"• MHMDS version 4.1 Data Specification and User Guidance  "]
[null,"http://www.hscic.gov.uk/mhmds/spec"]
[null,"• NHS Data Dictionary: MHMDS "]
[null,"http://www.datadictionary.nhs.uk/data_dictionary/messages/clinical_data_sets/data_sets/mental_health_minimum_data_set_(version%204-1)_fr.asp?shownav=1"]
[null,"• MHMDS monthly submission deadlines   "]
[null," http://www.hscic.gov.uk/mhmds/submissiontimetable"]
[null,"• Codes for NHS organisations   "]
[null,"http://systems.hscic.gov.uk/data/ods/datadownloads"]
[null,"• Guidance on mental health currencies and payment"]
[null,"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/300864/Guidance_to_mental_health_currencies_and_payment.pdf"]
[]
[null,"www.hscic.gov.uk/mhmdsmonthly "]
[null,"Responsible Statistician\nTony Childs\n\nThe Contact Centre\nHealth and Social Care Information Centre\n1 Trevelyan Square\nBoar Lane\nLeeds\nWest Yorkshire  \nLS1 6AE\n\nTelephone: 0845 300 6016\nEmail:enquiries@hscic.gov.uk\n\nPress enquiries should be made to:\nMedia Relations Manager:\nTelephone: 0845 300 6016 \nEmail: enquiries@hscic.gov.uk"]
[null,"enquiries@hscic.gov.uk"]
[null,"This work remains the sole and exclusive property of the Health and Social Care Information Centre and may only be reproduced where there is explicit reference to the ownership of the Health and Social Care Information Centre. This work may be re-used by NHS and government organisations without permission. This work is subject to the Re-Use of Public Sector Information Regulations and permission for commercial use must be obtained from the copyright holder. Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]

{"sheet":"Version Control","index":1,"n_rows":15,"n_cols":4,"rows_kept":15,"cut":false,"hidden":false,"merged":[[11,2,11,3],[10,2,10,3],[7,2,7,3],[8,2,8,3],[8,0,9,0],[8,1,9,1],[3,0,4,0],[3,1,4,1],[3,2,4,3],[5,2,5,3],[6,2,6,3]]}
["Mental Health Minimum Dataset (MHMDS)"]
["Metadata file Version History"]
[]
["Version","Date Issued","Summary Of Changes"]
[]
["1.0","03/09/2013","Introduction of the MHMDS metadata file"]
[1.1000000000000001,"2014-01-15","Descriptions of mm15 and mm18 amended to reference mm03 as denominator."]
["1.2","2014-05-15","Description of IC_Rec_RP_Disch_Net_Followup amended to reference correct period following discharge. \nAdded RC26 (IC_Rec_RP_Contacts) and RC27 (IC_Rec_RP_Contacts_Att) to the derivations sheet. \nAdded mm62 (16 year old bed days) and mm63 (17 year old bed days) - from February data, following stakeholder feedback."]
["1.3","2014-07-29","Addition of Currency and Payment (CaP) measures. Further changes are explained in the June 2014 "]
[null,null,"methodological change paper - ","http://www.hscic.gov.uk/pubs/methchanges"]
["1.4","2014-09-25","Clarification of the types of teams that are in scope for mental health currencies and payment in derivations RC56 and RC57.\nUpdated logic for experimental measures CP32 - CP38 following stakeholder feedback.\nCP008 and CP009 now reported by care cluster."]
["1.5","2014-09-29","Updated construction for mm17 to correctly reference MHD_Age_Start_Reporting_Period"]
[]
["Please contact us via enquiries@hscic.gov.uk for earlier versions of the metadata file"]
["Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]

{"sheet":"Monthly Data Measures","index":2,"n_rows":52,"n_cols":8,"rows_kept":52,"cut":false,"hidden":false,"merged":[[0,1,0,2],[8,0,8,7],[29,0,29,7],[50,0,50,6]]}
[null,"Name and where used"]
["Monthly measure reference number ","Executive Summary (National)","Monthly CSV data file (Provider/CCG)","Monthly data file field name","IC derivation reference number","Description of measure\n(where possible measures are described in terms of the classes of information defined in NHS Data Dictionary)","Construction","Notes"]
[null,null,"Month","Reporting Period","-","The Reporting month"]
[null,null,"Provider code",null,null,"ORGANISATION CODE of service provider"]
[null,null,"Provider name",null,null,"ORGANISATION NAME of service provider"]
[null,null,"CCG Code",null,"RC01","The CCG used is the CCG of GP practice or, if GP practice was not recorded or was invalid, the CCG derived from the patient’s postcode.  ","IC_Rec_CCG","Commissioner extracts from the Bureau Service are filtered by ‘Org Code of Commissioner’, not by the field 'CCG of GP Practice'. The commissioner recorded in an MHMDS record may not be a CCG so there may be differences between analysis of commissioner extracts and analysis by CCG in this file, depending on how the provider recorded the Org Code of Commissioner."]
[null,null,"CCG name",null,null,"ORGANISATION NAME of the CCG"]
[null,null,"Reporting level","Reporting level",null,"The data grouping. This should be filtered depending on the analysis required",null,"Values are - national, provider, CCG and Provider-CCG"]
["End of month counts of people"]
["mm01","People in contact with services","People in contact with services at the end of the Reporting Period","People in contact with services","HE01","People with an open Adult Mental Health Care Spell in NHS funded adult specialist mental health services at the end of the Reporting Period (RP)","Count of MHD_MHMDS_Record_Number where MHD_End_Date_MHCS is NULL"]
["mm02",null,"People on CPA  at the end of the RP period","People on CPA","RC04","People with an open Care Programme Approach Episode at the end of the RP ","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_CPA_Flag = 'Y'"]
["mm03",null,"People on CPA aged 18-69  at the end of the RP","People on CPA aged 18-69","RC04","People aged 18-69 with an open Care Programme Approach Episode at the end of the RP ","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_CPA_Flag = 'Y' and\nMHD_Age_Start_Reporting_Period >=18 and MHD_Age_Start_Reporting_Period <= 69 ","Denominator for indicators 1 and 2 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm04",null,"People on CPA at the end of the RP with HoNOS recorded ","People on CPA with HoNOS recorded","RC07, RC46, EV03","People with an open Care Programme Approach Episode at the end of the RP  who had Health of the Nation Outcomes Score (HoNOS) or HoNOS 65+ or HoNOS (Children and Adolescents) or HoNOS (SECURE) or MENTAL HEALTH CLUSTERING TOOL\n recorded within the previous 12 months","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_CPA_Flag = 'Y' and IC_Rec_endRP_HONOS_Assessment_within_12mnths = 'Y' and\nMHD_End_Date_MHCS is null\n","Numerator for indicator 4 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm05",null,"People on CPA for 12 months at the end of the RP","People on CPA for 12 months","RC46","People with an open Care Programme Approach Episode at the end of the RP that started at least 12 months earlier.","Sum of IC_Rec_EndRP_CPA_Epi_12_Months","Denominator for indicator 5 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm06",null,"People on CPA for 12 months with review at the end of the RP","People on CPA for 12 months with review","RC05","People with an open Care Programme Approach Episode at the end of the RP that started at least 12 months earlier,  who have had a Care Programme Approach Review within the previous 12 months.","Count of distinct MHD_MHMDS_Record_Number where\nIC_Rec_EndRP_CPA_Epi_12_Months='Y' and IC_Rec_endRP_CPA_Review_within_12mnths='Y'","Numerator for indicator 5 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm07","People with an open hospital spell","People with an open hospital spell at the end of the RP","People with an open hospital spell","RC48","People with an open Hospital Provider Spell at the end of the RP.  This may include people on leave.","Count of distinct  MHD_MHMDS_Record_Number  where IC_Rec_endRP_Hospital_Spell_Flag = 'Y'"]
["mm08",null,"People subject to the Mental Health Act at the end of the RP","People subject to the Mental Health Act","RC49","The number of people in NHS funded specialist adult mental health services at the end of the RP who were subject to the Mental Health Act.  This number includes people in these discrete categories (on a single day a person can only be in one category): people subject to detention (see mm09) people subject to CTO (see mm10), as well as people subject to short term holding powers under sections 4, 5(2), 5(4), 135 or 136 and people subject to Guardianship but not on a CTO.","Count of distinct MHD_MHMDS_Record_Number where\n(( IC_Rec_endRP_MHA_Flag='Y' and ic_rec_endRp_Hospital_spell_flag='Y' and \nIC_Rec_endRP_LegalStat_Cleansed IN ('02','03','07','08','09','10','12','13','14','15','16','17','18','21','32','34')\nand IC_Rec_endRP_SCT_Flag<>'Y' and IC_Rec_endRP_Recall_Flag<>'Y'))  OR\n( (IC_Rec_endRP_SCT_Flag='Y' or IC_Rec_endRP_Recall_Flag='Y' ) ) OR \n( IC_Rec_endRP_MHA_Flag='Y' and IC_Rec_endRP_LegalStat_Cleansed IN ('04','05','06','19','20')\nand IC_Rec_endRP_SCT_Flag<>'Y' and IC_Rec_endRP_Recall_Flag<>'Y'  )  OR\n( IC_Rec_endRP_MHA_Flag='Y' and IC_Rec_endRP_LegalStat_Cleansed IN ('35','36')\nand IC_Rec_endRP_SCT_Flag<>'Y' and IC_Rec_endRP_Recall_Flag<>'Y' ) ","This figure replicates the sum of 'People subject to CTO' and 'People subject to detention' in Table 8 of the National Statistic (NS) publication currently produced from KP90 collection."]
["mm09","People subject to detention at the end of the RP",null,"n/a","RC08, RC10, RC11, RC48, RC49","People detained in hospital under a civil or criminal justice section, including sections 2,3, 35, 36, 37 (with or without restrictions), 38, 44, 46, 47 and 48 (with or without restrictions), 45A or Formally detained under Criminal Proceedings Act 1964 or under other Acts at the end of the RP.  These patients must also have an open hospital spell or ward stay at end of RP","Count of distinct  MHD_MHMDS_Record_Number where \nIC_Rec_endRP_MHA_Flag='Y' and IC_Rec_endRP_Hospital_spell_flag='Y' and \nIC_Rec_endRP_LegalStat_Cleansed IN ('02','03','07','08','09','10','12','13','14','15','16','17','18','21','32','34')\nand IC_Rec_endRP_SCT_Flag<>'Y' and IC_Rec_endRP_Recall_Flag<>'Y' )","This measure partially replicates the National Statistic (NS) measure [People subject to detention] currently produced from KP90 collection [Reference table 8 in the annual publication].  It does not include 'people subject to short term holding powers', however, which may be presented as a separate line in future NS publications."]
["mm10","People subject to CTO at the end of the RP",null,"n/a","RC10, RC11","People in contact with NHS funded adult secondary mental health services who are subject to the Community Treatment Order at the end of the RP","Count of distinct  MHD_MHMDS_Record_Number where \nIC_Rec_endRP_Recall_Flag='Y'  or IC_Rec_endRP_SCT_Flag='Y'","This measure replicates the National Statistic measure [People subject to CTO at 31 March] currently produced from KP90 collection [Reference table 8 in the annual publication]."]
["mm11",null,"People being treated by Early Intervention teams at the end of the RP","People being treated by Early Intervention Teams","RC47","People with an open Team Episode at the end of the RP,  where the team is an Early Intervention team.","Count of distinct  MHD_MHMDS_Record_Number where IC_Rec_endRP_EIT_Flag ='Y'","Measure from Experimental Analysis Line 2 previously published as part of Routine Quarterly MHMDS Reports."]
["mm12",null,"People being treated by Assertive Outreach teams at the end of the RP","People being treated by Assertive Outreach Teams","RC44","People with an open Team Episode at the end of the RP,  where the team is an Assertive Outreach team.","Count of distinct  MHD_MHMDS_Record_Number where IC_Rec_endRP_AOT_Flag='Y'","Measure from Experimental Analysis Line 3 previously published as part of Routine Quarterly MHMDS Reports."]
["mm13",null,"People in contact with NHS funded adults secondary mental health services at the end of the RP with accommodation status recorded. ","People with accommodation status recorded","RC12","People with an open Adult Mental Health Care Spell at the end of the Reporting Period (RP) who had Accommodation Status recorded in the previous 12 months.","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_Settled_Accommodation_Indicator  is not null"]
["mm14",null,"People aged 18-69 on CPA at the end of the RP in settled accommodation","People aged 18-69 on CPA in settled accommodation","RC04, RC12, EV03","People aged 18-69 with an open Care Programme Approach Episode at the end of the RP  whose most recent record of Accommodation Status in the previous  12 months showed they were in settled accommodation. ","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_CPA_Flag='Y' and MHD_Age_Start_Reporting_Period >=18 and MHD_Age_Start_Reporting_Period <=  69 and\n(IC_Rec_endRP_Settled_Accommodation_Indicator = '1' OR\nIC_Rec_endRP_Settled_Accommodation_Indicator = '01' ) ","Numerator for indicator 1 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm15","Proportion of people aged 18-69 on CPA in settled accommodation",null,null,null,"Divide mm14 by mm03 and show as a percentage",null,"Indicator 1 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm16",null,"People with employment status recorded at the end of the RP","People with employment recorded","EV03, RC06","People with an open Adult Mental Health Care Spell at the end of the Reporting Period (RP) who had Employment Status recorded in the previous 12 months.","Count of distinct MHD_MHMDS_Record_Number where \nIC_Rec_endRP_Employment_Status  is not null"]
["mm17",null,"People aged 18-69 on CPA at the end of the RP in employment.","People aged 18-69 on CPA in employment","RC04, RC06, EV03","People aged 18-69 with an open Care Programme Approach Episode at the end of the RP  whose most recent record of Employment Status in the previous  12 months showed they were employed. ","Count of distinct MHD_MHMDS_Record_Number where IC_Rec_endRP_CPA_Flag ='Y' and MHD_Age_Start_Reporting_Period >=18 and MHD_Age_Start_Reporting_Period< =69  and (IC_Rec_endRP_Employment_Status = '1' OR\nIC_Rec_endRP_Employment_Status = '01')","Numerator for indicator 2 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm18","Proportion of people aged 18-69 on CPA in employment",null,null,null,"Divide mm17 by mm03 and show as a percentage",null,"Indicator 2 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method. There are currently no exclusions for patients who are detained or in High Secure services and this should be noted if calculating provider level percentages for comparison purposes as such patients should potentially be excluded."]
["mm19",null,"People with a crisis plan in place at the end of the RP","People with a crisis plan in place","RC55","People with an open Adult Mental Health Care Spell at the end of the RP for whom a record of an open Mental Health Crisis Plan was submitted in the last 12 months.","Count of distinct  MHD_MHMDS_Record_Number where  IC_Rec_EndRP_Crisis_Plan = 'Y'","Methodology updated for April 2014 data following engagement with users"]
["mm20",null,"People in contact with services at the end of the RP  with a diagnosis recorded","People with a diagnosis recorded","RC09","People with an open Adult Mental Health Care Spell at the end of the RP who had Primary Diagnosis recorded in the previous 12 months.","Count of distinct  MHD_MHMDS_Record_Number where IC_Rec_endRP_PDIAG_Flag is not null"]
["In month activity counts"]
["mm22",null,"Adult Mental Health Spell days in RP","Spell Days","RC54","The total number of days in  Adult Mental Health Care Spells in the RP based on the start and end dates of the  Adult Mental Health Care Spell and the start and end of the RP.  Where the spell start date is before the start or the RP, the start of the reporting period is used.  Where end date is not present, the end of the RP is used. ","Sum of IC_Spell_RP_Days"]
["mm23","Spells starting","Adult Mental Health Spells starting in RP","Spells starting","-","The number of  Adult Mental Health Care Spells that started in the RP.","Count of distinct  MHD_MHMDS_Record_Number where (MHD_Start_Date_MHCS >=Start_Date and MHD_Start_Date_MHCS <=end_Date)"]
["mm24",null,"Bed days in RP","Bed days","RC41","The number of Bed Days in the RP calculated from the start and end dates of Ward Stays Within Hospital Provider Spell and the start and end dates of the RP, as mm22","Sum of IC_Rec_RP_Wrdst_Days_Gross"]
["mm25",null,"Bed days less leave in RP","Bed days net leave","RC42","The number of Bed Days between the start and end date of a Ward Stay episode within the reporting period and subtracts Home leave","Sum of IC_Rec_RP_Wrdst_Days_Net"]
["mm26","Admissions to hospital ","Admissions to hospital in the RP","Admissions to hospital","RC19","The number of admissions to hospital in the RP, calculated from the start dates of Hospital Provider Spells","Sum of IC_Rec_RP_Admission  ","Measure from Experimental Analysis Line 6 previously published as part of Routine Quarterly MHMDS Reports."]
["mm27",null,"Detentions on admission to hospital in the RP","Detentions on admission to hospital","RC20","The number of detentions under the Mental Health Act (1983) on admission to hospital in the RP. Uses of short term sections and holding powers and Place of Safety Orders that coincided with the day of admission are excluded.  Detentions on day of admission includes uses of sections 2, 3, 35, 36, 37 (with or without s41 restrictions) 38,44, 46, 45A and 47 and 48 \n(with or without s49 restrictions), and detentions under previous legislation (Fifth Schedule) and other Acts","Sum of IC_Rec_RP_Admission_Formal","Measure from Experimental Analysis Line 6 previously published as part of Routine Quarterly MHMDS Reports.  This measure replicates the National Statistic measure [Detentions on admission to hospital] currently produced from KP90 collection [Reference table 1 in the annual publication]."]
["mm28",null,"Discharges from hospital in the RP","Discharges from hospital","RC31","The number of discharges from hospital in the RP, calculated from the end dates of Hospital Provider Spells","Sum of IC_Rec_RP_Discharges_Gross","Measure currently produced in annual Mental Health Bulletin."]
["mm29",null,"Discharges from hospital, net, in RP","Discharges from hospital net","RC32","The number of inpatient discharges from hospital in the reporting period, plus the last seven days of the previous reporting period and excluding:\nThe last 7 days or\nWhere the method of discharge is null or is not 'client died'. \nWhere the admission method was elective.\nWhere the person was under the age of 17 at the end of the RP.\nPeople without a record in the current reporting period.\nThere must also be a episode of type REF that is open in the reporting period or is discharged in the  reporting period, excluding the last 7 days,  and not discharged due to transfer to another provider.\nThe date of hospital discharge must not be the same as the date of referral discharge.","Sum of IC_Rec_RP_Discharges_Net","Measure from Experimental Analysis Line 7 previously published as part of Routine Quarterly MHMDS Reports. Methodology updated for April 2014 data following engagement with expert user group"]
["mm30",null,"Discharges from hospital, net, followed up within 7 days in RP","Discharges from hospital, net, followed up within 7 days","RC30","The number of net discharges (mm29) that were followed up within 7 days within the same provider.","Sum of IC_Rec_RP_Disch_Net_Followup","Measure from Experimental Analysis Line 7 previously published as part of Routine Quarterly MHMDS Reports. Methodology updated from April 2014 data following engagement with expert user group"]
["mm31","Proportion of discharges from hospital followed up within 7 days",null,null,null,"Divide mm29 by mm30 and show as a percentage"]
["mm32",null,"Contacts and day care attendances in RP","Contacts and day care attendances","RC26, RC52","The number of Health Care Professional Contacts and NHS Day Care Facility Attendances in the RP","Sum of (IC_Rec_DAYATT_Contacts + IC_Rec_RP_Contacts)","Measure currently produced in annual Mental Health Bulletin"]
["mm33",null,"Attended contacts and day care attendances in RP","Attended contacts and day care attendances","RC27, RC53","The number of attended Health Care Professional Contacts and NHS Day Care Facility Attendances in the RP","Sum of (IC_Rec_DAYATT_Contacts_Att + IC_Rec_RP_Contacts_Att)","Measure currently produced in annual Mental Health Bulletin"]
["mm34",null,"Days of delayed discharge in RP","Days of delayed discharge","RC29","The number of days between the start and end date of a Delayed Discharge within the RP.","Sum of IC_Rec_RP_DDisc_Days","Experimental measure"]
["mm39",null,"AWOL episodes in RP","AWOL episodes","RC50","The number of Mental Health Absence Without Leave episodes that start in the reporting period and that lasted for more than 1 day","Sum of IC_Rec_RP_AWOL","Numerator for indicator 7 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports, see the September 2013 Methodological Change paper for changes in method."]
["mm40",null,"Under 16 bed days in RP","Under 16 bed days","RC41","The number of Bed Days, for patients under the age of 16,  in the RP","SUM of IC_Rec_RP_Wrdst_Days_Gross where MHD_Age_End_Reporting_Period<16","Indicator 10 of the former DH Performance Framework for mental health trusts, previously published as part of Summary Statistics in Routine Quarterly MHMDS Reports. see the September 2013 Methodological Change paper for changes in method."]
["mm62",null,"16 year old bed days in RP","16 year old bed days","RC41","The number of Bed Days, for patients aged of 16,  in the RP","SUM of IC_Rec_RP_Wrdst_Days_Gross where MHD_Age_End_Reporting_Period=16","New measure - following stakeholder feedback"]
["mm63",null,"17 year old bed days in RP","17 year old bed days","RC41","The number of Bed Days, for patients aged of 17,  in the RP","SUM of IC_Rec_RP_Wrdst_Days_Gross where MHD_Age_End_Reporting_Period=17","New measure - following stakeholder feedback"]
["mm64",null,"Emergency admissions in RP","Emergency admissions","RC58","The number of admissions in the current reporting period, excluding:\nWhere the admission method was elective or transfer\nWhere the patient was under the age of 17 at the end of the RP","SUM of IC_Rec_RP_Em_Admissions","Experimental measure"]
["mm65",null,"Emergency readmissions in RP","Emergency readmissions","RC59","The number of emergency admissions that were preceded by an inpatient discharge, excluding:\nWhere the inpatient discharge occurred more than 30 days before the emergency admission\nWhere the inpatient discharge was from another provider\nWhere the method of discharge 'patient died'. \nThere must also be an episode of type REF that is open or ends in the reporting period or the previous reporting period and not discharged due to transfer to another provider.\nThe date of hospital discharge must not be the same as the date of referral discharge.","SUM of IC_Rec_RP_ReAdmissions","Experimental measure"]
[]
["Data source: Mental Health Minimum Dataset (MHMDS) monthly data"]
["Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]

{"sheet":"Currency and Payment Measures","index":3,"n_rows":93,"n_cols":8,"rows_kept":93,"cut":false,"hidden":false,"merged":[[51,0,51,7],[70,0,70,7],[91,0,91,6],[0,1,0,3],[2,0,2,7],[10,0,10,7],[20,0,20,7],[31,0,31,7]]}
[null,"Name and where used"]
["CP measure reference number ","Executive Summary (National)","Monthly currency and payment report","CAP data file field name","IC derivation reference number","Description of measure\n(where possible measures are described in terms of the classes of information defined in NHS Data Dictionary)","Construction","Notes"]
["Groupings"]
[null,null,"Month",null,null,"The reporting month"]
[null,null,"Provider code",null,null,"ORGANISATION CODE of service provider"]
[null,null,"Provider name",null,null,"ORGANISATION NAME of service provider"]
[null,null,"CCG Code",null,"RC01","The CCG used is the CCG of GP practice or, if GP practice was not recorded or was invalid, the CCG derived from the patient’s postcode.  ","IC_Rec_CCG","Commissioner extracts from the Bureau Service are filtered by ‘Org Code of Commissioner’, not by the field 'CCG of GP Practice'. The commissioner recorded in an MHMDS record may not be a CCG so there may be differences between analysis of commissioner extracts and analysis by CCG in this file, depending on how the provider recorded the Org Code of Commissioner."]
[null,null,"CCG name",null,null,"ORGANISATION NAME of the CCG"]
[null,null,"Care cluster",null,null,"MENTAL HEALTH CARE CLUSTER CODE"]
[null,null,"Reporting level",null,null,"The data grouping. This should be filtered depending on the analysis required",null,"Values are - provider, CCG and Provider-CCG"]
["Summary Figures"]
["CP001",null,"People in contact with services at the end of the Reporting Period (RP)","People in contact with services",null,"People with an open Adult Mental Health Care Spell in NHS funded adult specialist mental health services at the end of the Reporting Period (RP)","see MM01 in monthly data measures tab"]
["CP002",null,"People in scope for MH currencies at the start of the RP","People in scope start RP","RC56","People in scope for mental health currencies at the start of the RP","Count of MHD_MHMDS_Spell_ID where IC_Rec_InScope_Start_Month = 'y'"]
["CP003",null,"People in scope for MH currencies at the end of the RP","People in scope end RP","RC57","People in scope for MH currencies at the end of the RP","Count of MHD_MHMDS_Spell_ID where IC_Rec_InScope_EndRP = 'y'","Denominator for MH currencies and payment recommended quality indicator C1"]
["CP004",null,"People in scope for MH currencies at the end of the RP assigned a cluster","People in scope assigned to cluster","RC57, EP02","People in scope for MH currencies at the end of the RP with a Mental Health Care Cluster assigned","Count of MHD_MHMDS_Spell_ID where IC_Rec_InScope_EndRP = 'y' \nAND (count distinct MHD_Episode_ID > 0 WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND MHD_EpiEnd_Date IS NULL)","Numerator for MH currencies and payment recommended quality indicator C1"]
["CP005","Proportion of in scope patients assigned to a cluster ","Proportion of in scope patients assigned to a cluster ","% people assigned to cluster","RC57","Divide CP004 by CP003 and show as a percentage",null,"MH currencies and payment recommended quality indicator C1"]
["CP006",null,"Clusters assigned to people in scope for MH currencies at the end of the RP","Clusters assigned to people","RC57, EP02","The number of Mental Health Care Clusters assigned to people in scope for MH currencies at the end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND MHD_EpiEnd_Date IS NULL \nAND IC_Rec_InScope_EndRP = 'y' ","Denominator for a number of measures"]
["CP007",null,"Proportion duplicate care clusters","% duplicate clusters ",null,"CP006 minus CP004 divide by CP006 and show as a percentage",null,"This measure is an important indicator of data quality. If this value is high, many of the preceding measures will be effected as we are unable to identify which care cluster to use where a person is assigned more than one cluster at any one time"]
["CP008",null,"People assigned to cluster with contact within Cluster Review Period","People with contact within review period","RC57, EP02","The number of Mental Health Care Clusters assigned to people in scope for MH currencies at the end of the RP that have had a contact with an in scope team or inpatient stay on an in scope ward recorded within the review period for that Mental Health Care Cluster","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND MHD_EpiEnd_Date IS NULL \nAND IC_Rec_InScope_EndRP = 'y'\nAND COUNT (WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL) \nAND (MHD_Attended_Indicator IN ('5','6') OR MHD_Attended_Indicator IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)    AND MHD_EventDate BETWEEN (@End_RP - Review Period) AND @EndRP \nOR (MHD_EpiType = 'WRDST' \nAND (MHD_WardSec_Level = '0' OR MHD_WardSec_Level IS NULL)  \nAND IC_Epi_RP_Days > 1 \nAND (MHD_Int_ClinCare_Intensity_Code NOT IN ('61','62','63') OR MHD_Int_ClinCare_Intensity_Code IS NULL) \nAND MHD_EpiStart_Date BETWEEN (@End_RP - Review Period) AND @EndRP) > 0","Reported by care cluster from June 2014 data (published September 2014)"]
["CP009",null,"Proportion of people assigned to cluster on active caseload","% caseload active",null,"Divide CP008 by CP006 and show as a percentage",null,"Reported by care cluster from June 2014 data (published September 2014)"]
["New service users in the month - by care cluster"]
["CP010",null,"Initial cluster assignments in the RP","Initial cluster assignments","RC56, RC57","The number of people who were in scope for MH currencies at the start or end of the RP whose Adult Mental Health Care Spell started after April 2013 and whose first Mental Health Care Cluster Assignment Period was in the RP","Count of MHD_MHMDS_Spell_ID where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date  BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'","Measures relating to initial Care Cluster Assignment Periods are limited to Adult Mental Health Care Spells that started after 31/03/2014.  Local differences in the pace of implementing clusters means it is difficult to reliably identify the initial assignment in a spell prior to this date. \nDenominator for MH currencies and payment recommended quality indicator C2"]
["CP011",null,"Initial cluster assignments with MHCT assessment in RP","Initial cluster assignments with MHCT","RC56, RC57","The number of people who were in scope for MH currencies at the start or end of the RP, whose Adult Mental Health Care Spell started after April 2013 and whose first Mental Health Care Cluster Assignment Period was in the RP and had a Mental Health Clustering Tool recorded up to three days before the start of the Mental Health Care Cluster with the same Mental Health Care Cluster as the first Mental Health Care Cluster assigned","Count of MHD_MHMDS_Spell_ID where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31' \nAND MHD_EventDate BETWEEN MHD_EpiStart_Date - 3 and MHD_EpiStart_Date \nAND episode.MHD_PbR_Cluster = event.MHD_PbR_Cluster"]
["CP012",null,"Initial cluster assignments meeting red rules in the RP","Initial cluster assignments meeting red rules","RC56, RC57","The number of people who were in scope for MH currencies at the start or end of the RP, whose Adult Mental Health Care Spell started after April 2013 and whose first Mental Health Care Cluster Assignment Period was in the RP and had a Mental Health Clustering Tool recorded that met the red rules for that Mental Health Care Cluster up to three days before the start of the Mental Health Care Cluster with the same Mental Health Care Cluster as the first Mental Health Care Cluster assigned","Count of MHD_MHMDS_Spell_ID where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31' \nAND MHD_EventDate BETWEEN MHD_EpiStart_Date - 3 and MHD_EpiStart_Date \nAND episode.MHD_PbR_Cluster = event.MHD_PbR_Cluster \nAND the MHCT met the red rules for that care cluster","Numerator for MH currencies and payment recommended quality indicator C2"]
["CP013","Proportion of initial cluster allocations adhering to red rules","Proportion of initial cluster allocations adhering to red rules","% meeting red rules",null,"Divide CP012 by CP010 and show as a percentage",null,"MH currencies and payment recommended quality indicator C2"]
["CP014",null,"Days (MIN) to initial cluster assignments in RP","MIN days to initial cluster assignment","RC56, RC57","The difference in days between first face to face contact and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","MIN(DATEDIFF(MHD_EventDate, MHD_EpiStart_Date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["CP015",null,"Days (MEAN) to initial cluster assignments in RP","MEAN days to initial cluster assignment","RC56, RC57","The difference in days between first face to face contact and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","AVG(DATEDIFF(MHD_EventDate, MHD_EpiStart_Date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["CP016",null,"Days (MAX) to initial cluster assignments in RP","MAX days to initial cluster assignment","RC56, RC57","The difference in days between first face to face contact and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","MAX(DATEDIFF(MHD_EventDate, MHD_EpiStart_Date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["CP017",null,"Contacts (MIN) to initial cluster assignments in RP","MIN contacts to initial cluster assignment","RC56, RC57","The number of contacts between first attended face to face contact with an in scope team or inpatient stay on an in scope ward and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","MIN(COUNT WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL) \nAND (MHD_Attended_Indicator IN ('5','6') OR MHD_Attended_Indicator IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)    AND MHD_EventDate BETWEEN (First contact) AND MHD_EpiStart_Date \nOR (MHD_EpiType = 'WRDST' \nAND (MHD_WardSec_Level = '0' OR MHD_WardSec_Level IS NULL)  \nAND IC_Epi_RP_Days > 1 \nAND (MHD_Int_ClinCare_Intensity_Code NOT IN ('61','62','63') OR MHD_Int_ClinCare_Intensity_Code IS NULL) \nAND MHD_EpiStart_Date BETWEEN (First contact) AND MHD_EpiStart_Date \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["CP018",null,"Contacts (MEAN) to initial cluster assignments in RP","MEAN contacts to initial cluster assignment","RC56, RC57","The number of contacts between first attended face to face contact with an in scope team or inpatient stay on an in scope ward and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","AVG(COUNT WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL) \nAND (MHD_Attended_Indicator IN ('5','6') OR MHD_Attended_Indicator IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)    AND MHD_EventDate BETWEEN (First contact) AND MHD_EpiStart_Date \nOR (MHD_EpiType = 'WRDST' \nAND (MHD_WardSec_Level = '0' OR MHD_WardSec_Level IS NULL)  \nAND IC_Epi_RP_Days > 1 \nAND (MHD_Int_ClinCare_Intensity_Code NOT IN ('61','62','63') OR MHD_Int_ClinCare_Intensity_Code IS NULL) \nAND MHD_EpiStart_Date BETWEEN (First contact) AND MHD_EpiStart_Date \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["CP019",null,"Contacts (MAX) to initial cluster assignments in RP","MAX contacts to initial cluster assignment","RC56, RC57","The number of contacts between first attended face to face contact with an in scope team or inpatient stay on an in scope ward and first Mental Health Care Cluster Assignment Period that took place in the RP, for people in scope for MH currencies at the start or end of the RP","MAX(COUNT WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL) \nAND (MHD_Attended_Indicator IN ('5','6') OR MHD_Attended_Indicator IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)    AND MHD_EventDate BETWEEN (First contact) AND MHD_EpiStart_Date \nOR (MHD_EpiType = 'WRDST' \nAND (MHD_WardSec_Level = '0' OR MHD_WardSec_Level IS NULL)  \nAND IC_Epi_RP_Days > 1 \nAND (MHD_Int_ClinCare_Intensity_Code NOT IN ('61','62','63') OR MHD_Int_ClinCare_Intensity_Code IS NULL) \nAND MHD_EpiStart_Date BETWEEN (First contact) AND MHD_EpiStart_Date \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') \nAND MHD_EpiStart_Date BETWEEN @StartRP and @EndRP \nAND MHD_Start_Date_MHCS > '2013-03-31'"]
["Quality measures - by care cluster"]
["CP020",null,"People assigned to cluster in scope for MH currencies within cluster review period at the end of the RP","People within review period","RC57, EP02","The number of Mental Health Care Clusters assigned to people who were in scope for MH currencies at the end of the RP that were within the review period for that Mental Health Care Cluster","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND MHD_EpiEnd_Date IS NULL \nAND IC_Rec_InScope_EndRP = 'y' \nAND DATEDIFF(CASE WHEN MHD_EpiStart_Date >= [Last assessment] OR ass.[Last assessment] IS NULL THEN MHD_EpiStart_Date ELSE ass.[Last assessment],@EndRP) <= (Cluster review period)","Because of differences in the way cluster episodes are reported, this measure is calculated using the difference between the end of the reporting period and either the cluster episode start date or the most recent MHCT assessment (with the same care cluster as the cluster episode) that was recorded after the cluster episode, whichever is later. \nNumerator for MH currencies and payment recommended quality indicator C3"]
["CP021",null,"People assigned to cluster in scope for MH currencies outside cluster review period at the end of the RP","People outside review period",null,"Minus CP020 from CP006"]
["CP022","Proportion of patients within Cluster Review Periods ","Proportion of patients within Cluster Review Periods ","% in review period",null,"Divide CP020 by CP006 and show as a percentage",null,"MH currencies and payment recommended quality indicator C3"]
["CP023",null,"Cluster review periods ended in RP","Review periods ended","RC56, RC57","The number of Cluster Review Periods that ended in the reporting period, for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')"]
["CP024",null,"Distribution of Actual Cluster Review Periods (MIN)","MIN days in ended review periods","RC56, RC57","For Cluster Review Periods that ended in the RP, the number of days within the Cluster Review Period for people in scope for MH currencies at the start or end of the RP.","MIN(DATEDIFF(dd,MHD_EpiStart_Date,@EndRP) WHERE MHD_EpiType = 'CLUST' AND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP AND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')","Experimental measure to inform the development of suggested additional quality indicator C6"]
["CP025",null,"Distribution of Actual Cluster Review Periods (MEAN)","MEAN days in ended review periods","RC56, RC57","For Cluster Review Periods that ended in the RP, the number of days within the Cluster Review Period for people in scope for MH currencies at the start or end of the RP.","AVG(DATEDIFF(dd,MHD_EpiStart_Date,@EndRP) WHERE MHD_EpiType = 'CLUST' AND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP AND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')","Experimental measure to inform the development of suggested additional quality indicator C6"]
["CP026",null,"Distribution of Actual Cluster Review Periods (MAX)","MAX days in ended review periods","RC56, RC57","For Cluster Review Periods that ended in the RP, the number of days within the Cluster Review Period for people in scope for MH currencies at the start or end of the RP.","MAX(DATEDIFF(dd,MHD_EpiStart_Date,@EndRP) WHERE MHD_EpiType = 'CLUST' AND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP AND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')","Experimental measure to inform the development of suggested additional quality indicator C6"]
["CP027",null,"Cluster review periods that ended and stepped up in RP","Reviews stepped up","RC56, RC57","The number of Cluster Review Periods that ended in the RP that stepped up into another care cluster, for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') that stepped up into another cluster","Experimental measure to inform the development of suggested additional quality indicator C11. Please note that the sum of measures CP027 to CP031 will not total CP023 because there are no transitions to or from cluster '00' defined in the Clustering Booklet."]
["CP028",null,"Cluster review periods that ended with little change in RP","Reviews with little change","RC56, RC57","The number of Cluster Review Periods that ended in the RP that resulted in little change, for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') that resulted in little change","Experimental measure to inform the development of suggested additional quality indicator C11. Please note that the sum of measures CP027 to CP031 will not total CP023 because there are no transitions to or from cluster '00' defined in the Clustering Booklet."]
["CP029",null,"Cluster review periods that ended and stepped down in RP","Reviews stepped down","RC56, RC57","The number of Cluster Review Periods that ended in the RP that stepped down into another care cluster, for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') that stepped down into another cluster","Experimental measure to inform the development of suggested additional quality indicator C11. Please note that the sum of measures CP027 to CP031 will not total CP023 because there are no transitions to or from cluster '00' defined in the Clustering Booklet."]
["CP030",null,"Cluster review periods that ended with a rare transition in RP","Reviews with rare transition","RC56, RC57","The number of Cluster Review Periods that ended in the RP that resulted in a rare transition, for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP AND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') that resulted in a rare transition","Experimental measure to inform the development of suggested additional quality indicator C11. Please note that the sum of measures CP027 to CP031 will not total CP023 because there are no transitions to or from cluster '00' defined in the Clustering Booklet."]
["CP031",null,"Cluster review periods that ended with a discharge in RP","Reviews discharged","RC56, RC57","The number of Cluster Review Periods that ended in the RP that resulted in discharge (or no following cluster), for people in scope for MH currencies at the start or end of the RP","Count of distinct MHD_Episode_ID WHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP AND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') that resulted in no subsequent cluster recorded","Experimental measure to inform the development of suggested additional quality indicator C11. Please note that the sum of measures CP027 to CP031 will not total CP023 because there are no transitions to or from cluster '00' defined in the Clustering Booklet."]
["CP032",null,"Cluster episodes that ended in the RP","Cluster episodes ended","RC56, RC57","The number of Cluster Episode Period that ended in the reporting period for people in scope for MH currencies at the start or end of the RP. This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place.  Cluster Episode Periods with a submitted start date before 01/04/2011 are  excluded","Count of cluster episodes WHERE (cluster episode) end date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')","Experimental measure to support the implementation of Clinican Rated Outcome Measurement (CROMS). Updated for June 2014 data (published in September 2014) to exclude open care cluster episodes at the end of the month"]
["CP033",null,"Cluster episodes that ended in the RP, net","Cluster episodes ended, net","RC56, RC58","The number of Cluster Episode Periods that ended between the start of the reporting period -3 days and the end of the reporting period - 3 days for people in scope for MH currencies at the start or end of the RP. This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place. Cluster Episode Period with a submitted start date before 01/04/2011 or a duration of less than four days are excluded","Count of cluster episodes WHERE (cluster episode) end date BETWEEN @StartRP-3 AND @EndRP-3 \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') \nAND DATEDIFF(dd,cluster episode) start date,cluster episode) end date) >=4","Experimental measure to support the implementation of Clinican Rated Outcome Measurement (CROMS). Updated for June 2014 data (published in September 2014) to exclude open care cluster episodes at the end of the month"]
["CP034",null,"Cluster episodes that ended in the RP with paired HoNOS","Cluster episodes ended, net, with HoNOS","RC56, RC57","The number of Cluster Episode Periods that ended between the start of the reporting period -3 days and the end of the reporting period - 3 days for people in scope for MH currencies at the start or end of the RP with a valid Health of the Nation Outcomes Score (HoNOS)  or Mental Health Clustering Tool completed at both the start and end of the care cluster episode (up to 3 days before start/end date of cluster episode). This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place. Cluster Episode Period with a submitted start date before 01/04/2011 or a duration of less than four days are excluded","Count of cluster episodes WHERE (cluster episode) end date BETWEEN @StartRP AND @EndRP \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y') \nwith valid (items 1-12 BETWEEN 0 and 4 and Item 8 Type BETWEEN 'A' AND 'J' OR Item 8 Type IS NULL) recorded (BETWEEN cluster episode start -3 and cluster episode start) AND (BETWEEN cluster episode end -3 and cluster episode end)\nAND DATEDIFF(dd,cluster episode) start date,cluster episode) end date) >=4","Experimental measure to support the implementation of Clinican Rated Outcome Measurement (CROMS). Updated for June 2014 data (published in September 2014) to exclude open care cluster episodes at the end of the month"]
["CP035",null,"Proportion of cluster episodes that ended in the RP with a HoNOS assessment at start and end","%  with HONOS",null,"Divide CP034 by CP033 and show as a percentage",null,"Experimental measure to support the implementation of Clinican Rated Outcome Measurement (CROMS)"]
["CP036",null,"Distribution of Actual Cluster Episode Period Duration (MIN) ","MIN days in ended cluster episodes","RC56, RC57","The total time (days) spent in a Cluster Episode Period that ended in the reporting period for people in scope for MH currencies at the start or end of the RP. This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place.  Cluster Episode Periods with a submitted start date before 01/04/2011 are excluded","MIN(DATEDIFF(dd,(cluster episode) start date, cluster episode end date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') AND cluster episode end date BETWEEN @StartRP and @EndRP","Experimental measure to inform the development of suggested additional quality indicator C5"]
["CP037",null,"Distribution of Actual Cluster Episode Period Duration (MEAN) ","MEAN days in ended cluster episodes","RC56, RC57","The total time (days) spent in a Cluster Episode Period that ended in the reporting period for people in scope for MH currencies at the start or end of the RP. This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place.  Cluster Episode Periods with a submitted start date before 01/04/2011 are excluded","MIN(DATEDIFF(dd,(cluster episode) start date, cluster episode end date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') AND cluster episode end date BETWEEN @StartRP and @EndRP","Experimental measure to inform the development of suggested additional quality indicator C5"]
["CP038",null,"Distribution of Actual Cluster Episode Period Duration (MAX) ","MAX days in ended cluster episodes","RC56, RC57","The total time (days) spent in a Cluster Episode Period that ended in the reporting period for people in scope for MH currencies at the start or end of the RP. This is the number of days that a patient has remained on the same cluster regardless of whether Mental Health Clustering Tool assessment reviews have taken place.  Cluster Episode Periods with a submitted start date before 01/04/2011 are excluded","MIN(DATEDIFF(dd,(cluster episode) start date, cluster episode end date) where (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'Y') AND cluster episode end date BETWEEN @StartRP and @EndRP","Experimental measure to inform the development of suggested additional quality indicator C5"]
["Activity measures - by care cluster"]
["CP039",null,"CPA reviews in the RP","CPA reviews","RC56, RC57, EP02","The number of Care Programme Approach Reviews recorded during the RP (excluding last 3 days, but including last 3 days of previous RP) for people in scope for MH currencies at the start or end of the RP. Reported by Mental Health Care Cluster(s) assigned at the time","Count of MHD_Event_ID WHERE MHD_EventDate BETWEEN @StartRP -3 AND @EndRP -3 \nAND MHD_EventType = 'REV'\nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y'). \nLinked to open care cluster(s) at the time of the event (MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND (MHD_EpiEnd_Date IS NULL OR MHD_EpiEnd_Date > MHD_EventDate)","This measure is reported by care cluster open at a specific point in time and should be used alongside CP007 in order to understand the impact of duplicate care clusters on this measure"]
["CP040",null,"CPA reviews in the RP with corresponding MHCT","CPA reviews with MHCT","RC56, RC57","The number of Care Programme Approach Reviews recorded during the RP (excluding last 3 days, but including last 3 days of previous RP) with a Mental Health Clustering Tool assessment review recorded within 3 days (either side of the Care Programme Approach Review) for people in scope for MH currencies at the start or end of the RP.","Count of MHD_Event_ID WHERE MHD_EventDate BETWEEN @StartRP -3 AND @EndRP -3 \nAND MHD_EventType = 'REV' \nAND (COUNT MHD_Event_ID > 0 WHERE MHD_Event_Type = 'MHCT'\n AND MHD_EventDate BETWEEN cpa.MHD_EventDate -3 AND cpa.MHD_EventDate +3) \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y'). \nLinked to open care cluster(s) at the time of the event (see CP039)","Experimental measure to inform the development of suggested additional quality indicator C8\nSee CP007 for data quality considerations"]
["CP041",null,"Proportion CPA reviews in the RP with MHCT","% CPA reviews with MHCT",null,"Divide CP040 by CP039 and show as a percentage"]
["CP042",null,"Cluster days in the RP","Cluster days","RC56, RC57, EP02","The number of days spent in a Mental Health Care Cluster in the RP for people in scope for MH currencies at the start or end of the RP.Where the Mental Health Care Cluster start date is before the start of the RP, the start of the reporting period is used.  Where end date is not present, the end of the RP is used","Count of days BETWEEN (CASE WHEN MHD_EpiStart_Date < @Start_RP THEN @Start_RP WHEN MHD_EpiStart_Date IS NULL THEN @Start_RP ELSE MHD_EpiStart_Date) \nAND (CASE WHEN MHD_EpiEnd_Date > @End_RP THEN @End_RP WHEN MHD_EpiEnd_Date IS NULL THEN @End_RP ELSE MHD_EpiEnd_Date) \nWHERE MHD_EpiType = 'CLUST' \nAND MHD_PbR_Cluster in ('00', '01', '02', '03', '04', '05', '06', '07', '08', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21') \nAND IC_Inactive_timestamp IS NULL \nAND (MHD_EpiEnd_Date IS NULL OR MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP) \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y')","Denominator for MH currencies and payment recommended quality indicator R5\nSee CP007 for data quality considerations"]
["CP043",null,"Bed days in the RP","Bed days","RC56, RC57, EP02","The number of bed days on in scope wards in the RP for people in scope for MH currencies at the start or end of the RP. Calculated from the start and end dates of in scope Ward Stays Within Hospital Provider Spell and the start and end dates of the RP, as CP042","Count of days BETWEEN (CASE WHEN MHD_EpiStart_Date < @Start_RP THEN @Start_RP WHEN MHD_EpiStart_Date IS NULL THEN @Start_RP ELSE MHD_EpiStart_Date) \nAND (CASE WHEN MHD_EpiEnd_Date > @End_RP THEN @End_RP WHEN MHD_EpiEnd_Date IS NULL THEN @End_RP ELSE MHD_EpiEnd_Date) \nWHERE MHD_EpiType = 'WRDST' \nAND (MHD_WardSec_Level = '0' OR MHD_WardSec_Level IS NULL)  \nAND IC_Epi_RP_Days > 1 \nAND (MHD_Int_ClinCare_Intensity_Code NOT IN ('61','62','63') OR MHD_Int_ClinCare_Intensity_Code IS NULL) \nAND IC_Inactive_timestamp IS NULL \nAND (MHD_EpiEnd_Date IS NULL OR MHD_EpiEnd_Date BETWEEN @StartRP AND @EndRP) \nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y'). \nLinked to open care cluster(s) at the time of the event (see CP039)","Numerator for MH currencies and payment recommended quality indicator R5\nSee CP007 for data quality considerations"]
["CP044",null,"Intensity of care","Intensity of care",null,"Divide CP043 by CP042 and show as a percentage",null,"MH currencies and payment recommended quality indicator R5"]
["CP045",null,"People with an open hospital spell at the end of the RP","People with an open hospital spell","RC48, RC57","People with an open Hospital Provider Spell at the end of the RP.  This may include people on leave. Reported by Mental Health Care Cluster(s) assigned at the time","see MM07 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","See CP007 for data quality considerations"]
["CP046",null,"Proportion with open hospital spell at the end of the RP","% with open hospital spell",null,"Divide CP045 by CP006 and show as a percentage"]
["CP047",null,"People subject to the Mental Health Act at the end of the RP","People subject to the Mental Health Act","RC49, RC57","The number of people in NHS funded specialist adult mental health services at the end of the RP who were subject to the Mental Health Act.  This number includes people in these discrete categories (on a single day a person can only be in one category): people subject to detention (see mm09) people subject to CTO (see mm10), as well as people subject to short term holding powers under sections 4, 5(2), 5(4), 135 or 136 and people subject to Guardianship but not on a CTO. Reported by Mental Health Care Cluster(s) assigned at the time","see MM08 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","See CP007 for data quality considerations"]
["CP048",null,"Proportion subject to the Mental Health Act at the end of the RP","% people subject to MHA",null,"Divide CP047 by CP006 and show as a percentage"]
["CP049",null,"Admissions to hospital in the RP","Admissions to hospital","RC56, RC57","The number of admissions to hospital in the RP, calculated from the start dates of Hospital Provider Spells. Reported by Mental Health Care Cluster(s) assigned at the time","see MM26 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP002 OR CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","This is includes all admissions and is not limited to in scope wards. Limited by people in scope at the start or end of the RP\nSee CP007 for data quality considerations"]
["CP050",null,"Discharges from hospital in the RP","Discharges from hospital","RC56, RC57","The number of discharges from hospital in the RP, calculated from the end dates of Hospital Provider Spells. Reported by Mental Health Care Cluster(s) assigned at the time","see MM28 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP002 OR CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","This is includes all discharges and is not limited to in scope wards. Limited by people in scope at the start or end of the RP\nSee CP007 for data quality considerations"]
["CP051",null,"Discharges from hospital, net, in RP","Discharges from hospital, net","RC56, RC57","The number of inpatient discharges from hospital in the reporting period, plus the last seven days of the previous reporting period and excluding:\nThe last 7 days or\nWhere the method of discharge is null or is not 'client died'. \nWhere the admission method was elective.\nWhere the person was under the age of 17 at the end of the RP\nPeople without a record in the current reporting period\nThere must also be a episode of type REF that is open in the reporting period or is discharged in the  reporting period, excluding the last 7 days,  and not discharged due to transfer to another provider.\nThe date of hospital discharge must not be the same as the date of referral discharge. Reported by Mental Health Care Cluster(s) assigned at the time","see MM29 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP002 OR CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","This is includes all discharges and is not limited to in scope wards. Limited by people in scope at the start or end of the RP\nSee CP007 for data quality considerations"]
["CP052",null,"Discharges from hospital, net, followed up within 7 days in RP","Discharges from hospital, net, followed up within 7 days","RC56, RC57","The number of net discharges (CP055) that were followed up within 7 days within the same provider. Reported by Mental Health Care Cluster(s) assigned at the time","see MM30 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP002 AND CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","This is includes all discharges and is not limited to in scope wards. Limited by people in scope at the start or end of the RP\nSee CP007 for data quality considerations"]
["CP053",null,"Proportion of discharges from hospital, net, followed up within 7 days in RP","% followed up",null,"Divide CP052 by CP051 and show as a percentage"]
["CP054",null,"Contacts and day care attendances in RP","Contacts and day care attendances","RC56, RC57","The number of Health Care Professional Contacts and NHS Day Care Facility Attendances from in scope teams in the RP. Reported by Mental Health Care Cluster(s) assigned at the time","Count of distinct MHD_Event_ID WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)\nAND e.MHD_EventDate BETWEEN @Start_RP AND @End_RP\nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y'). \nLinked to open care cluster(s) at the time of the event (see CP039)","See CP007 for data quality considerations"]
["CP055",null,"Contacts and day care attendances in RP not attended","Contacts and day care attendances DNA","RC56, RC57","The number of Health Care Professional Contacts and NHS Day Care Facility Attendances from in scope teams that were not attended in the RP. Reported by Mental Health Care Cluster(s) assigned at the time","Count of distinct MHD_Event_ID WHERE MHD_EventType IN ('HPCON','DAYAT')  \nAND (MHD_MHC_Team_Type IN ('A01', 'A02', 'A03', 'A04', 'A05', 'A06', 'A07', 'A09', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16','ZZZ') OR MHD_MHC_Team_Type IS NULL) \nAND (MHD_Contact_Subject IN ('01', '1') OR MHD_Contact_Subject IS NULL)  \nAND (MHD_ConsultMedium IN ('01','1','02','2','03','3','04','4') OR MHD_ConsultMedium IS NULL)\nAND MHD_Attended_Indicator NOT IN ('5','05','6','06')\nAND e.MHD_EventDate BETWEEN @Start_RP AND @End_RP\nAND (IC_Rec_InScope_EndRP = 'y' OR IC_Rec_InScope_Start_Month = 'y'). \nLinked to open care cluster(s) at the time of the event (see CP039)","See CP007 for data quality considerations"]
["CP056",null,"Proportion of contacts and day care attendances in RP not attended","% contacts DNA",null,"Divide CP055 by CP054 and show as a percentage"]
["Service user outcomes - by cluster"]
["CP057",null,"People on CPA  at the end of the RP period","People on CPA","RC04, RC57","People with an open Care Programme Approach Episode at the end of the RP ","see MM02 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R1\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP058",null,"The proportion of users in each cluster who are on CPA ","% on CPA",null,"Divide CP057 by CP006 and show as a percentage",null,"MH currencies and payment recommended quality indicator R1"]
["CP059",null,"People on CPA for 12 months at the end of the RP","People on CPA for 12 months","RC46, RC57","People with an open Care Programme Approach Episode at the end of the RP that started at least 12 months earlier.","see MM05 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Denominator for MH currencies and payment recommended quality indicator R2\nSee CP007 for data quality considerations"]
["CP060",null,"People on CPA for 12 months with review at the end of the RP","People on CPA for 12 months with CPA review","RC05, RC46, RC57","People with an open Care Programme Approach Episode at the end of the RP that started at least 12 months earlier,  who have had a Care Programme Approach Review within the previous 12 months.","see MM06 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R2\nSee CP007 for data quality considerations"]
["CP061",null,"The proportion of users on CPA who have had a review within the last 12 months ","% with CPA review",null,"Divide CP060 by CP059 and show as a percentage",null,"MH currencies and payment recommended quality indicator R2"]
["CP062",null,"People with ethnicity recorded at the end of the RP","People with ethnicity recorded","RC57","The number of care clusters assigned to people in scope for MH currencies at the end of the RP with Ethnic Category Code\n recorded","Count of MHD_MHMDS_Spell_ID\nWHERE left (r.MHD_Ethnicity,1) in ('A','B','C','D','E','F','G','H','J','K','L','M','N','P','R','S')\nAND IC_Rec_InScope_EndRP = 'y'\nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R3\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP063",null,"The completeness of ethnicity recording ","% with ethnicity recorded",null,"Divide CP062 by CP006 and show as a percentage",null,"MH currencies and payment recommended quality indicator R3"]
["CP064",null,"People in contact with NHS funded adults secondary mental health services at the end of the RP with accommodation status recorded. ","People with accommodation status recorded","EV03, RC57","People with an open Adult Mental Health Care Spell at the end of the RP who had Accommodation Status recorded in the previous 12 months.","see MM13 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Additional context for MH currencies and payment recommended quality indicator R4\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP065",null,"Proportion of people with accommodation status recorded in the last 12 months at the end of the RP","% with accommodation status recorded",null,"Divide CP064 by CP006 and show as a percentage"]
["CP066",null,"People at the end of the RP in settled accommodation","People in settled accommodation","RC12, RC57","People with an open Adult Mental Health Care Spell at the end of the RP whose most recent record of Accommodation Status in the previous  12 months showed they were in settled accommodation. ","Count of Count of MHD_MHMDS_Spell_ID\nWHERE IC_Rec_InScope_EndRP = 'y' \nAND IC_Rec_endRP_Settled_Accommodation_Indicator IN ('1','01')\nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R4\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP067",null,"The accommodation status of all users (as measured by an indicator of settled status) ","% in settled accommodation",null,"Divide CP066 by CP006 and show as a percentage",null,"MH currencies and payment recommended quality indicator R4"]
["CP068",null,"People with no serious accommodation problems at the end of the RP","People with no serious accommodation problems","RC57","People with an open Adult Mental Health Care Spell at the end of the RP whose most recent Mental Health Clustering Tool showed they had no serious problems with living conditions (scored 0 or 1 in item 11)","Count of Count of MHD_MHMDS_Spell_ID\nWHERE IC_Rec_InScope_EndRP = 'y' \nAND MHD_EventType = 'MHCT'\nAND MHD_MHCT_HONOSRating11_Score  IN ('0','1')\nLinked to open care cluster(s) at the time of the event as per CP039","Additional context for MH currencies and payment recommended quality indicator R4\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP069",null,"Proportion with no serious accommodation problems at the end of the RP","% with no serious accommodation problems",null,"Divide CP068 by CP006 and show as a percentage"]
["CP070",null,"People with a crisis plan in place at the end of the RP","People with a crisis plan in place","RC55, RC57","People with an open Adult Mental Health Care Spell at the end of the RP for whom a record of an open Mental Health Crisis Plan was submitted in the last 12 months.","Count of Count of MHD_MHMDS_Spell_ID\nWHERE IC_Rec_InScope_EndRP = 'y' \nAND IC_Rec_EndRP_Crisis_Plan = 'Y'\nLinked to open care cluster(s) at the time of the event as per CP039","Additional context for MH currencies and payment recommended quality indicator R6\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP071",null,"Proportion of people with a crisis plan in place at the end of the RP","% with crisis plan",null,"Divide CP070 by CP006 and show as a percentage"]
["CP072",null,"People with on CPA at the end of the RP with a crisis plan in place","People on CPA with crisis plan in place","RC04, RC55, RC57","People with an open Care Programme Approach Episode at the end of the RP  for whom a record of an open Mental Health Crisis Plan was submitted in the last 12 months.","see MM19 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R6\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP073",null,"The proportion of users with a crisis plan in place, limited to those on Care Programme Approach (CPA). ","% on CPA with crisis plan",null,"Divide CP072 by CP057 and show as a percentage",null,"MH currencies and payment recommended quality indicator R6"]
["CP074",null,"People in contact with services at the end of the RP  with a diagnosis recorded","People with a diagnosis recorded","RC09","People with an open Adult Mental Health Care Spell at the end of the RP who had Primary Diagnosis recorded in the previous 12 months.","see MM20 in monthly data file and replace record number for spell ID.  Scope limited to people assigned to a cluster as per CP003. \nLinked to open care cluster(s) at the time of the event as per CP039","Numerator for MH currencies and payment recommended quality indicator R7\nDenominator is CP006\nSee CP007 for data quality considerations"]
["CP075",null,"The proportion of users who have a valid ICD10 diagnosis recorded ","% with diagnosis recorded",null,"Divide CP074 by CP006 and show as a percentage",null,"MH currencies and payment recommended quality indicator R7"]
[]
["Data source: Mental Health Minimum Dataset (MHMDS) year to date (YTD) and annual data"]
["Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]

{"sheet":"MHMDS v4.1 derivations","index":4,"n_rows":49,"n_cols":11,"rows_kept":49,"cut":false,"hidden":false,"merged":[]}
["Table","V4 data item name","Proposed Deviation Number",null,"Data type","Description","Rule","Derived/transformed","Based on data item","Publications ","Known uses/ potential uses"]
["Header","IC_Use_Submission_Flag","HE01",null,"varchar(1)","Prioritises the type of submission per provider and reporting period.  Where a refresh submission exists for the same provider and same reporting period, the refresh header record will be flagged.  Where there is only a primary record present that will be flagged.  Each provider has only one submission flagged per reporting period.","For each Provider_Org_Code and TIME_ID where file type of 'Refresh' and 'Primary' exists then SET IC_Use_Submission_Flag = 'Y' Where File_Type = 'Refresh'.  If only File_Type of 'Refresh' or 'Primary' exists then SET IC_Use_Submission_Flag = 'Y' to whichever of these records is present.  Flag is applied when each submission is passed into live.","Derived","Provider_Org_Code, File_Type, TIME_ID",null,"Compiling a 'final' set of data per reporting period"]
["Record","IC_Rec_CCG","RC01",23,"varchar(5)","This field is derived during processing.  It shows the CCG of GP practice, for the patient, or if that was not provided or was invalid, the CCG of residence.","IC_Rec_CCG = MHD_CCG_of_GP_Practice where MHD_CCG_of_GP_Practice is not null and a valid code, otherwise MHD_CCG_of_Residence.","Transformed","Record.MHD_PCT_of_GP_Practice, Record.MHD_PCT_of_Residence","Bulletin Commissioner analysis","Bulletin commissioner analysis"]
["Record","IC_Rec_endRP_Cluster_Flag","RC03",36,"varchar(1)","Indicates whether the record has an open Cluster episode at the end of the Reporting Period.","Set to 'Y' where MHD_EpiType = ('CLUST') and MHD_EpiEndDate is null and MHD_PbR_Cluster in ('00','01','02','03','04','05','06','07','08','10','11','12','13','14','15','16','17','18','19','20','21')","Derived","Episode.MHD_EpiType"]
["Record","IC_Rec_endRP_CPA_Flag","RC04",24,"varchar(1)","Indicates whether the record has an open CPA  episode at the end of the Reporting Period.","Set to 'Y' where MHD_EpiType = ('CPA') and MHD_EpiEndDate is null ","Derived","Episode.MHD_EpiType",null,"Service Performance Indicators"]
["Record","IC_Rec_endRP_CPA_Review_within_12mnths","RC05",33,"varchar(1)","Indicates whether the record has an open spell at the end of the Reporting Period and a CPA review within the last 12 months","Set to 'Y' where MHD_EventType = ('REV') and IC_Eve_Most_Recent_Flag = 'Y'  and MHD_End_Date_MHCS is null","Derived","IC_Eve_Prov_Person_CPA_Review_Most_Recent_Flag",null,"Service Performance Indicators"]
["Record","IC_Rec_endRP_Employment_Status","RC06",30,"varchar(2)","Shows the employment status for the most recent 'EMP' event within the last 12 months for each record with an open spell at the end of the reporting period","Return MHD_Employment_Status where MHD_EventType = ('EMP') and IC_Eve_Most_Recent_Flag = 'Y'  and MHD_End_Date_MHCS is null","Derived","IC_Eve_Prov_Person_Employment_Most_Recent_Flag",null,"Service Performance Indicators"]
["Record","IC_Rec_endRP_HONOS_Assessment_within_12mnths","RC07",32,"varchar(1)","Indicates whether the record has an open spell at the end of the Reporting Period and a HoNOS assessment within the last 12 months","Set to 'Y' where MHD_EventType in ('HNS','HNS65','HNSCA','HNSSC','MHCT') and IC_Eve_Most_Recent_Flag = 'Y'  and MHD_End_Date_MHCS is null","Derived","IC_Eve_Prov_Person_HONOS_Most_Recent_Flag",null,"Service Performance Indicators"]
["Record","IC_Rec_endRP_MHA_Flag","RC08",25,"varchar(1)","Indicates whether the record has an open MHA episode at the end of the Reporting Period, where it has a valid legal status and has not expired.","Set to 'Y' where MHD_LegStat_Code=IC_Rec_endRP_LegalStat_Cleansed\n  and MHD_EpiType = 'MHA' and MHD_EpiEnd_Date is null and\n  ( MHD_ExpiryDate  IS null or MHD_ExpiryDate>Reporting End_Date)","Derived","Episode.MHD_EpiType"]
["Record","IC_Rec_endRP_Pdiag_Flag","RC09",29,"varchar(6)","Indicates whether the record has an open spell at the end of the Reporting Period and a valid recorded primary diagnosis within the last 12 months","Return IC_Eve_PrimaryDiagnosis where MHD_EventType = ('PDIAG') and IC_Eve_Most_Recent_Flag = 'Y'  and MHD_End_Date_MHCS is null and IC_Eve_PrimaryDiagnosis is not null","Derived","IC_Eve_Prov_Person_PDIAG_Most_Recent_Flag"]
["Record","IC_Rec_endRP_Recall_Flag","RC10",27,"varchar(1)","Indicates whether the record has an open recall episode at the end of the Reporting Period and where the RECALL has not expired.","Set to 'Y' where MHD_EpiType = ('RCALL') and MHD_EpiEndDate is null","Derived","Record.MHD_MHMDS_Person_ID,Record.MHD_MHMDS_Record_Number,Record.IC_Provider_Org_Code,Episode.MHD_EpiType,Episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date"]
["Record","IC_Rec_endRP_SCT_Flag","RC11",26,"varchar(1)","Indicates whether the record has an open SCT  episode at the end of the Reporting Period.","Set to 'Y' where MHD_EpiType = ('SCT') and MHD_EpiEndDate is null   and MHD_EpiEnd_Date is null and\n  ( MHD_ExpiryDate  IS null or MHD_ExpiryDate>Reporting End_Date)","Derived","Episode.MHD_EpiType"]
["Record","IC_Rec_endRP_Settled_Accommodation_Indicator","RC12",31,"varchar(2)","Shows the settled accommodation Indicator for the most recent 'ACCOM' event within the last 12 months for each record with an open spell at the end of the reporting period","Return MHD_Settled_Accommodation_Indicator where MHD_EventType = ('ACCOM') and IC_Eve_Most_Recent_Flag = 'Y' and MHD_End_Date_MHCS is null","Derived","IC_Eve_Prov_Person_Accommodation_Most_Recent_Flag",null,"Service Performance Indicators"]
["Record","IC_Rec_Ethnicity","RC13",4,"varchar(2)","The cleansed ethnicity of a PERSON. Removes the second character (where value is not equal 9 or 99) which is optional for use locally leaving the national code. Otherwise 99.","IC_Rec_Ethnicity = FIRST CHARACTER OF MHD_Ethnicity where MHD_Ethnicity is not equal to 9 or 99, otherwise 99.","Transformed","Record.MHD_Ethnicity","Bulletin","Demographics analysis"]
["Record","IC_Rec_RP_Admission","RC19",41,"smallint","Calculates the total number of admissions for the record in the reporting period. ","Count of distinct MHD_Episode_ID where  mhd_epistart_date>=Reporting Period Start Date and mhd_epistart_date<=Reporting period End Date and  MHD_EpiType ='PROSP''\n","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Header.Start_Date, Header.End_Date"]
["Record","IC_Rec_RP_Admission_Formal","RC20",42,"smallint","Counts the number of admissions to hospital (MHD_EpiType = 'PROSP') where the patient was detained under the Mental Health Act (1983) on admission (MHD_EpiType = 'MHA').  Uses of short term sections and holding powers and Place of Safety Orders that coincided with the day of admission are excluded.  Detentions on day of admission includes uses of sections 2, 3, 35, 36, 37 (with or without s41 restrictions) 38,44, 46, 45A and 47 and 48 \n(with or without s49 restrictions), and detentions under previous legislation (Fifth Schedule) and other Acts"," Count of distinct MHD_Episode_ID where  mhd_epistart_date>=Reporting Period Start Date and mhd_epistart_date<=Reporting period End Date and  MHD_EpiType ='PROSP' where there is, for the same MHD_MHMDS_Spell_ID, an MHA episode  (MHD_EpiType = 'MHA') with the same mhd_epistart_date and MHD_LegStat_Code IN ('2', '02', ' 2', '3', '03', ' 3', '7', '07', ' 7', '8', '08', ' 8', '9', '09', ' 9', '10', '12', '13', '14', '15', '16', '17', '18', '31', '32', '34') ","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Header.Start_Date, Header.End_Date,MHD_LegStat_Code"]
["Record","IC_Rec_RP_Cluster_End","RC23",58,"smallint","Calculates the total number of Clusters that end in the reporting period for the record.","Count of distinct MHD_Episode_ID where   mhd_epiend_date>=Reporting Period Start Date and mhd_epiend_date<=Reporting period End Date  and MHD_EpiType ='CLUST'  and MHD_PbR_Cluster in ('00','01','02','03','04','05','06','07','08','10','11','12','13','14','15','16','17','18','19','20','21')\n\n ","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, Episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Episode.MHD_PbR_Cluster"]
["Record","IC_Rec_RP_Cluster_Start","RC25",57,"smallint","Calculates the total number of Clusters that start in the reporting period  for the record.","Count of distinct MHD_Episode_ID where  mhd_epistart_date>=Reporting Period Start Date and mhd_epistart_date<=Reporting period End Date  and  MHD_EpiType ='CLUST' and MHD_PbR_Cluster in ('00','01','02','03','04','05','06','07','08','10','11','12','13','14','15','16','17','18','19','20','21')\n","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, Episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Episode.MHD_PbR_Cluster"]
["Record","IC_Rec_RP_Contacts","RC26",53,"smallint","Calculates the total number of health care professional contacts in the reporting period for the record.","Count of distinct MHD_event_ID  WHERE MHD_Eventtype ='HPCON'\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype"]
["Record","IC_Rec_RP_Contacts_Att","RC27",54,"smallint","Calculates the number of attended  health care professional contacts in the reporting period for the record.","Count of distinct MHD_event_ID  WHERE MHD_Eventtype='HPCON' and MHD_Attended_Indicator in (5,6)\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype, MHD_Attended_Indicator"]
["Record","IC_Rec_RP_DDisc_Days","RC29",49,"smallint","Calculates the total numbers of days between the start and end date of a Delayed Discharge (DDISC) episode within the reporting period for the record regardless of overlapping episodes.","Sum of  Days Difference  (Episode.MHD_EpiEnd_Date - episode.MHD_EpiStart_Date) +1  where MHD_EpiType ='DDISC'","Derived","Episode.MHD_EpiType, Episode.IC_IC_Epi_Days"]
["Record","IC_Rec_RP_Disch_Net_Followup","RC30",46,"smallint","Calculates the number of IC_Rec_RP_Discharges_Net  for the record where there is an event of type HPCON with a MHD_ConsultMedium not in ('05','06')\nand the MHD_EventDate is between the discharge date+1 and discharge date+7","Count of distinct MHD_Episode_ID for records where IC_Rec_RP_Discharges_Net>0 and  MHD_EventType = 'HPCON' and (MHD_ConsultMedium not in ('05', '06','5','6',' 5',' 6' ) or MHD_ConsultMedium is null) ","Derived","Episode.MHD_Episode_ID, Event.MHD_EventType, Event.MHD_ConsultMedium"]
["Record","IC_Rec_RP_Discharges_Gross","RC31",44,"smallint","Calculates the total number of hospital discharges in the reporting period for the record.","Count of distinct MHD_Episode_ID where  MHD_EpiEnd_Date is not null and MHD_EpiEnd_Date>=h.start_date and MHD_EpiEnd_Date<=h.end_date and  MHD_EpiType ='PROSP''\n","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Header.Start_Date, Header.End_Date"]
["Record","IC_Rec_RP_Discharges_Net","RC32",45,"smallint","Calculates the number of inpatient discharges from hospital in the reporting period, plus the last seven days of the previous reporting period and excluding:\nThe last 7 days or\nWhere the method of discharge is null or is not 'client died'. \nWhere the admission method was elective.\nWhere the person was under the age of 17 at the end of the RP\nPeople without a record in the current reporting period\nThere must also be a episode of type REF that is open in the reporting period or is discharged in the  reporting period, excluding the last 7 days,  and not discharged due to transfer to another provider.\nThe date of hospital discharge must not be the same as the date of referral discharge.","Count of MHD_Episode_ID WHERE MHD_EpiType='prosp'  \nAND MHD_Epiend_Date >= dateadd(d,-7,@RPstart) AND MHD_Epiend_Date <=dateadd(d,-7,@RPend)  \nAND (MHD_DischMet <> '4' or MHD_DischMet is null) \nAND (MHD_AdmiMet not in ('11','12','13') OR MHD_AdmiMet is null)  \nAND (MHD_Epiend_Date<>ref.MHD_DischDate OR ref.MHD_DischDate is null) \nAND ((ref.MHD_DischDate >=@RPstart AND ref.MHD_DischDate <=dateadd(d,-7,@RPend)) OR ref.MHD_DischDate is null)  \nAND (ref.MHD_DischReason NOT IN ('4', '04', '5', '05', '6', '06', ' 4', ' 5', ' 6')  OR ref.MHD_DischReason is NULL)  \nAND MHD_Age_End_Reporting_Period > 16                            ","Derived","Episode.MHD_Episode_ID, Episode.MHD_EpiType, episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Header.Start_Date, Header.End_Date,Episode.MHD_DischMet, Episode.MHD_DischReason"]
["Record","IC_Rec_RP_MHCT_Gross","RC34",50,"smallint","Calculates the total number of MHCT assessments in the reporting period for the record.","Count of distinct MHD_event_ID where WHERE MHD_Eventtype in ('MHCT')\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype"]
["Record","IC_Rec_RP_MHCT_NewRef","RC35",51,"smallint","Calculates the total number of MHCT assessments for the reason of New Referral in the reporting period for the record.","Count of distinct MHD_event_ID where WHERE MHD_Eventtype in ('MHCT') and  MHD_ClusteringTool_Assessment_Reason='01'\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype, Eventtype.MHD_ClusteringTool_Assessment_Reason"]
["Record","IC_Rec_RP_Wrdst_Days_Gross","RC41",13,"smallint","Calculates the total numbers of days between the start and end date of a Wardstay episode within the reporting period regardless of overlapping episodes and Homeleave.","Sum of IC_RP_Epi_Days where MHD_EpiType = WRDST","Derived","Episode.MHD_EpiType, episode.IC_IC_Epi_Days",null,"data.gov (activity)"]
["Record","IC_Rec_RP_Wrdst_Days_Net","RC42",15,"smallint","Calculates the total number of days between the start and end date of a Wardstay episode within the reporting period and subtracts Homeleave using the number generated in the Cleansed Wardstays field.","Sum of (episode.MHD_EpiEnd_Date - episode.MHD_EpiStart_Date) +1) where MHD_EpiType = WRDST. For any overlapping episodes MHD_EpiEnd_Date is the latest MHD_EpiEnd_Date and MHD_EpiStart_Date is the earliest  MHD_EpiStart_Date - Sum of (episode.MHD_EpiEnd_Date - episode.MHD_EpiStart_Date) +1) where MHD_EpiType = HOMEL. For any overlapping episodes MHD_EpiEnd_Date is the latest MHD_EpiEnd_Date and MHD_EpiStart_Date is the earliest  MHD_EpiStart_Date.","Derived","Episode.MHD_EpiType, episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date",null,"final quarterly data extract"]
["Record","IC_Rec_endRP_AOT_Flag","RC44",35,"varchar(1)","Indicates whether the record has an open Team episode with an AOT team at the end of the Reporting Period.","Set to 'Y' MHD_EpiType = 'TMEP' and MHD_TeamType = 'A05' and MHD_EpiEnd_Date is null","Derived","Episode.MHD_EpiType, Episode.MHD_TeamType"]
["Record","IC_Rec_EndRP_CPA_Epi_12_Months","RC46",40,"varchar(1)","Indicates where the record has an open CPA episode that has been open for 365 days or more","Set to 'Y' where MHD_EpiType='CPA' and MHD_EpiEnd_Date is null and IC_Episode_epi_Days>=365","Derived","Episode.MHD_EpiType,Episode.MHD_EpiEnd_Date,"]
["Record","IC_Rec_endRP_EIT_Flag","RC47",34,"varchar(1)","Indicates whether the record has an open Team episode with an EIT team at the end of the Reporting Period.","Set to 'Y' MHD_EpiType = 'TMEP' and MHD_TeamType = 'A14' and MHD_EpiEnd_Date is null","Derived","Episode.MHD_EpiType, Episode.MHD_TeamType,Episode.MHD_EpiEnd_Date"]
["Record","IC_Rec_endRP_Hospital_Spell_Flag","RC48",37,"varchar(1)","Indicates where the record has an open WRDST or PROSP episode at the end of the reporting period","Set to 'Y' where MHD_EpiType in ('WRDST','PROSP') and MHD_EpiEndDate is null ","Derived","Episode.MHD_Episode_ID,Episode.MHD_EpiType, Episode.MHD_EpiEnd_Date"]
["Record","IC_Rec_endRP_LegalStat_Cleansed","RC49",59,"varchar(2)","For all MHA episodes that are open at the end of the reporting period,  for the record, it cleans the legal status code by adding 0 to any code that has a missing leading 0 and excluding any 'invalid' codes. \nWhere there are more than 1 open episode they are ranked by .MHD_Epistart_Date desc, MHD_Episode_ID  desc","Return MHD_LegStat_Code\n  where MHD_LegStat_Code IN \n  ('01','02','03','04','05','06','07','08','09','10','12','13','14','15','16','17','18','19',\n  '20','31','32','34','35','36').\nReturn  '0'+ MHD_LegStat_Code  where MHD_LegStat_Code IN \n  ('1','2','3','4','5','6','7','8','9') \n  WHERE MHD_EpiType IN ('MHA')   and MHD_EpiEnd_Date is null ","Derived","Episode.MHD_EpiType, Episode.MHD_Legal_Stat_Code, Episode.MHD_EpiEnd_Date"]
["Record","IC_Rec_RP_AWOL","RC50",55,"smallint","Indicates where the record has an AWOL episode that starts in the reporting period and that lasts for more than 1 day","Count of distinct MHD_Episode_ID where (mhd_epistart_date>=h.start_date and mhd_epistart_date<=h.end_date  and mhd_epiend_date is null )\nor  mhd_epistart_date>=h.start_date and mhd_epistart_date<=h.end_date and\n  datediff(d,mhd_epistart_date,mhd_epiend_date)>0","Derived","Episode.MHD_Episode_ID,Episode.MHD_EpiType, Episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date, Header.Start_Date, Header.End_Date,"]
["Record","IC_Rec_RP_DAYATT_Contacts","RC52",53,"smallint","Calculates the total number of day attendance contacts in the reporting period for the record.","Count of distinct MHD_event_ID WHERE MHD_Eventtype ='DAYATT'\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype"]
["Record","IC_Rec_RP_DAYATT_Contacts_Att","RC53",54,"smallint","Calculates the number of attended day attendance contacts in the reporting period for the record.","Count of distinct MHD_event_ID WHERE MHD_Eventtype='DAYATT' and MHD_Attended_Indicator in (5,6)\n","Derived","Event.MHD_Event_ID,Event.MHD_EpiType, MHD_Eventtype, MHD_Attended_Indicator"]
["Record","IC_Spell_RP_Days","RC54",38,"smallint","Indicates the length of an spell in days based on the start and end dates of the spell.  Where the spell start date is before the start or the reporting period, the start of the reporting period is used.  Where end date is not present, the end of the reporting period is used.","(MHD_End_Date_MHCS -MHD_Start_Date_MHCS) +1","Derived","Record.MHD_Start_Date_MHCS, Record.MHD_End_Date_MHCS"]
["Record","IC_Rec_EndRP_Crisis_Plan","RC55",null,"smallint","Indicates for a spell open in the reporting period where there is a recorded MHD_CrisisPlanCreat_Date  or MHD_CrisisPlanUpdate_Date in the previous 12 months","SET IC_Rec_End_RP_Crisis_Plan  = Y  Where exists  MHD_CrisisPlanCreat_Date  or MHD_CrisisPlanUpdate_Date in records submitted in  the previous 12 months","Derived","Record.MHD_CrisisPlanCreat_Date\nRecord.MHD_CrisisPlanUpdate_Date"]
["Record","IC_Rec_InScope_Start_Month","RC56",null,"varchar(1)","Indicates whether the record is in scope for MH currencies at the start of the last month of the Reporting Period.","SET IC_Rec_InScope_Start_Month = 'Y' WHERE the person has at the start of the RP:\n o  spent more than one day as an inpatient in an 'in scope' mental health ward since their spell started, or since April 2011, whichever is later\no  had two or more contacts with a healthcare professional from an ‘in scope’  team or day attendances that were recorded as being ‘attended’ (or is NULL), ‘face to face’ (or is NULL) and where the care contact subject is the patient (or is NULL) since the start of their mental health care spell, or since April 2011, whichever is later\no had one contact with a healthcare professional from an  ‘in scope’ team or day attendance that was recorded as being ‘attended’ (or is NULL), ‘face to face’ (or is NULL) and the care contact subject is the patient (or is NULL) since the start of their mental health care spell, or since April 2011, whichever is later and have an open cluster episode.\nA patient is not in scope if they:\no are, at the start of the month, an inpatient in a secure ward (security level 1,2 or 3)\no have an open team episode with a ‘not in scope team type’ at the start of the month, unless there is also an open team episode at the start of the month with an ‘in scope’ team.\n","Derived","Episode.MHD_EpiStart_Date, \nEpisode.MHD_EpiType, \nEpisode.MHD_WardSec_Level, Episode.MHD_Int_ClinCare_Intensity_Code, \nEpisode.MHD_TeamType,\nEpsiode.MHD_PbR_Cluster,\nEvent.MHD_EventDate, \nEvent.MHD_EventType, \nEvent.MHD_MHC_Team_Type, Event.MHD_Contact_Subject, Event.MHD_Attended_Indicator, Event.MHD_ConsultMedium, Record.MHD_Start_Date_MHCS\n\nIn scope team types are: A01 - Day Care Service\nA02 - Crisis Resolution Team/Home Treatment\nA03 - Adult Community Mental Health Team\nA04 - Older People Community Mental Health Team\nA05 - Assertive Outreach Team\nA06 - Rehabilitation & Recovery Service\nA07 - General Psychiatry\nA09 - Psychotherapy Service\nA11 - Psychological Therapy Service (non IAPT)\nA12 - Young Onset Dementia\nA13 - Personality Disorder Service\nA14 - Early Intervention in Psychosis Team\nA15 - Primary Care Mental Health Service\nA16 - Memory Services/Clinic\nZZZ - Other Mental Health Service\nOR NULL team type",null,"Experimental"]
["Record","IC_Rec_InScope_EndRP","RC57",null,"varchar(1)","Indicates whether the record is in scope for  MH currencies at the end of the Reporting Period.","SET IC_Rec_InScope_EndRP = 'Y' WHERE the person has at the end of the RP:\n o  spent more than one day as an inpatient in an 'in scope' mental health ward since their spell started, or since April 2011, whichever is later\no  had two or more contacts with a healthcare professional from an ‘in scope’  team or day attendances that were recorded as being ‘attended’ (or is NULL), ‘face to face’ (or is NULL) and where the care contact subject is the patient (or is NULL) since the start of their mental health care spell, or since April 2011, whichever is later\no had one contact with a healthcare professional from an  ‘in scope’ team or day attendance that was recorded as being ‘attended’ (or is NULL), ‘face to face’ (or is NULL) and the care contact subject is the patient (or is NULL) since the start of their mental health care spell, or since April 2011, whichever is later and have an open cluster episode.\nA patient is not in scope if they:\no are, at the end of the RP, an inpatient in a secure ward (security level 1,2 or 3)\no have an open team episode with a ‘not in scope team type’ at the end of the RP, unless there is also an open team episode at the end of the reporting period with an ‘in scope’ team.\n","Derived","Episode.MHD_EpiStart_Date, \nEpisode.MHD_EpiType, \nEpisode.MHD_WardSec_Level, Episode.MHD_Int_ClinCare_Intensity_Code, \nEpisode.MHD_TeamType,\nEpsiode.MHD_PbR_Cluster,\nEvent.MHD_EventDate, \nEvent.MHD_EventType, \nEvent.MHD_MHC_Team_Type, Event.MHD_Contact_Subject, Event.MHD_Attended_Indicator, Event.MHD_ConsultMedium, Record.MHD_Start_Date_MHCS\n\nIn scope team types are: A01 - Day Care Service\nA02 - Crisis Resolution Team/Home Treatment\nA03 - Adult Community Mental Health Team\nA04 - Older People Community Mental Health Team\nA05 - Assertive Outreach Team\nA06 - Rehabilitation & Recovery Service\nA07 - General Psychiatry\nA09 - Psychotherapy Service\nA11 - Psychological Therapy Service (non IAPT)\nA12 - Young Onset Dementia\nA13 - Personality Disorder Service\nA14 - Early Intervention in Psychosis Team\nA15 - Primary Care Mental Health Service\nA16 - Memory Services/Clinic\nZZZ - Other Mental Health Service\nOR NULL team type",null,"Experimental"]
["Record","IC_Rec_RP_Em_Admissions","RC58",null,"smallint","The number of admissions in the current reporting period, excluding:\nWhere the admission method was elective or transfer\nWhere the patient was under the age of 17 at the end of the RP","COUNT(distinct MHD_Episode_ID ) of type PROSP  where  (MHD_AdmiMet not in ('11','12','13','81') OR MHD_AdmiMet is null) \nAND MHD_EpiStart_Date >= Reporting Period Start_Date \nAND MHD_Age_End_Reporting_Period > 16  ","Derived","Episode.MHD_EpiType, \nEpisode.MHD_AdmiMet,\nEpisode.MHD_EpiStart_Date,\nRecord.MHD_Age_End_Reporting_Period\n"]
["Record","IC_Rec_RP_ReAdmissions","RC59",null,"smallint","The number of emergency admissions that were preceded by an inpatient discharge, excluding:\nWhere the inpatient discharge occurred more than 30 days before the emergency admission\nWhere the inpatient discharge was from another provider\nWhere the method of discharge 'patient died'. \nThere must also be an episode of type REF that is open or ends in the reporting period or the previous reporting period and not discharged due to transfer to another provider.\nThe date of hospital discharge must not be the same as the date of referral discharge.","Count of distinct MHD_Episode_ID for records where IC_Rec_RP_Em_Admissions>0 AND \nMHD_MHMDS_Person_ID = MHD_MHMDS_Person_ID \nAND MHD_Provider_Org_Code = MHD_Provider_Org_Code \nAND MHD_EpiType = 'PROSP'\nAND (MHD_DischMet <> '4' or MHD_DischMet is null)\nAND (MHD_Epiend_Date<>MHD_DischDate or MHD_DischDate is null)\nAND (MHD_DischDate >= @StartRP or MHD_DischDate is null)\nAND (MHD_DischReason not in ('4', '04', '5', '05', '6', '06', ' 4', ' 5', ' 6')  or MHD_DischReason is NULL)\nAND r.MHD_Age_End_Reporting_Period > 16\nAND  MHD_EpiStart_Date between MHD_EpiEnd_Date and dateadd(dd,30,MHD_EpiEnd_Date)\nAND MHD_EpiStart_Date >= MHD_EpiEnd_Date\nAND MHD_Episode_ID <> MHD_Episode_ID\n","Derived","Episode.MHD_EpiType, \nEpisode.MHD_EpiEnd_Date,\nEpsiode.MHD_DischMet,\nEpisode.MHD_DischReason,\nRecord.MHD_Age_End_Reporting_Period,\nRecord.MHD_MHMDS_Person_ID,\nRecord.MHD_Provider_Org_Code,\n\n"]
[" Episode","IC_Episode_Epi_Days","EP01",null,"smallint","Indicates the length of an episode in days based on the start and end dates of the episode.  Where end date is not present, the end of the reporting period is used.","If Episode.MHD_EpiType = REF OR DDISC then NULL, Otherwise (Episode.MHD_EpiEnd_Date - episode.MHD_EpiStart_Date) +1","Derived","Episode.MHD_EpiType, Episode.MHD_EpiStart_Date, Episode.MHD_EpiEnd_Date,"]
[" Episode","IC_Inactive_timestamp","EP02",null,"datetime","Used on record and episode.  Not set for episodes and records where the IC_Source_Time_ID is the maximum held within the the YTD file.  For others if the record / episode is open but the episode cannot be found in a superceding reporting period, record is stamped inactive with the first day of the next reporting period we would have expected to received the record / episode.",null,"Derived"]
["Event","IC_Eve_PrimaryDiagnosis","EV01",null,"varchar(6)","Cleans primary diagnosis code using these steps; (a) clean code by removing full-stops (HES rule 460).  (b) truncates code, replaces Os with 0s and removes codes shorter than three characters in length. (c) adds X to the end of three character codes, cleans codes with an X in 3rd position and change codes without a match within ICD 10 reference data to end in X. (d) change codes ending in X to 9 if no matching description. (e) class unmatched records as Invalid.","(a) clean code, remove full-stops (rule 460).  (b) truncate code, replace Os with 0s and remove codes shorter than three in length. (c) add X to the end of three character codes, clean codes with an X in 3rd position and change codes without a match to end in X. (d) change codes ending in X to 9 if no matching description. (e) class unmatched records as Invalid.","Transformed","Event.MHD_PrimaryDiagnosis"]
["Event","IC_Eve_SecondaryDiagnosis","EV02",null,"varchar(6)","Cleans secondary diagnosis code using these steps; (a) clean code by removing full-stops (HES rule 460).  (b) truncates code, replaces Os with 0s and removes codes shorter than three characters in length. (c) adds X to the end of three character codes, cleans codes with an X in 3rd position and change codes without a match within ICD 10 reference data to end in X. (d) change codes ending in X to 9 if no matching description. (e) class unmatched records as Invalid.","(a) clean code, remove full-stops (rule 460).  (b) truncate code, replace Os with 0s and remove codes shorter than three in length. (c) add X to the end of three character codes, clean codes with an X in 3rd position and change codes without a match to end in X. (d) change codes ending in X to 9 if no matching description. (e) class unmatched records as Invalid.","Transformed","Event.MHD_SecondaryDiagnosis"]
["Event","IC_Eve_Most_Recent_Flag","EV03",null,"varchar(1)","Flags records with the most recent EMP/ACCOM/HNS/REV/PDIAG/MHCT events which are within the last 12 months for each person in each provider organisation.","Ranks events for each MHD_EventType of EMP/ACCOM/HNS/REV by MHD_EventDate desc>TIME_ID desc>File_Type desc>MHD_Event_ID desc where MHD_EventType in ('EMP','ACCOM','HNS','REV','PDIAG','MHCT') and IC_Submission_Flag is 'Y' and MHD_MHMDS_Record_Number != 99999999 and MHD_Employment_Status/MHD_Settled_Accommodation_Indicator is not null and MHD_EventDate >= Dateadd(yy,-1,@Reporting Period_ENDDATE) with @Reporting Period_ENDDATE being the latest submission's reporting period end date. The top ranked event is assigned a 'Y', everything else NULL.","Derived","Record.MHD_MHMDS_Person_ID,Record.MHD_MHMDS_Record_Number,Record.IC_Provider_Org_Code,Event.MHD_EventType,Event.MHD_EventDate"]
[]
["Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]

{"sheet":"Glossary","index":5,"n_rows":13,"n_cols":2,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
[]
["Below is a list of all acronyms detailed in the metadata file"]
[]
["Acronym","Long Description"]
["CCG","Clinical Commissioning Group"]
["RP","Reporting Period"]
["CPA","Care Programme Approach"]
["HoNOS","Health of the Nation Score"]
["MHA","Mental Health Act"]
["MHCT","Mental Health Clustering Tool"]
["AWOL","Absent Without Leave"]
[]
["Copyright © 2014, The Health and Social Care Information Centre. All rights reserved."]