DHBNZ - NZHIS



DHBNZ - NZHIS

WIES8CB Methodology

and

Casemix Purchase Unit Allocation

Recommended for the

2002/2003 2003/2004 Financial Year

Frozen Specification for implementation on NMDS

This version: 13 12 March 20032, based on the 20012002/2002 2003 document

Authors: The DHBNZ SFG Cost Weights Project Group

Table of Contents

1 Preamble 4

2 Changes effected in this version 4

3 Introduction 5

3.1 Background 5

3.2 Changes from the WIES8B version for the 2002/2003 FY 6

3.2.1 Propagation of the current exclusion framework 6

3.3 Areas for change in the future 6

3.3.1 Exclusion rule Post Natal Early Intervention 6

3.3.2 Neonatal CPAP 6

3.3.3 Other possible exclusions 6

3.3.4 Maternity/Obstetrics Purchasing 6

4 WIES8C calculation 8

4.1 Derived variables required in calculation 8

4.1.1 Length of Stay 8

4.1.2 Reallocated DRG 8

4.2 DRG Reallocations 8

4.2.1 AR-DRG A04, Bone Marrow Transplants 9

4.2.2 Adjustment for Peritoneal Dialysis 9

4.2.3 Adjustment of medical AR-DRGs with radiotherapy 9

4.2.4 All other AR-DRGs 9

4.3 Adjusted Mechanical Days 9

4.3.1 DRGs excluded from mechanical ventilation days 10

4.3.2 Calculation of mechanical ventilation days from hours 10

4.4 General Calculation 10

4.4.1 Calculating WIES8C 12

4.4.2 Copayment for Mechanical Ventilation 12

4.4.3 Base WIES 13

4.4.4 Final WIES weight 16

5 Purchase Unit allocation 17

5.1 Derived variables required in allocation 17

5.1.1 Patient’s Age 17

5.1.2 Length of Stay 17

5.2 Exclusions from casemix purchasing 17

5.2.1 Neonatal Inpatient Casemix 17

5.2.2 Non - Medical/Surgical Events 18

5.2.3 Maternity Inpatient Casemix 18

5.2.4 Amniocentesis 19

5.2.5 Chorion Villis Sampling 19

5.2.6 Rhesus Isoimmunisation 19

5.2.7 Breast feeding / Lactation 19

5.2.8 Birth weight 20

5.2.9 Non Base Funding Purchases 20

5.2.10 Designated Hospital Casemix Revenue 20

5.2.11 Non-Treated Patients 22

5.2.12 Error DRGs 23

5.2.13 Some Transplants 23

5.2.14 Some Spinal Injuries 23

5.2.15 Surgical Termination of Pregnancy 23

5.2.16 Renal and Peritoneal Dialysis 23

5.2.17 Sameday Chemotherapy & Radiotherapy 23

5.2.18 Sleep Apnoea 23

5.2.19 Lithotripsy 24

5.2.20 Colposcopies 24

5.2.21 Cystoscopies 24

5.2.22 ERCPs 25

5.2.23 Colonoscopies 25

5.2.24 Gastroscopies 26

5.2.25 Bronchoscopies 27

5.2.26 Day Case Blood Transfusions 27

5.3 Mapping of Health Service Speciality codes to casemix PUs 27

Appendices 30

5.4 Spreadsheet containing 03/04 FY DRG weights and associated variables for calculating WIES8C 30

5.5 SAS Code for Derivation of WIES8C 51

1 Preamble 4

2 Changes effected in this version 4

3 Introduction 5

3.1 Background 65

3.2 Changes from the WIES8A version for the 2001/2002 FY 6

3.2.1 Propagation of the current exclusion framework 76

3.3 Areas for change in the future 76

3.3.1 Exclusion rule Post Natal Early Intervention 76

3.3.2 Neonatal CPAP 76

3.3.3 Other possible exclusions 7

3.3.4 Maternity/Obstetrics Purchasing 7

3.3.5 Introduction of new event type or related coding 7

4 WIES8B calculation 8

4.1 Derived variables required in calculation 8

4.1.1 Length of Stay 8

4.1.2 Reallocated DRG 8

4.2 DRG Reallocations 8

4.2.1 AR-DRG A04, Bone Marrow Transplants 9

4.2.2 Adjustment for Peritoneal Dialysis 9

4.2.3 Adjustment of medical AR-DRGs with radiotherapy 9

4.2.4 All other AR-DRGs 9

4.3 Adjusted Mechanical Days 9

4.3.1 DRGs excluded from mechanical ventilation days 109

4.3.2 Calculation of mechanical ventilation days from hours 10

4.4 General Calculation 10

4.4.1 Calculating WIES8B 12

4.4.2 Copayment for Mechanical Ventilation 12

4.4.3 Base WIES 13

4.4.4 Final WIES weight 16

5 Purchase Unit allocation 17

5.1 Derived variables required in allocation 17

5.1.1 Patient’s Age 17

5.1.2 Length of Stay 17

5.2 Exclusions from casemix purchasing 17

5.2.1 Neonatal Inpatient Casemix 17

5.2.2 Non - Medical/Surgical Events 18

5.2.3 Non Base Funding Purchases 18

5.2.4 Designated Hospital Casemix Revenue 18

5.2.5 Non-Treated Patients 20

5.2.6 Error DRGs 21

5.2.7 Some Transplants 21

5.2.8 Some Spinal Injuries 21

5.2.9 Surgical Termination of Pregnancy 21

5.2.10 Renal and Peritoneal Dialysis 21

5.2.11 Sameday Chemotherapy & Radiotherapy 21

5.2.12 Sleep Apnoea 22

5.2.13 Lithotripsy 22

5.2.14 Colposcopies 22

5.2.15 Cystoscopies 23

5.2.16 ERCPs 23

5.2.17 Colonoscopies 24

5.2.18 Gastroscopies 24

5.2.19 Bronchoscopies 25

5.2.20 Day Case Blood Transfusions 25

5.3 Mapping of Health Service Speciality codes to casemix PUs 26

6 Appendices 2928

6.1 Spreadsheet containing 01/02 FY DRG weights and associated variables for calculating WIES8B 2928

6.2 SAS Code for Derivation of WIES8B 5049

Preamble

Since publication of the last version of this document, there has been a significant change in the organisation of the New Zealand public health sector.

In particular, DHBs as organisations have continued to made make developmental progress and the Ministry of Health (MoH) has pulled back from any formal involvement in pricing while maintaining an interest in benchmarks for prices and service provision. DHBs which coordinate activities of particular sector-wide interest through DHBNZ.

DHBNZ has formed the Service Framework Group (SFG) which is a successor to the previous HHS project management group, known as HTG, that coordinated joint sector projects with the Health Funding Authority (HFA). The SFG has developed a work program that recognises the NZ Health Strategy and the new funding environment. There is a Cost Weights project group operating as part of SFG, which will undertake work similar to that of its predecessor groups, namely pricing and cost weights for casemix purchasing, including the maintenance of this document jointly with the New Zealand Health Information Service (NZHIS).

Following that group’s work in the period to March 2002 it seems that the natural home for this document in the new environment is joint ownership by the SFG Cost Weights group and the NZ Health Information Service (NZHIS). In turn, NZHIS and DHBs maintains contact with the National Data Policy Group (NDPG) who may also provide commentary onhave input to the content of future versions of this document. It is proposed that this document be maintained jointly by the SFG Cost Weights group and NZHIS.

Changes effected in this version

This version includes the following changes:

o the aAddition of a new purchaser code (20) for overseas residents who meet the eligibility criteria for publicly funded health services (includes students from and country with a valid visa and patients from countries with reciprocal agreements). Events with these purchaser codes are included in casemix;

o A modification to the definition of discharge type DA to include

“discharges to an acute facility where the patient is being transferred within 5 days of admission and has a principal diagnosis of stroke or the discharge is directly due to the need for immediate treatment at a neonatal facility, or a specialist burns unit, or a multiple trauma unit”;

o Addition of the mobile surgical bus to the lists of agencies and of facilities which generate purchaser units. Hence these will not count as casemix purchases for any DHB;

o Modifications to allow casemix funding for maternity events, arising from the report of the SFG Maternity project group; and

o including the rReallocation of very low birthweights, ie under 400g, to 400g so that these events will then fall into a casemix funded DRG..

Some effort has been made to streamline the new version, in part by removing historical references. Those interested in maintaining a history of casemix purchasing in New Zealand should maintain a library of successive editions of this document.The Cost Weights group has investigated the effect on DHBs existing cost weight volumes if the sector moves to grouping events to AR-DRG 4.2. Part of this work entailed determining if changes would be needed to any of the conditions in the 01/02 FY version of this document where those conditions are described by diagnosis or procedure codes and ICD-10-AM edition 2 was used in place of ICD-10-AM edition 1.

This work has uncovered one typo in the previous version and has noted the greater specificity in procedure codes for panendoscopies. It should also be noted that the neonatal inclusion conditions have been corrected by moving the DRG P67C from the second test to the third test in para 5.2.1, and agency and facility codes have been added for Queen Elizabeth hospital in Rotorua. See Section 3.2 below for details.

In addition, the wording of this document has been updated to better reflect current circumstances, and some historical comments have been removed so as to streamline this document. These may be found in the document for the 01/02 FY.

Introduction

This report specifies the final version of the 20022003/2003 2004 Financial Year[1] (0203/03 04 FY) WIES8B WIES8C methodology for casemix purchasing recommended for use by DHBNZ. It is the same as the document for the 0102/02 03 and is again based onFY with adaptation to the new DRG schedule, AR-DRG 4.2. This schedule shares the same codes as AR-DRG 4.1 and, in all except three cases, the descriptions are the same. What has changed are some of the underlying grouper rules. It follows that the The cost weights used in the 0102/02 03 FY can alsowill continue to be used on AR-DRG 4.2, but will now apply to maternity events as outlined in section 5.3 of this document. The current cost weights applied to AR-DRG 4.2 and based on this set of rules will be referred to asWIES8B WIES8C. This is the recommended framework to be used in New Zealand from 1 July 20023.

The intent of this document is to specify the casemix methodology used by DHBs so that case weighted discharges can be calculated for all National Minimum Data Set (NMDS) events by NZHIS. Further variables are also required to identify casemix purchased Purchase Units (PUs), case complexity (for future costing work) and the costweight version used. A secondary purpose of this document is to provide a definitive explanation of casemix purchasing for use throughout the health sector. As such, additional information beyond that required by NZHIS for implementation on the NMDS is provided both as a background and to identify areas that may be subject to revision for future funding arrangements.

As requested by NZHIS, theThis specification is described as much as possible in plain English. There are, however, also references to lists of International Classifications of Diseases (ICD-10-AM edition 2), Diagnostic Related Groupings (DRGs[2]) and other lists of coded variables from the Data Dictionary for the NMDS. Such lists, including logical conjunctions of different sets of variables, are provided to exactly identify what is included (or excluded) in the English definition.

Note that the terms Hospital and Health Service (HHS) and DHB provider arm will be used interchangeably throughout this document.

3.1 Background

DHBs have inherited former HFA and MoH funding arrangements in the guise of a funding package, which will takes the form of a service level agreement between a DHB and its provider arm from the 02/03 FY. Effectively, DHBs will purchase a range of inpatient events (principally Medical/Surgical events) from their provider arms. This document extends the existing casemix methodology, known as Weighted Inlier Equivalent Separations (WIES), Version 8 with Amendments for New Zealand (WIES8BWIES8C).

DHBs are required to construct a price volume schedule. The casemix PUs appearing in this schedule will consist of casemix events contracted for via Purchase Units (PUs) derived from a mapping of Health Service Speciality codes. See 5.3.

This document also reflects the latest step in keeping up with clinical coding improvements. These changes are essential if casemix funding is to remain relevant for service remuneration. As well as reflecting the change in clinical coding, this paper builds on the work of the SFG Costweights Group[3] and its predecessors.

3.2 Changes from the WIES8A WIES8B version for the 2001/2002 2002/2003 FY

Following is a list of the changes made to the exclusion rules in order to implement coding in ICD-10-AM v2 and grouping to AR-DRG 4.2:The addition of Queen Elizabeth hospital to both the agency and the facility list. In each case the code is 8630. See 5.2.4;

Correction of the colposcopy primary and second procedure code lists by changing code 3563705 to 3563704. See 5.2.14;

Addition of six panendoscopy codes – 3047305, 3047306, 3047815, 3047816, 3047817, and 3047818 - to the list of second procedures for ERCPs, Colonoscopies and Gastroscopies exclusions and to the list of primary procedures for Gastroscopies. See 5.2.16, 5.2.17, and 5.2.18;

Move DRG P67C from the second statement to the third statement under the neonatal inclusion rule. See 5.2.1.

the addition of the Mobile Surgical Bus to both the agency and facility list – the code is 8656. See 5.2.10;

the addition of a new purchaser code (20) for overseas residents who meet the eligibility criteria for publicly funded health services;.

modifications to allow for casemix funding for maternity events. See 5.2.3 – 5.2.7;

including the rRe-allocation of very low birth weights, those under 400g, to 400g so that some casemix funding will be obtained for previously they are not grouped to an ungroupable events DRG and they therefore receive casemix funding. See 5.2.8.

3.2.1 Propagation of the current exclusion framework

This document continues the framework developed last yearover the last two years, but updates that documentation for the introduction of a maternityWIES8B casemix purchase framework. The intent of the Cost Weights project group in making these changes has been to preserve the current intent of the exclusion rules, with the addition of maternity cases. Hence all existing exclusions from casemix remain. Any significant alteration to these exclusions needs to be considered formally in a future project.

3.3 Areas for change in the future

3.3.1 Exclusion rule Post Natal Early Intervention

A Health Speciality code to identify Post Natal Early Intervention cases was approved by the (NDPG) for implementation from 1 July 2000. The new health speciality code, P50, is excluded from casemix Purchase Unit allocation; see 5.2.2.

3.3.2 Neonatal CPAP

A field recording this variable was introduced to the NMDS from 1 July 2001 and HHSs are required to submit CPAP hours for neonates. For the 02/03 and 03/04 FY this field will not be used for calculations that make adjustments to the costweight for an event. It will, however, form the basis of a future study of CPAP utilisation and whether or not any supplementary payment is required for the use of CPAP for neonates.

3.3.3 Other possible exclusions

Subject to changes on the NMDS, it may be possible to identify additional cases that require exclusion from casemix Purchase Unit allocation, eg. CAPD & MUDS.

3.3.4 Maternity/Obstetrics Purchasing

The A SFG Maternity project is currently in operation andhas , in part, is investigating recommended the introduction of a casemix framework for that service, and this framework will be trialed by some DHBs in 03/04. This revision of WIES includes will a set of bring with it its own set of exclusion rules for the new Maternity framework that will be reviewed for effectiveness next year. In addition, the NDPG has noted some discrepancies in discharge practicest between DHBs that may also be reviewed at that time or possibly during the next review of cost weights and the coding classification in use.hat will be incorporated with these tests once the new Maternity framework is established.

Note that in the body of this document Pregnancy and Childbirth is used rather than Maternity/Obstetric.

3.3.5 Introduction of new event type or related coding

At the time of finalising this document, due 15 March 2001, there are discussions between NZHIS and NDPG about the development of a new event type code, SP, which will be applied to specified short stay procedures. The intent of this work is to capture the clinical data attached to procedures that, with the development of new technology, has seen many of these cases fall under the three-hour barrier. There may be a need for exclusion rules in respect of these events.

WIES8B WIES8C calculation

The following section describes the derived variables required, the DRG reallocation tests applied (AR-DRG => WIES DRG), the Mechanical Ventilation calculation, the matching of events with appropriate costweights and the WIES8B WIES8C case weight calculation. In what follows the phrases case weight, cost weight, and costweight may be used interchangeably.

4.1 Derived variables required in calculation

The following derived variables are used in the WIES8B WIES8C calculation.

4.1.1 Length of Stay

The Length of Stay (LOS) calculation used in the methodology is specific for use within the WIES8B WIES8C calculation. This is because it has a maximum and minimum applied to it, as well as having any Event Leave Days subtracted. A maximum of 365 days applies as the methodology is used for calculating the costweight associated with a particular year. A minimum of 1 day is applied to deal with the few cases where Event Leave Days are equal to the difference between the admission and discharge dates (Note: this does not affect the LOS comparison with low boundary points as the WIES DRG boundary points are integer and the tests for whether an event is same or one day use date tests rather than the LOS).

Hence, the calculated LOS equals the difference in integer days between the discharge and admission dates, minus any Event Leave Days. Further, this is set to 365 if the LOS is greater 365 or is set to 1 if the LOS=0.

4.1.2 Reallocated DRG

As in previous years a number of adjustments are to be made to the original AR-DRG 4.2 grouping by utilising the WIES DRG field, prior to the calculation of WIES8BWIES8C. Most of the former AN-DRG 3 adjustments applied in earlier versions of WIES, namely Cerebral Infarction, Neonates, Transvascular Percutaneous Cardiac Intervention (Stents) and Chemotherapy, are no longer required as the modification has been included within AR-DRG 4.2. However, WIES DRGs are still required for Peritoneal Dialysis (an exclusion in New Zealand), Radiotherapy (in Victoria) and Bone Marrow Transplants.

Details of the DRG splits prior to the case weight calculation are given below. These events, however, should not have the original AR-DRG overwritten (Note: the SAS code creates a new variable, DRG_NZ, to hold the WIES DRG appropriate for the case weight calculation). The WIES DRGs contain all the AR-DRGs as well as additional DRG codes (not used in AR-DRG) for the purpose of applying the appropriate costweights to NMDS events.

4.2 DRG Reallocations

The following are the tests for the allocation of AR-DRGs to WIES DRGs for the purposes of the WIES8B WIES8Ccase weight calculation. Note that with the introduction of AR-DRG 4.2 and improvements in the coding system, Victoria now only uses two DRG splits.

4.2.1 AR-DRG A04, Bone Marrow Transplants

Bone Marrow Transplants have their AR-DRG 4.2 reallocated from A04Z to WIES DRG A04A if certain procedures were performed or to WIES DRG A04B if they were not. These are tested for by checking:

IF AR-DRG is equal to A04Z

AND

Any recorded procedure codes fall in the range:

ICD-10-AM 2nd Edition Bone Marrow, any procedure in the range (13706-00, 13706-06,13706-09,13706-10).

THEN

DRG is reallocated to WIES DRG A04A.

ELSE

IF AR-DRG is equal to A04Z

AND

No recorded procedure falls in the above range

THEN

DRG is reallocated to WIES DRG A04B.

NB: 13706-00 and 13706-09 map to the ICD-10-AM 1st edition procedure code 13706-00 and 13706-06 and 13706-10 map to the ICD-10-AM 1st edition procedure code 13706-06.

4.2.2 Adjustment for Peritoneal Dialysis

In recognition of cost differences between peritoneal and haemodialysis, episodes with a principal diagnosis of peritoneal dialysis (ICD-10-AM code Z49.2) are to be assigned a WIES DRG of L61Y. Note, however, that both dialysis DRGs are casemix exclusions in New Zealand; see 5.2.10 below.

4.2.3 Adjustment of medical AR-DRGs with radiotherapy[4]

Records with medical DRGs where radiotherapy (Z51.0) has been provided are mapped to AR-DRG R64Z (Radiotherapy). Medical DRGs are those where the number part of the DRG is greater than 60 (the format of a DRG is AnnA).

4.2.4 4.2.4 All other AR-DRGs

All other AR-DRGs not reallocated in the above tests are given the same DRG number, ie. the WIES DRG is set to the same value as the AR-DRG.

4.3 Adjusted Mechanical Days

The WIES8B WIES8Ccalculation includes a component for Adjusted Mechanical Ventilation Days used to calculate the mechanical ventilation (MV) copayment. However, not all events are eligible for this component and a range of DRGs have their adjusted MV days set to zero.

4.3.1 DRGs excluded from mechanical ventilation days

Each of the following AR-DRGs has their event’s Adjusted Mechanical Ventilation Days set to zero and are ineligible for a MV copayment.

(A01Z, A02Z, A03Z, A04A, A04B, A05Z, A40Z, F02Z, F40Z, L61Y, P01Z, P02Z, P03Z, P04Z, P05Z, P60A, P60B, P61Z, P62Z, P63Z, P64Z, P65A, P65B, P65C, P65D, P66A, P66B, P66C, P66D, P67A, P67B, P67C, P67D, W01Z, 960Z, 961Z).

4.3.2 Calculation of mechanical ventilation days from hours

For other AR-DRGs than above, Adjusted Mechanical Ventilation Days is calculated in the following way:

If hours of ventilation are less than 6 then Adjusted Mechanical Ventilation Days is set to zero.

If hours of ventilation are 6 or more then Adjusted Mechanical Ventilation Days are calculated by adding 12 hours to the hours reported, dividing the result by 24 and rounding (i.e. gives integer days, effectively rounded up).

4.4 General Calculation

For the WIES8BWIES8C calculation, each NMDS event is initially matched by its allocated WIES DRG to the file containing the WIES DRG costweights and other associated variables.

WIES DRGs are flagged as Sameday, Oneday or other DRGs in this file by the SOflag (Same Day/One Day WIES DRG Flag), and each has some slightly different tests. The methodology is the same as that used for the 01/02 FY, though slightly different from what has been used in the three years prior to 01/02. The development of the weight schedule has followed the same pattern as before, though the calculation has now been presented in an easier format. It uses per diem rates for both high and low outliers, inlier weight, a one day weight, and a same day weight which is usually equal to half the one day weight.

The base WIES score for sameday episodes (inlier and low outlier), one-day episodes (inlier and low outliers), and multiday inliers can be read directly from the WIES8 weights table using the appropriate column and row (WIES DRG4). The base WIES score for multiday low outliers can be calculated by multiplying the per diem weight given in the WIES8 weights table by the patient’s length of stay. The base WIES score for high outliers is obtained by multiplying the number of high outlier days by the high outlier per diem weight (from the WIES8 weights table and adding the multiday inlier weight (from table)). Technical details are provided in the following sections.

An event’s LOS is generally compared with the WIES DRG’s low and high LOS boundary points to determine an intermediate variable (IES) and which particular costweight should be applied to it. In the following sections, shortened variable names from the WIES DRG weights file are used. Note that in the following table VIC-DRG4 is synonymous with DRG_NZ and WIES DRG.

|Variable |Label |Description |

|(Column Heading) | | |

|Victorian DRG |VIC-DRG4 |Victorian modification to AR-DRG4.2. |

|Same day medical target |Sdmt |VIC-DRG4s marked with a “Y” are classed as same day medical target VIC-DRG4s. VIC-DRG4s marked|

| | |with “N” are not classed as same day medical target VIC-DRG4s. WIES for same day patients |

| | |allocated to same day medical target VIC-DRG4s are calculated normally but the total WIES |

| | |associated with same day patients in these VIC-DRG4s cannot exceed specified levels (usually |

| | |6.5% of total WIES). Excess same day medical target WIES are not funded. |

|Mechanical ventilation |Mv_elig |This describes the way mechanical ventilation severity co-payments are made for the VIC-DRG4. |

| | |Options are :- |

| | |D: funded provided at least six hours of ventilation is provided. Patients attract a daily |

| | |rate of 0.7729 WIES |

| | |E: patients with a reported ICD-10-AM procedure code of 13382-02 are funded an additional |

| | |3.1323 WIES |

| | |4: funded for each day of mechanical ventilation after 4 days. Patients attract a daily rate |

| | |of 0.7729 WIES. |

| | |I: ineligible for mechanical ventilation co-payments |

|Other co-payments |Copay |Some groups of patients attract additional funds in recognition of their higher costs. Options|

|(Only in Victoria, not in New | |are:- |

|Zealand) | |Thal: a co-payment of 0.2648 WIES is made to patients with a reported ICD-10-AM thalessaemia |

| | |diagnosis code of D56.x or D57.2 (Note: These do not have to be principal diagnoses) |

|Low inlier boundary |Lb |The low length of stay boundary for inliers. Patients with a length of stay of less than the |

| | |low boundary are classed as low outliers. For most VIC-DRG4s the low boundary has been set at |

| | |a third of the estimated average length of stay for the VIC-DRG4. Boundaries are truncated to |

| | |the whole number. |

|High inlier boundary |Hb |The high length of stay boundary for inliers. Patients with a length of stay greater than the |

| | |high boundary are classed as high outliers. For most VIC-DRG4s the high boundary has been set |

| | |at three times the estimated average length of stay for the VIC-DRG4. Boundaries are rounded |

| | |to the nearest whole number. |

|Inlier average length of stay |i_alos |The average length of stay (days) for inliers. |

|VIC-DRG4 designation |Sd_od |Flag for designated sameday (S) or one day (O) VIC-DRG4s |

|Same day weight |Sd |The same day weight is used to allocate WIES to episodes where patients are admitted and |

| | |separated on the same day. Depending upon the VIC-DRG4, same day patients may be either low |

| | |outliers or inliers:- |

| | |Designated Same day VIC-DRG4s |

| | |The same day weight is based on the costs of same day patients. |

| | |Non-Same Day VIC-DRG4s with a low boundary of zero days |

| | |The same day weight is set at the multiday inlier weight. |

| | |Non-Same Day VIC-DRG4s with a low boundary of 1 day |

| | |The same day weight is set at half the multiday inlier weight |

| | |Non-Same Day VIC-DRG4s with a low boundary of 2 days or more (low outliers) |

| | |The same day weight is set at half of the multiday inlier weight divided by the low boundary |

| | |(0.5´md_in ¸ lb) |

|One day weight |Od |The one day weight is used to allocate WIES to episodes where patients have a length of stay |

| | |of one but who were not separated on the same day as they were admitted. Depending upon the |

| | |VIC-DRG4, one day patients may be either low outliers or inliers:- |

| | |Designated Same day VIC-DRG4s |

| | |The one day weight is based on the costs of all inliers excluding same day patients. If the |

| | |patient is an inlier they attract the full multiday inlier weight. If the patient is a low |

| | |outlier they attract the low outlier per diem weight. |

| | |Designated One day VIC-DRG4s |

| | |The one day weight is based on the costs of patients with a length of stay of one day. |

| | |Non-Same/One Day VIC-DRG4s with a low boundary of 1 day or less |

| | |The one day weight is set at the multiday inlier weight. |

| | |Non-Same/One Day VIC-DRG4s with a low boundary of 2 day or more (low outliers) |

| | |The one day weight is set at the low outlier per diem weight. |

|Low outlier multiday per diem |Lo_pd |The low outlier multiday per diem weight is used to allocate WIES to low outliers who have a |

|weight | |length of stay of at least two days. |

| | |Not all VIC-DRG4s have low outliers. No weight is reported in these cases. |

| | |For most VIC-DRG4s the weight is derived as: |

| | |md_in ¸ lb |

| | |The WIES value is calculated by multiplying the low outlier multiday per diem weight by the |

| | |patient’s length of stay. |

|Inlier multiday weight |md_in |The inlier multiday weight is used to allocate WIES to inliers who have a length of stay of at|

| | |least two days. |

| | |For designated VIC-DRG4s, same day/one day patients are excluded when deriving the inlier |

| | |multiday weight. |

4.4.1 Calculating WIES8BWIES8C

To calculate the WIES weight allocated to a patient you need to:-

Calculate the WIES co-payment for MV(see box 1)

Calculate the base WIES allocation using the WIES DRG4 and the patient’s length of stay adjusted for mechanical ventilation per diem. This can be done using the appropriate weights from the WIES8BWIES8C weights table.

Add the base WIES payment and co-payment (see box 3).

The steps are described in detail below with technical specifications provided in the boxes.

4.4.2 Copayment for Mechanical Ventilation

For 02/03 there is one co-payment, namely for mechanical ventilation. Technical specifications for mechanical ventilation co-payments are given in box 1.

To be eligible for a mechanical ventilation co-payment the patient must have had at least six hours of continuous mechanical ventilation and have been allocated to a WIES DRG4 that is eligible for a mechanical ventilation co-payment. WIES DRG4s are classed as either:

1. Eligible for daily co-payments of 0.7729 WIES (mv_elig =“D” in the WIES8B WIES8Cweights table);

2. Eligible for an episode WIES co-payment 3.1323 when the ICD-10-AM procedure code 13882-02 is present (mv_elig = “E” in the WIES8BWIES8C weights table);

3. Eligible for daily co-payments at 0.7729 WIES for ventilated days in excess of four days (96 hours) mechanical ventilation (mv_elig = “4” in the WIES8B WIES8C weights table); or

4. Ineligible for co-payments (mv_elig = “I” in the WIES8BWIES8C weights table).

Box 1: Calculating Mechanical Ventilation Co-payments

Select mv_elig

case “D” then

if (hours on mechanical ventilation is greater than or equal to 6 )[5] then

Adjmvday = round((hours mechanical ventilation +12)/24)

else

adjmvday = 0

mv_copay = adjmvday ´ 0.7729

go to box 2b

case “E” then

adjmvday = 0

If any procedure of 13882-02

mv_copay = 3.1323

else

mv_copay = 0

go to box 2b

case “4” then

if (hours on mechanical ventilation > 96) then

adjmvday = round((hours mechanical ventilation +12)/24) - 4

else

adjmvday = 0

mv_copay = adjmvday ´ 0.7729

go to box 2b

otherwise do

adjmvday = 0

mv_copay = 0

go to box 2b

Base WIES payments for high outliers are reduced when a patient receives daily mechanical ventilation co-payments. To make this reduction you will need to remember the number of days receiving mechanical ventilation co-payments (“adjmvday” in the technical specifications).

In 99/00 Victoria provided a hip revision copayment, however, this is no longer required as these are separately identified in AR-DRG 4.2 (I03A, I03B).

4.4.3 Base WIES

To calculate a patient's base WIES you need to determine:

5. The patient’s WIES DRG4.

6. The patient’s length of stay (LOS).

7. The patient’s length of stay category (LOS_cat: “S”= same day, “O”= one day, “M”= multiday).

8. The number of mechanical ventilation co-payment days (“adjmvday” see box 2a).

9. The patient’s inlier status (“I”= inlier, “L”= low outlier, “H”= high outlier).

The patient’s length of stay and length of stay category are derived from the admission date, separation date and leave days. A maximum length of stay of one year (365 days) is used. This ensures that WIES are not allocated to extreme stays that are likely to represent non-acute care. Technical specifications are given in Box 2a.

Box 2a: Determining Length of Stay Category and Maximum Length of Stay

Sameday='Y' if admission date = separation date

Else sameday='N'

If (sameday = ‘Y’) then

LOS_cat = “S”

go to step/box 2b

else if (sameday = ‘N’) and (LOS less than or equal to 1[6]) then

LOS_cat = “O”

go to step/box 2b

else

LOS = min(LOS,365)

LOS_cat = “M“

go to step/box 2b

The patient’s inlier status is determined by comparing the patient’s length of stay with the inlier boundaries for the WIES DRG4 to which the patient is allocated. The low inlier and the high inlier boundaries are given in the WIES8BWIES8C weights table.

A patient is classified as an inlier when their length of stay is greater than or equal to the low inlier boundary and less than or equal to the sum of the high inlier boundary plus any mechanical ventilation co-payment days.

Patients with a length of stay less than the low inlier boundary are classified as low outliers.

Patients with a length of stay greater than the sum of the high inlier boundary and mechanical ventilation co-payment days are classified as high outliers. Technical specifications are given in box 2b.

Box 2b: Calculate Inlier Status

If LOS < LB then

Inlier = “L”

go to box 2c

else if LOS > (HB + adjmvday) then

Inlier = “H”

go to box 2c

else

Inlier = “I”

go to box 2c

Separate columns occur in the WIES8BWIES8C weights table for episodes which are

10. same day

11. one day

12. multiday low outliers

13. multiday inliers

14. high outliers.

The base WIES score for sameday episodes (inlier and low outlier), one day episodes (inlier and low outliers), and multiday inliers can be read directly from the WIES8B WIES8C weights table using the appropriate column and row (WIES DRG4). The base WIES score for multiday low outliers can be calculated by multiplying the per diem weight given in the WIES8B weights table by the patient’s length of stay. The base WIES score for high outliers is obtained by multiplying the number of high outlier days by the high outlier per diem weight (from the WIES8B WIES8C weights table and adding the multiday inlier weight (from table)). Technical details are provided in box 2c.

Box 2c: Calculate Base WIES

Select Inlier

case “L” do

select LOS_cat

case “S” do

base_WIES = sd

IES = base_WIES ¸ md_in

go to box 3

case “O” do

base_WIES = od

IES = base_WIES ¸ md_in

go to box 3

case “M” do

base_WIES = LOS ´ lo_pd

IES = base_WIES ¸ md_in

go to box 3

case “I” do

IES=1

select LOS_cat

case “S” do

base_WIES = sd

go to box 3

case “O” do

base_WIES = od

go to box 3

case “M” do

base_WIES = md_in

go to box 3

case “H” do

high_days = max(0, LOS - hb - adjmvday)

base_WIES = Md_in + high_days ´ ho_pd

IES = base_WIES ¸ Md_in

go to box 3

High outlier days are days stayed in excess of the high outlier boundary plus any mechanical co-payment ventilation days (“adjmvdays” - see boxes 1 and 2b).

Inlier Equivalent Separations (IES) can be calculated by dividing the base WIES by the multiday inlier weight.

4.4.4 Final WIES weight

The WIES score is calculated by adding the base WIES and the co-payment WIES. Details are provided in box 3.

Box 3: Calculating WIES Score

WIES8CB = base_WIES + mv_copay

Purchase Unit allocation

The following section describes the derived variables required, the exclusion tests applied and the mappings used to allocate DHB casemix Purchase Units to NMDS events.

5.1 Derived variables required in allocation

The following derived variables are required for casemix exclusion testing.

5.1.1 Patient’s Age

The patient’s age is calculated in integer years as at the date of discharge.

5.1.2 Length of Stay

(Note: same as section 2.1.1) The Length of Stay (LOS) calculation used in the methodology is specific for use within the WIES8B WIES8C calculation. This is because it has a maximum and minimum applied to it, as well as having any Event Leave Days subtracted. A maximum of 365 days applies as the methodology is used for calculating the costweight associated with a particular year. A minimum of 1 day is applied to deal with the few cases where Event Leave Days are equal to the difference between the admission and discharge dates. (Note: this does not affect the LOS comparison with low boundary points as the DRG boundary points are integer and the tests for whether an event is same or one day use date tests rather than the LOS).

Hence, the calculated LOS equals the difference in integer days between the discharge and admission dates, minus any Event Leave Days. Further, this is set to 365 if the LOS is greater 365 or is set to 1 if the LOS=0.

5.2 Exclusions from casemix purchasing

The following section lists the tests that identify whether or not a particular event is purchased through the casemix methodology. It should be noted that some of the tests are order sensitive, e.g. the Medical/Surgical test assumes that the Neonatal test has already been applied. Also, an event may be excluded for more than one reason (note - the NZHIS SAS methodology uses individual exclusion flag fields to generate an overall exclusion flag {Yes/No} for each event).

5.2.1 Neonatal Inpatient Casemix

This test takes the form of an inclusion rule, as this is easier to specify than the converse exclusion rule. To be potentially included in neonatal casemix volumes an event requires a Pregnancy & Childbirth Health Speciality code and must meet one of three tests (originally agreed by the 98/99 joint HFA/HHS Maternity & Neonates project) which attempt to distinguish between well new-borns and those who required additional health services:

The Health Service Speciality code is in the Pregnancy & Childbirth range (ie where the first character is “P”) but is not P50 – ie is in the range (P00, P10, P11, P20, P30, P35, P41, P42, P43) -

AND

(The Health Service Speciality code is in the range (P41, P42, P43)

OR

(The AR-DRG is in the range (P02Z, P61Z, P62Z, P03Z, P63Z, P64Z, P04Z, P65A, P65B, P65C, P65D, P05Z, P66A, P66B, P66C, P06A, P06B, P67B, P67A))

OR

(The AR-DRG is in the range (P60A, P01Z, P60B, P66D, P67C, P67D) AND (the third ICD diagnosis is NOT blank OR the first ICD procedure is NOT blank)))

5.2.2 Non - Medical/Surgical Events

Events which have a Mental Health or DSS Health Service Speciality code, i.e. first character is “D” or “Y”, are excluded. In addition, Pregnancy & Childbirth events (where the first character is “P”) are excluded if they do not meet the criteria above in the Neonatal casemix inclusion rule.

5.2.3 Maternity Inpatient Casemix

The following table is generated from the table of Maternity facilities contained in the document Maternity Services: A Reference Document, HFA, 1999 – Appendix 9. Only the designated secondary and tertiary maternity facilities have been listed as the intent of the maternity project group was that a casemix purchase framework should only apply for service provided in these facilities.

|Document Facility Name |NMDS Facility Name |NMDS Facility Code |Secondary |Tertiary |

|Whangarei |Whangarei Area Hospital |4111 |( | |

|North Shore |North Shore |3215 |( | |

|Waitakere |Waitakere |3216 |( | |

|National Women’s |National Womens |3213 |( |( |

|Middlemore |Middlemore |3214 |( |( |

|Auckland City |Auckland City |3260 |( |( |

|Waikato Hospital |Waikato |5311 |( |( |

|Rotorua |Rotorua |5312 |( | |

|Tauranga |Tauranga |4911 |( | |

|Whakatane |Whakatane |3311 |( | |

|New Plymouth |Taranaki Base |4711 |( | |

|Wanganui |Wanganui |5711 |( | |

|Hastings |Hastings Memorial |3612 |( | |

|Masterton |Masterton |5511 |( | |

|Palmerston North |Palmerston North |4311 |( | |

|Wellington |Wellington |5811 |( |( |

|Hutt |Hutt |5812 |( | |

|Blenheim (Wairau) |Wairau |3811 |( | |

|Nelson |Nelson |3911 |( | |

|Christchurch Women’s |Christchurch Womens |4014 |( |( |

|Greymouth |Grey Base Hospital |5911 |( | |

|Timaru |Timaru |4411 |( | |

|Dunedin |Dunedin |4211 |( |( |

|Invercargill |Southland |4511 |( | |

Pregnancy and Childbirith eventsa are those where the first character of the Health Specialty Code is P, excluding P50. They are not included if they do not meet the criteria in the Neonatal Casemix Inclusion Rule.

This means that well newborn babies, as ompposed to ‘neonates’, will be covered by maternity inpatienet casemix. In general, we expect well newborns to fall into AR-DRG P67D and be counted under the maternity inpatients casemix purchase unit ?W101.01.

The rules in 5.2.4 to 5.2.7 are intended only to apply to maternity cases.

5.2.4 Amniocentesis

For events where the health speciality code starts with P and is not P50, and the event occurs in a facility listed in table 5.2.3, Ssame-day amniocentesis events are excluded from casemix purchasing. These events are tested for by checking:

That the admission and discharge dates are the same

AND

that the first procedure code is one of the following: 1660000,or 1661800, or 1662100.

5.2.5 Chorion Villis Sampling

For events where the health speciality code starts with P and is not P50, and the event occurs in a facility listed in table 5.2.3, Ssame-day chorion villis sampling events are excluded from casemix purchasing. These events are tested for by checking:

that the admission and discharge dates are the same

AND

That the first procedure code falls in the range:

ICD10 Chorion Villis Sampling, first procedure in the range: (1660300).

5.2.6 Rhesus Isoimmunisation

For events where the health speciality code starts with P and is not P50, and the event occurs in a facility listed in table 5.2.3, Ssame -day rhesus isoimmunisation events are excluded from casemix purchasing.

These events are tested for by checking:

That the admission and discharge dates are the same

AND

That the primary diagnosis code falls in the range:

ICD10 Rhesus Isoimmunisation: (O360, O361).

5.2.7 Breast feeding / Lactation

For events where the health speciality code starts with P and is not P50, and the event occurs in a facility listed in table 5.2.3, sSame -day breastfeeding/lactation events are excluded from casemix purchasing.

These events are tested for by checking:

That the admission and discharge dates are the same

AND

That the primary diagnosis code falls in the range:

ICD10 Breastfeeding/Lactation: (O9230, O9231, O9240, O9241, O9250, O9251, O9270, O9271).

5.2.8 Birth weight

In alignment with Victoria, a baby which has an admission weight between 125 and 399 grams will be assigned an admission weight of 400grams. This allows it to be grouped to a neonatal DRG rather than tobe the DRG for ungroupable events, (960Z), under which no funding would have been received.

5.2.9 Non Base Funding Purchases

Events which are not part of an HHS’s base DHB service agreement are excluded. In the past, HFA base contract events, now base DHB service agreements, had a Purchaser code in the range (01, 02, 03, 04, 13, 20). Events with any other Purchaser code should be excluded, e.g. privates, ACC direct and Insurers, Elective, i.e. the former Waiting Times Fund (WTF), events, and any other MoH/DHB-specific non-base purchasing, etc. In addition, any Admission Types of “ZW” (indicating an ACC elective purchase) are excluded.

5.2.10 Designated Hospital Casemix Revenue

A combination of a range of Agencies and Facilities has been identified as the providers through which the MoH/DHBs will monitor base casemix agreements. All other facilities, historically designated as ‘rural’, are excluded. Note that with HHS sub-contracting the list of included Facilities may require updating periodically; this assumes that the Agency will reflect the organisation that has the original DHB agreement. A list of included Agencies and Facilities is given below. Any combination of Agency & Facility that does not fall in the lists below is excluded from DHB casemix purchase agreements.

|Health Agency code |Agency Name |

|0223 |Heart Surgery South Island |

|1011 |Northland DHBealth |

|1021 |Waitemata DHBealth |

|1022 |Auckland DHBealthcare |

|1023 |Counties Manukau DHB |

|2031 |Health Waikato DHB |

|2041 |East Bay Health |

| |(kept for historical analysis) |

|2042 |LakelandLakes DHB |

|2043 |Western Bay Health |

| |(kept for historical analysis) |

|2047 |Bay of Pacificlenty DHBealth |

|2051 |Tairawhiti DHBealth |

|2071 |Taranaki DHBealthcare |

|3061 |Hawke’s Bay DHBealth |

|3081 |Mid cCentral DHBealth |

|3082 |Good Health Whanganui DHB |

|3091 |Capital & Coast DHBealth |

|3092 |Hutt Valley DHBealth |

|3093 |Wairarapa DHBealth |

|3101 |Nelson-Marlborough DHBealth |

|4111 |West Coast DHBealth Care |

|4121 |Canterbury DHBealth |

|4122 |Canterbury DHB (HealthlinkL South – for historical |

| |purposes) |

|4123 |South Canterbury DHBealth |

|4131 |Healthcare Otago DHB |

|4141 |Southlandern DHBealth |

|8630 |Queen Elizabeth Hospital |

|8656 |Mobile Surgical Bus |

|Facility code |Facility name |

|4111 |Whangarei Area Hospital |

|4112 |Kaitaia |

|3211 |Auckland |

|3212 |Greenlane |

|3213 |National Women’s |

|3214 |Middlemore |

|3215 |North Shore |

|3216 |Waitakere |

|3239 |Starship Hospital |

|3260 |Auckland City Hospital |

|5011 |Thames |

|3311 |Whakatane |

|4911 |Tauranga |

|3411 |Gisborne |

|5311 |Waikato |

|5312 |Rotorua |

|5313 |Te Kuiti |

|8630 |Queen Elizabeth, Rotorua |

|5323 |Tokoroa |

|4811 |Taumarunui |

|5329 |Taupo General |

|4711 |Taranaki Base |

|4712 |Hawera |

|3611 |Napier |

|3612 |Hastings Memorial |

|5711 |Wanganui |

|4311 |Palmerston North |

|5511 |Masterton |

|5812 |Hutt |

|5816 |Kenepuru |

|5811 |Wellington |

|3811 |Wairau |

|3911 |Nelson |

|4011 |Christchurch |

|4013 |Burwood |

|4014 |Christchurch Womens |

|3111 |Ashburton |

|5911 |Grey Base Hospital |

|4411 |Timaru |

|4211 |Dunedin |

|4511 |Southland |

|3250 |Manukau SuperClinic |

|3220 |Pukekohe |

|3221 |Papakura Obstetric |

|3240 |Botany Downs Maternity Hospital |

|4113 |Dargaville |

|4114 |Bay of Islands |

|8270 |Southern Cross, Hamilton |

|8331 |Bowen |

|8432 |Wakefield |

|8595 |Ascot Hospital |

|8233 |Mercy, Auckland |

|8422 |Our Lady’s Home of Compassion |

|8366 |St Georges |

|8377 |Southern Cross Trust, Christchurch |

|8580 |Oxford Day Clinic |

|3313 |Murupara |

|3314 |Opotiki |

|4212 |Wakari |

|8507 |Manor Park Hospital |

|8462 |Boulcott Clinic |

|8471 |Southern Cross, Wellington |

|5818 |Paraparaumu |

|5819 |Puketiro |

|5820 |Te Whare O Rangituhi |

|5814 |Porirua |

|8313 |Aorangi, (was Mercy) |

|8314 |Southern Cross, Palmerston North |

|8656 |Mobile Surgical Bus |

|8218 |Southern Cross Brightside |

5.2.11 Non-Treated Patients

Events where no treatment is provided are excluded. These include Boarders who may be admitted or in the case of Cancelled Operations.

Boarders are tested for by checking the primary diagnosis code (only) for a set of codes:

ICD10 Boarders, primary diagnosis in the range:

Z763, Z764.

Cancelled Operations are tested for by checking that:

The primary operation/procedure code is blank

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

Length of Stay is less than 2 days

AND

The one (or more) of the first six diagnosis codes contain the following codes:

ICD10 Canc Ops, one (or more) of diagnosis 1-6 in the range:

Z530, Z531, Z532, Z538, Z539.

5.2.12 Error DRGs

Events coded to an Error AR-DRG are excluded. Error AR-DRGs are in the range (960Z, 961Z, 962Z, 963Z).

5.2.13 Some Transplants

Some organ Transplants are excluded as they are not purchased via casemix, e.g. liver, heart and lung transplants. Excluded Transplants are in the AR-DRG range (A01Z, A02Z, A03Z, A05Z). Simultaneous pancreas/kidney transplants will be coded so as to fall under A02Z, Multiple Organ Transplants, thus excluded from casemix purchasing.

5.2.14 Some Spinal Injuries

Some Spinal services are excluded as they are not purchased via casemix. Excluded Spinal services are in the Health Services Speciality code range (S50, S53).

5.2.15 Surgical Termination of Pregnancy

Surgical Termination of Pregnancy (ToP) events are excluded. These are tested for by checking:

The AR-DRG is equal to O40Z

AND

That the primary procedure/procedure codes fall in the range:

ICD10 Surg ToP, primary procedure in the range: (3564300, 3564301) AND primary diagnosis in the range (O040-O049 {O04*}).

5.2.16 Renal and Peritoneal Dialysis

The WIES DRGs for Renal Dialysis, L61Z, and Peritoneal Dialysis, L61Y, are excluded from casemix purchasing. Unless the associated events were previously coded to DRG3.1 572, this represents a new exclusion from casemix.

5.2.17 Sameday Chemotherapy & Radiotherapy

Some sameday cases for Chemotherapy and Radiotherapy are excluded from casemix purchasing.

These events are tested for by checking:

That the Admission date is the same as the Discharge date

AND

That either of the first two diagnosis codes fall in the range:

ICD10 Chem/Radio, either of the first two diagnosis in the range: (Z510, Z511, Z512).

5.2.18 Sleep Apnoea

Some Sleep Apnoea events where they stay overnight for tests are excluded from casemix purchasing. These events are tested for by checking:

That the integer difference in days between the Discharge and Admission dates is less than 2

AND

That the AR-DRG equals E63Z.

5.2.19 Lithotripsy

Some sameday Lithotripsy events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

That the primary procedure code falls in the following range:

ICD10 Lithotripsy, first procedure in the range: (3654600).

AND

That the second procedure code falls in the following range:

ICD10 Lithotripsy, second procedure in the range: (3654600,9250202, 9250300, blank).

AND

That the third procedure code is in the range: (3654600,9250202,9250300, blank).

5.2.20 Colposcopies

Some sameday Colposcopy events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 Colposcopy, first procedure in the range: (3560800, 3564600, 3564700, 3560801, 3553902, 3561100, 3553904, 3563704, 3553903, 3560802, 3561400).

AND

That the second procedure code falls in the following range:

ICD10 Colposcopy, second procedure in the range: (3560800, 3564600, 3564700, 3560801, 3553902, 3561100, 3553904, 3563704, 3553903, 3560802, 3561400,9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.21 Cystoscopies

Some sameday Cystoscopies events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 Cystoscopies, first procedure in the range: (3681201, 3681200, 3683600, 3683904, 3684503, 3683902, 3684501, 3684500, 3683900, 3684505, 3684504, 3684502, 3731801, 3731500, 3681501, 3682700).

AND

That the second procedure code falls in the following range:

ICD10 Cystoscopies, second procedure in the range: (3681201, 3681200, 3683600, 3683904, 3684503, 3683902, 3684501, 3684500, 3683900, 3684505, 3684504, 3684502, 3731801, 3731500, 3681501, 3682700, 9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.22 ERCPs

Some sameday ERCP (endoscopic retrograde cholangiopancreatography) events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 ERCP, first procedure in the range: (3048400, 3048401, 3048402, 3045200, 3048500, 3049100, 3045202, 3048501, 3049101, 3049400, 3045100, 3045201, 3044200).

AND

That the second procedure code falls in the following range:

ICD10 second procedure in the range: (3048400, 3048401, 3048402, 3045200, 3048500, 3049100, 3045202, 3048501, 3049101, 3049400, 3045100, 3045201, 3044200, 3047801, 3047802, 3209000, 3208400, 3209001, 3208401, 3209300, 3208700, 9030800, 3209400, 3207500, 3207200, 3207201, 3207501, 9031200, 9031201, 3207800, 3208100, 3209900, 3210800, 9034100, 3210500, 4181600, 3047303, 3047810, 4182500, 4182200, 3047304, 3047600, 3047601, 3047806, 3047809, 3047811, 3047812, 3047602, 3047813, 3047900, 3047807, 3047603, 3047300, 3047301, 3047500, 3047501, 3047803, 3209500, 3047804,

3047305, 3047306, 3047815, 3047816, 3047817, 3047818,

9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.23 Colonoscopies

Some sameday Colonoscopies events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 Colonoscopies, first procedure in the range: (3209000, 3208400, 3209001, 3208401, 3209300, 3208700, 9030800, 3209400, 3207500, 3207200, 3207201, 3207501, 9031200, 9031201, 3207800, 3208100, 3209900, 3210800, 9034100, 3210500).

AND

That the second procedure code falls in the following range:

ICD10 second procedure in the range: (3048400, 3048401, 3048402, 3045200, 3048500, 3049100, 3045202, 3048501, 3049101, 3049400, 3045100, 3045201, 3044200, 3047801, 3047802, 3209000, 3208400, 3209001, 3208401, 3209300, 3208700, 9030800, 3209400, 3207500, 3207200, 3207201, 3207501, 9031200, 9031201, 3207800, 3208100, 3209900, 3210800, 9034100, 3210500, 4181600, 3047303, 3047810, 4182500, 4182200, 3047304, 3047600, 3047601, 3047806, 3047809, 3047811, 3047812, 3047602, 3047813, 3047900, 3047807, 3047603, 3047300, 3047301, 3047500, 3047501, 3047803, 3209500, 3047804,

3047305, 3047306, 3047815, 3047816, 3047817, 3047818,

9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.24 Gastroscopies

Some sameday Gastroscopies events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 Gastroscopies, first procedure in the range: (4181600, 3047303, 3047810, 4182500, 4182200, 3047304, 3047600, 3047601, 3047806, 3047809, 3047811, 3047812, 3047602, 3047813, 3047900, 3047807, 3047603, 3047300, 3047301, 3047500, 3047501, 3047803, 3209500, 3047804, 3047801, 3047802, 3047305, 3047306, 3047815, 3047816, 3047817, 3047818).

AND

That the second procedure code falls in the following range:

ICD10 second procedure in the range: (3048400, 3048401, 3048402, 3045200, 3048500, 3049100, 3045202, 3048501, 3049101, 3049400, 3045100, 3045201, 3044200, 3047801, 3047802, 3209000, 3208400, 3209001, 3208401, 3209300, 3208700, 9030800, 3209400, 3207500, 3207200, 3207201, 3207501, 9031200, 9031201, 3207800, 3208100, 3209900, 3210800, 9034100, 3210500, 4181600, 3047303, 3047810, 4182500, 4182200, 3047304, 3047600, 3047601, 3047806, 3047809, 3047811, 3047812, 3047602, 3047813, 3047900, 3047807, 3047603, 3047300, 3047301, 3047500, 3047501, 3047803, 3209500, 3047804,

3047305, 3047306, 3047815, 3047816, 3047817, 3047818,

9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.25 Bronchoscopies

Some sameday Bronchoscopies events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

The patient’s age is greater than 15 years old

AND

That the primary procedure code falls in the following range:

ICD10 Bronchoscopies, first procedure in the range: (4188901, 4189800, 4188900, 4189200, 4189801, 4176404, 4176403, 4184600, 4184900, 4185500, 4189500).

AND

That the second procedure code falls in the following range:

ICD10 Bronchoscopies, second procedure in the range:. (4188901, 4189800, 4188900, 4189200, 4189801, 4176404, 4176403, 4184600, 4184900, 4185500, 4189500, 9250202, 9250300, blank).

AND

That the third procedure code is in (9250202, 9250300,blank).

5.2.26 Day Case Blood Transfusions

Some sameday Blood Transfusion events are excluded from casemix purchasing. These events are tested for by checking:

That the Admission and Discharge dates are the same

AND

That the event is non-acute (i.e. Admission Type not in “AC”,”ZC”)

AND

That the primary diagnosis OR the first three procedure codes fall in the range:

ICD10 Blood, primary diagnosis in the range (Z513) OR {primary procedure in the range (9206000, 1370601, 1370602, 1370603) AND second procedure in the range (9206000, 1370601, 1370602, 1370603, blank) AND third procedure blank}.

5.3 Mapping of Health Service Speciality codes to casemix PUs

DHB casemix Purchase Units are derived from a mapping of Health Service Speciality codes. This mapping only applies for included events, i.e. any events excluded from casemix purchasing should not be given a casemix PU code. (Note: the NZHIS SAS code gives excluded events a PU code of “EXCLU” rather than blank).

The following health service speciality codes are initially remapped to other health service speciality codes:

'M01' , 'M02' , 'M03' = 'M00'

'M06' , 'M07' = 'M05'

'M11' , 'M12' , 'M13' = 'M10'

'M16' , 'M17' , 'M18' , 'M19' = 'M15'

'M21' , 'M22' , 'M23' = 'M20'

'M26' , 'M27' , 'M28' = 'M25'

'M31' , 'M32' , 'M33' = 'M30'

'M36' , 'M37' , 'M38' = 'M35'

'M41' , 'M42' , 'M43' = 'M40'

'M46' , 'M47' , 'M48' = 'M45'

'M51' , 'M52' , 'M53' = 'M50'

'M56' , 'M57' , 'M58' = 'M55'

'M61' , 'M62' , 'M63' = 'M60'

'M66' , 'M67' , 'M68' = 'M65'

'M71' , 'M72' , 'M73' = 'M70'

'M76' , 'M77' , 'M78' = 'M75'

'M81' , 'M82' , 'M83' = 'M80'

'M87' , 'M88' = 'M85'

'M91' , 'M92' , 'M93' = 'M90'

'S01' , 'S02' , 'S03' = 'S00'

'S06' , 'S07' , 'S08' = 'S05'

'S11' , 'S12' , 'S13' = 'S10'

'S16' , 'S17' , 'S18' = 'S15'

'S21' , 'S22' , 'S23' = 'S20'

'S26' , 'S27' , 'S28' = 'S25'

'S31' , 'S32' , 'S33' = 'S30'

'S36' , 'S37' , 'S38' = 'S35'

'S41' , 'S42' , 'S43' = 'S40'

'S46' , 'S47' , 'S48' = 'S45'

'S51' , 'S52' , 'S53' = 'S50'

'S55' , 'S56' , 'S57' = 'S59'

'S61' , 'S62' , 'S63' = 'S60'

'S66' , 'S67' , 'S68' = 'S65'

'S71' , 'S72' , 'S73' = 'S70'

'S76' , 'S77' , 'S78' = 'S75'

And from there mapped to the following casemix purchased purchase units:

'S20' = 'D01.01'

'S50' = 'EXCLU'

'M00' , 'M05' , 'M08' , 'M85' , 'M86' , 'M89' = 'M00.01'

'M10' = 'M10.01'

'M14' = 'M10.05'

'M15' = 'M15.01'

'M20' = 'M20.01'

'M25' = 'M25.01'

'M30' = 'M30.01'

'M34' = 'M34.01'

'M40' , 'M75' = 'M40.01'

'M45' = 'M45.01'

'M49' = 'M49.01'

'M50' , 'M90' = 'M50.01'

'M54' , 'M94' = 'M54.01'

'M24' , 'M29' , 'M39' , 'M44' , 'M55' , 'M59' ,

'M64' , 'M69' , 'M74' , 'M79' , 'M84' = 'M55.01'

'M60' = 'M60.01'

'M65' = 'M65.01'

'M35' , 'M70' = 'M70.01'

'M80' = 'M80.01'

'S00' , 'S05' , 'S10' = 'S00.01'

'S15' , 'S19' = 'S15.01'

'S25' = 'S25.01'

'S30' = 'S30.01'

'S35' = 'S35.01'

'S40' = 'S40.01'

'S45' = 'S45.01'

'S58' , 'S59' = 'S55.01'

'S24', 'S60' , 'S65' = 'S60.01'

'S70' = 'S70.01'

'S75' = 'S75.01'

'P41','P42','P43' = 'W06.03'

‘P00’,‘P10’,‘P20’,‘P30’ = ‘Wob101.01’

other = 'EXCLU';

Each PU code is then described:

'D01.01'='Inpatient Dental treatment (DRGs)'

'M00.01'='General Internal Medical Services - Inpatient Services (DRGs)'

'M10.01'='Cardiology - Inpatient Services (DRGs)'

'M10.05'='Specialist Paediatric Cardiac - Inpatient Services (DRGs)'

'M15.01'='Dermatology - Inpatient Services (DRGs)'

'M20.01'='Endocrinology & Diabetic - Inpatient Services (DRGs)'

'M25.01'='Gastroenterology - Inpatient Services (DRGs)'

'M30.01'='Haematology - Inpatient Services (DRGs)'

'M34.01'='Specialist Paediatric Haematology - Inpatient Services (DRGs)'

'M40.01'='Infectious Diseases (incl Venereology) - Inpatient Services (DRGs)'

'M45.01'='Neurology - Inpatient Services (DRGs)'

'M49.01'='Specialist Paediatric Neurology Inpatient Services (DRGs)'

'M50.01'='Oncology - Inpatient Services (DRGs)'

'M54.01'='Specialist Paediatric Oncology - Inpatient Services (DRGs)'

'M55.01'='Paediatric Medical - Inpatient Services (DRGs)'

'M60.01'='Renal Medicine - Inpatient Services (DRGs)'

'M65.01'='Respiratory - Inpatient Services (DRGs)'

'M70.01'='Rheumatology (incl Immunology) - Inpatient Services (DRGs)'

'M80.01'='Palliative Care - Inpatient Services (DRGs)'

'S00.01'='General Surgery - Inpatient Services (DRGs)'

'S15.01'='Cardiothoracic - Inpatient Services (DRGs)'

'S25.01'='Ear, Nose and Throat - Inpatient Services (DRGs)'

'S30.01'='Gynaecology - Inpatient Services (DRGs)'

'S35.01'='Neurosurgery - Inpatient Services (DRGs)'

'S40.01'='Ophthalmology - Inpatient Services (DRGs)'

'S45.01'='Orthopaedics - Inpatient Services (DRGs)'

'S55.01'='Paediatric Surgical Services (DRGs)'

'S60.01'='Plastic & Burns - Inpatient Services (DRGs)'

'S70.01'='Urology - Inpatient Services (DRGs)'

'S75.01'='Vascular Surgery - Inpatient Services (DRGs)'

'W06.03'='Neonatal Inpatient (DRGs)'

‘WMOb101.01’ = Maternity Inpatient (DRGs)

other ='Not a DRG casemix Purchase Unit'

Appendices

6.1 Spreadsheet containing 0103/042 FY DRG weights and associated variables for calculating WIES8CB

Variables names translation 8 character to name:

SOflag {Same Day/One Day DRG Flag}

Sd {Same Day Costweight}

Od {One Day Costweight}

Md_in {Multi day inlier weight}

Ho_pd {High Outlier per diem}

Lb {Low Boundary Point for LOS}

Hb {High Boundary Point for LOS}

I_alos {Average Inlier LOS}

|NZ WIES 8CB Schedule | | | | | | | | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | | |Weights | | | |

|Victorian DRG 4.2 | | |New Zealand Schedule Costweights | | | | |

| | | | | | |Weights | | | | | | | |Mech.Vent. |Same Day |Inlier Boundary |Average | |Outlier Per Diems | | | |Code |DRG Description |Copayment |One Day |Low |High |Inlier LOS |Inlier |High |Low |Same Day |One Day | |DRG42 | |mv_elig | |lb |HB |i_alos |md_in |ho_pd |lo_pd |sd |od | |Z60A |Rehabilitation W Catastrophic/Severe CC |D | |6 |16 |10.666667 |2.257240 |0.169293 |0.376207 |0.188103 |0.376207 | |Z60B |Rehabilitation no Catastrophic/Severe CC |D | |6 |14 |9.500000 |2.248247 |0.189326 |0.374708 |0.187354 |0.374708 | |Z60C |Rehabilitation, Sameday |D | |0 |3 |1.000000 |0.123319 |0.098655 |0.000000 |0.123319 |0.123319 | |Z61Z |Signs and Symptoms |D | |0 |7 |1.823607 |0.458610 |0.201188 |0.000000 |0.458610 |0.458610 | |Z62Z |F-Up After Completed Treat W/O Endoscopy |D | |0 |3 |1.016064 |0.340739 |0.268281 |0.000000 |0.340739 |0.340739 | |Z63A |Other Aftercare W Catastrophic/Severe CC |D | |2 |22 |7.663636 |1.282246 |0.167316 |0.641123 |0.320562 |0.641123 | |Z63B |Oth Aftercare W/O Catastrophic/Severe CC |D | |1 |10 |1.909621 |0.458957 |0.240339 |0.000000 |0.229479 |0.458957 | |Z64A |Other Factors Influenc Health Status >79 |D |Same day |2 |25 |10.121951 |1.458849 |0.115302 |0.729424 |0.338932 |0.729424 | |Z64B |Other Factors Influenc Health Status 15

and substr(adm_typ,2,1) ne 'C' then CYSTO='Y';

else CYSTO='N';

*BELOW IS EXCLUSION RULE FOR ERCPs;

if (put(op01, $ERCPa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then ERCP='Y';

else ERCP='N';

*BELOW IS EXCLUSION RULE FOR COLONOSCOPIES;

if (put(op01, $COLONsa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then COLON='Y';

else COLON='N';

*BELOW IS EXCLUSION RULE FOR GASTROSCOPIES;

if (put(op01, $GASTRa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then GASTRO='Y';

else GASTRO='N';

*BELOW IS EXCLUSION RULE FOR BRONCHOSCOPIES;

if (put(op01, $bron.)*((put(op02, $bron.) or op02 in (' ','9250202','9250300'))))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then BRONCHO='Y';

else BRONCHO='N';

*BELOW IS EXCLUSION RULE FOR DAY CASE BLOOD TRANSFUSIONS;

if (diag01='Z513' or (op01 in ('9206000','1370601','1370602','1370603') and

op02 in (' ','9206000','1370601','1370602','1370603') and

op03 =' '))

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C' then TRANSFUS='Y';

else TRANSFUS='N';

*Below is Amniocentesis exclusion;

if (evstdate=evendate and op01 in (‘1660000’,’1661800’,’1662100’)) then amnio=’Y’;

else amnio = ‘N’;

*Below is Chorio Villis Sampling exclusion;

If (evstdate=evendate and op01 = ‘1660300’) then chorio = ‘Y’;

Else chorio = ‘N’;

*Below is Rhesus Isoimmunisation exclusion;

If (evstdate=evendate and substr(diag01,1,4) = ‘O360’) then rhesus = ‘Y’;

Else rhesus = ‘N’;

*Breast feeding/lactation exclusion *;

if (evstdate=evendate and diag01 in (‘O9230’,’O9231’,’O9240’,’O9241’,’O9250’,’O9251’,’O9270’,’O9271’)

then bfl = ‘Y’;

else bfl = ‘N’;

*BELOW CREATES A MASTER EXCLUSION VARIABLE TO IDENTIFY ALL EXCLUDED EVENTS;

if NONMEDSG='Y' or Deshosp='N' or BOARDER='Y' or CANC_OP='Y' or ERR_DRG='Y'

or XPLANT='Y' or SPINAL='Y' or TERMPREG='Y' or RENAL='Y' or CHEM_RAD='Y' or SLEEP='Y' or LITHO='Y'

or COLPO='Y' or CYSTO='Y' or ERCP='Y' or COLON='Y' or GASTRO='Y' or BRONCHO='Y' or TRANSFUS='Y'

or base = 'N' or amnio = ‘Y’ or chorio = ‘Y’ or rhesus = ‘Y’ or bfl = ‘Y’ or materny = ‘N’

then EXCLU='Y';

else EXCLU='N';

*BELOW MAPS EVENTS TO CASEMIX PURCHASED UNITS OR IDENTIFIES AS CASEMIX EXCLUSIONS;

if EXCLU='N' then

do;

if NEONATE='Y' then PU='W06.03';

else pu = put(hlthspec, $newpu.);

end;

else PU='EXCLU';

PU_name=put(PU,$PU_name.);

*BELOW REALLOCATES BONE MARROW TRANSPLANT AN-DRGs;

if drg_nz='A04Z' then

do;

if (put(op01, $bone.) + put(op02, $bone.) + put(op03, $bone.) + put(op04, $bone.)+

put(op05, $bone.) + put(op06, $bone.) + put(op07, $bone.) + put(op08, $bone.)+

put(op09, $bone.) + put(op10, $bone.) + put(op11, $bone.) + put(op12, $bone.)+

put(op13, $bone.) + put(op14, $bone.) + put(op15, $bone.) + put(op16, $bone.)+

put(op17, $bone.) + put(op18, $bone.) + put(op19, $bone.) + put(op20, $bone.))

then DRG_NZ='A04A';

else DRG_NZ='A04B';

end;

proc sort data = cwd.wies8; by vicdrg4;

data &outdset;

merge test (in=wanted)

cwd.wies8 (rename=(vicdrg4=drg_nz)

drop =vicdesc sameday);

by DRG_nz;

if wanted;

*------------------------------------------------------------------*;

*---------- Mechanical ventilation copayments first -----------*;

*------------------------------------------------------------------*;

if evendate < mdy(07,01,1999) then

do;

if drg_nz in ('A01Z', 'A02Z', 'A03Z', 'A04A', 'A04B', 'A05Z', 'A40Z', 'F02Z', 'F40Z', 'L61Y', 'P01Z', 'P02Z',

'P03Z', 'P04Z', 'P05Z', 'P60A', 'P60B', 'P61Z', 'P62Z', 'P63Z', 'P64Z', 'P65A', 'P65B', 'P65C',

'P65D', 'P66A', 'P66B', 'P66C', 'P66D', 'P67A', 'P67B', 'P67C', 'P67D', 'W01Z', '960Z', '961Z')

then adjmvday=0;

else if op01='1388202' or op02='1388202' or op03='1388202' or op04='1388202' or op05='1388202' or

op06='1388202' or op07='1388202' or op08='1388202' or op09='1388202' or op10='1388202' or

op11='1388202' or op12='1388202' or op13='1388202' or op14='1388202' or op15='1388202'

then adjmvday=5;

else if (put(op01, $mechven.) + put(op02, $mechven.) + put(op03, $mechven.) + put(op04, $mechven.)+

put(op05, $mechven.) + put(op06, $mechven.) + put(op07, $mechven.) + put(op08, $mechven.)+

put(op09, $mechven.) + put(op10, $mechven.) + put(op11, $mechven.) + put(op12, $mechven.)+

put(op13, $mechven.) + put(op14, $mechven.) + put(op15, $mechven.) )

then adjmvday=2;

else if op01='1388200' or op02='1388200' or op03='1388200' or op04='1388200' or op05='1388200' or

op06='1388200' or op07='1388200' or op08='1388200' or op09='1388200' or op10='1388200' or

op11='1388200' or op12='1388200' or op13='1388200' or op14='1388200' or op15='1388200'

then adjmvday=1;

else adjmvday=0;

end;

else

do;

if drg_nz in ('A01Z', 'A02Z', 'A03Z', 'A04A', 'A04B', 'A05Z', 'A40Z', 'F02Z', 'F40Z', 'L61Y', 'P01Z', 'P02Z',

'P03Z', 'P04Z', 'P05Z', 'P60A', 'P60B', 'P61Z', 'P62Z', 'P63Z', 'P64Z', 'P65A', 'P65B', 'P65C',

'P65D', 'P66A', 'P66B', 'P66C', 'P66D', 'P67A', 'P67B', 'P67C', 'P67D', 'W01Z', '960Z', '961Z')

then adjmvday=0;

else if (HMVHRS < 6) then adjmvday=0;

else adjmvday=round((HMVHRS+12)/24);

end;

*------------------------------------------------------------------*;

*---------- LOS category and Inlier category ---------*;

*------------------------------------------------------------------*;

if (sum(evendate, -evstdate, -(evntlvd/1)) lt lb) then inlier='L';

else if (sum(evendate, -evstdate, -(evntlvd/1)) gt sum(HB, adjmvday)) then inlier='H';

else inlier='I';

if evstdate=evendate then los_cat = 'S';

else if (sum(evendate, -evstdate, -(evntlvd/1)) less than or 0) then mv_copay = adjmvday *0.7729;

else mv_copay = 0;

end;

when ('E')

do;

*--- Check for neonate mechanical ventilation ---*;

do i = 1 to 20;

if (substr(px(i),1,7) = '1388202') then nmvsepn = 1;

end;

if (nmvsepn = 1) then

do;

adjmvday= 0;

mv_copay = 3.1323;

end;

else

do;

adjmvday = 0;

mv_copay = 0;

end;

end;

when ('4')

if (hmvhrs gt 96) then

do;

adjmvday= sum(adjmvday, -4);

mv_copay = adjmvday *0.7729;

end;

else

do;

adjmvday = 0;

mv_copay = 0;

end;

otherwise

do;

adjmvday = 0;

mv_copay = 0;

end;

end;

*------------------------------------------------------------------*;

*---------- Box 3c: Calculate Base WIES -----*;

*------------------------------------------------------------------*;

select (Inlier);

when ('L')

do; *---- Same day cases --;

select (los_cat);

when ('S') wies8 = sd;

when ('O') wies8 = od;

when ('M') wies8 = los * lo_pd;

otherwise wies8 = 0;

end;

if md_in gt 0 then ies= wies8 / md_in;

else ies=0;

high_day = 0;

hiwies = 0;

end;

when ('I')

do; *---- Inlier calculations --;

select (los_cat);

when ('S') wies8 = sd;

when ('O') wies8 = od;

when ('M') wies8 = md_in;

otherwise wies8 = 0;

end;

ies= 1;

high_day=0;

hiwies = 0;

end;

when ('H')

do; *---- high outlier calculations --;

high_day = max(0,sum(los,-hb,-adjmvday));

hiwies = high_day * ho_pd ;

wies8 = md_in + hiwies;

if md_in gt 0 then ies= wies8 / md_in;

else ies=1;

end;

Otherwise

do;

high_day=0;

wies8=0;

ies=0;

end;

end;

*------------------------------------------------------------------*;

*---------- Box 5: Total WIES -----*;

*------------------------------------------------------------------*;

wies8c = sum(wies8, mv_copay);

*

* Clean up temporary datasets

*

*;

proc datasets library=work;

delete test;

run;

options mlogic mrecall details merror mprint symbolgen;

%mend w8CICD10;

%macro w8CICD10(indset, outdset);

options nomlogic nomrecall nodetails nomerror nomprint nosymbolgen;

Proc format;

value $newpu

'S20' = 'D01.01'

'S50' = 'EXCLU'

'M00' , 'M05' , 'M08' , 'M85' , 'M86' , 'M89' = 'M00.01'

'M10' = 'M10.01'

'M14' = 'M10.05'

'M15' = 'M15.01'

'M20' = 'M20.01'

'M25' = 'M25.01'

'M30' = 'M30.01'

'M34' = 'M34.01'

'M40' , 'M75' = 'M40.01'

'M45' = 'M45.01'

'M49' = 'M49.01'

'M50' , 'M90' = 'M50.01'

'M54' , 'M94' = 'M54.01'

'M24' , 'M29' , 'M39' , 'M44' , 'M55' , 'M59' ,

'M64' , 'M69' , 'M74' , 'M79' , 'M84' = 'M55.01'

'M60' = 'M60.01'

'M65' = 'M65.01'

'M35' , 'M70' = 'M70.01'

'M80' = 'M80.01'

'S00' , 'S05' , 'S10' = 'S00.01'

'S15' , 'S19' = 'S15.01'

'S25' = 'S25.01'

'S30' = 'S30.01'

'S35' = 'S35.01'

'S40' = 'S40.01'

'S45' = 'S45.01'

'S58' , 'S59' = 'S55.01'

'S24', 'S60' , 'S65' = 'S60.01'

'S70' = 'S70.01'

'S75' = 'S75.01'

'P41' , 'P42' , 'P43' = 'W06.03'

'P00','P10','P20','P30' = 'W10.01'

other = 'EXCLU';

value $remap

'M01' , 'M02' , 'M03' = 'M00'

'M06' , 'M07' = 'M05'

'M11' , 'M12' , 'M13' = 'M10'

'M16' , 'M17' , 'M18' , 'M19' = 'M15'

'M21' , 'M22' , 'M23' = 'M20'

'M26' , 'M27' , 'M28' = 'M25'

'M31' , 'M32' , 'M33' = 'M30'

'M36' , 'M37' , 'M38' = 'M35'

'M41' , 'M42' , 'M43' = 'M40'

'M46' , 'M47' , 'M48' = 'M45'

'M51' , 'M52' , 'M53' = 'M50'

'M56' , 'M57' , 'M58' = 'M55'

'M61' , 'M62' , 'M63' = 'M60'

'M66' , 'M67' , 'M68' = 'M65'

'M71' , 'M72' , 'M73' = 'M70'

'M76' , 'M77' , 'M78' = 'M75'

'M81' , 'M82' , 'M83' = 'M80'

'M87' , 'M88' = 'M85'

'M91' , 'M92' , 'M93' = 'M90'

'S01' , 'S02' , 'S03' = 'S00'

'S06' , 'S07' , 'S08' = 'S05'

'S11' , 'S12' , 'S13' = 'S10'

'S16' , 'S17' , 'S18' = 'S15'

'S21' , 'S22' , 'S23' = 'S20'

'S26' , 'S27' , 'S28' = 'S25'

'S31' , 'S32' , 'S33' = 'S30'

'S36' , 'S37' , 'S38' = 'S35'

'S41' , 'S42' , 'S43' = 'S40'

'S46' , 'S47' , 'S48' = 'S45'

'S51' , 'S52' , 'S53' = 'S50'

'S55' , 'S56' , 'S57' = 'S59'

'S61' , 'S62' , 'S63' = 'S60'

'S66' , 'S67' , 'S68' = 'S65'

'S71' , 'S72' , 'S73' = 'S70'

'S76' , 'S77' , 'S78' = 'S75

other = '???';

value $PU_name

'D01.01' = 'Inpatient Dental treatment (DRGs)'

'M00.01' = 'General Internal Medical Services - Inpatient Services (DRGs)'

'M10.01' = 'Cardiology - Inpatient Services (DRGs)'

'M10.05' = 'Specialist Paediatric Cardiac - Inpatient Services (DRGs)'

'M15.01' = 'Dermatology - Inpatient Services (DRGs)'

'M20.01' = 'Endocrinology & Diabetic - Inpatient Services (DRGs)'

'M25.01' = 'Gastroenterology - Inpatient Services (DRGs)'

'M30.01' = 'Haematology - Inpatient Services (DRGs)'

'M34.01' = 'Specialist Paediatric Haematology - Inpatient Services (DRGs)'

'M40.01' = 'Infectious Diseases (incl Venereology) - Inpatient Services (DRGs)'

'M45.01' = 'Neurology - Inpatient Services (DRGs)'

'M49.01' = 'Specialist Paediatric Neurology Inpatient Services (DRGs)'

'M50.01' = 'Oncology - Inpatient Services (DRGs)'

'M54.01' = 'Specialist Paediatric Oncology - Inpatient Services (DRGs)'

'M55.01' = 'Paediatric Medical - Inpatient Services (DRGs)'

'M60.01' = 'Renal Medicine - Inpatient Services (DRGs)'

'M65.01' = 'Respiratory - Inpatient Services (DRGs)'

'M70.01' = 'Rheumatology (incl Immunology) - Inpatient Services (DRGs)'

'M80.01' = 'Palliative Care - Inpatient Services (DRGs)'

'S00.01' = 'General Surgery - Inpatient Services (DRGs)'

'S15.01' = 'Cardiothoracic - Inpatient Services (DRGs)'

'S25.01' = 'Ear, Nose and Throat - Inpatient Services (DRGs)'

'S30.01' = 'Gynaecology - Inpatient Services (DRGs)'

'S35.01' = 'Neurosurgery - Inpatient Services (DRGs)'

'S40.01' = 'Ophthalmology - Inpatient Services (DRGs)'

'S45.01' = 'Orthopaedics - Inpatient Services (DRGs)'

'S55.01' = 'Paediatric Surgical Services (DRGs)'

'S60.01' = 'Plastic & Burns - Inpatient Services (DRGs)'

'S70.01' = 'Urology - Inpatient Services (DRGs)'

'S75.01' = 'Vascular Surgery - Inpatient Services (DRGs)'

'W10.01' = 'Maternity Inpatient (DRGs)'

'W06.03' = 'Neonatal Inpatient (DRGs)'

other = 'Not a DRG casemix Purchase Unit';

value $cystos

'3681201','3681200','3681501','3683600',

'3683904','3684503','3683902','3684501',

'3684500','3683900','3684505','3684504',

'3684502','3731801','3731500','3682700' = 1

other = 0;

value $notret

'Z530','Z531','Z532','Z538','Z539' = 1

other = 0;

value $error

'960Z', '961Z', '962Z', '963Z' = 'Y'

other = 'N';

value $transp

'A01Z', 'A02Z', 'A03Z', 'A05Z' = 'Y'

other = 'N';

value $COLPO

'3560800','3564600','3564700','3560801',

'3553902','3561100','3553904','3563704',

'3553903','3560802','3561400' = 1

other = 0;

value $ERCPa

'3048400','3048401','3048402','3049400',

'3045200','3048500','3049100','3045202','3045201','3044200',

'3048501','3049101','3045100' = 1

other = 0;

value $COLONsa

'3209000','3208400','3209001','3208401',

'3209300','3208700','9030800','3209400',

'3207500','3207200','3207201','3207501',

'9031200','9031201','3207800','3208100',

'3209900','3210800','9034100','3210500' = 1

other = 0;

value $GASTRa

'4181600','3047303','3047810','4182500',

'4182200','3047304','3047600','3047601',

'3047806','3047809','3047811','3047812',

'3047602','3047813','3047900','3047807',

'3047603','3047300','3047301','3047500',

'3047501','3047803','3209500','3047804',

'3047305','3047306','3047815','3047816','3047817','3047818',

'3047802','3047801' = 1

other = 0;

value $op2test

'3048400','3048401','3048402','3049400',

'3045200','3048500','3049100','3045202','3045201','3044200',

'3048501','3049101','3045100',

'3209000','3208400','3209001','3208401',

'3209300','3208700','9030800','3209400',

'3207500','3207200','3207201','3207501',

'9031200','9031201','3207800','3208100',

'3209900','3210800','9034100','3210500',

'4181600','3047303','3047810','4182500',

'4182200','3047304','3047600','3047601',

'3047806','3047809','3047811','3047812',

'3047602','3047813','3047900','3047807',

'3047603','3047300','3047301','3047500',

'3047501','3047803','3209500','3047804',

'3047305','3047306','3047815','3047816','3047817','3047818',

'3047802','3047801','9250202','9250300',' '= 1

other = 0;

value $BRON

'4188901','4189800','4188900','4189200',

'4189801','4176404','4176403','4184600',

'4184900','4185500','4189500' = 1

other = 0;

value $bone

'1370600','1370606','1370609','1370610'

= 1

other = 0;

value $mechven

'1385700','1387900','1388201' = 1

other = 0;

/*

Formats desage and desfac were put in in order to identify the

combination of a range of Agencies and Facilities that have been identified as the providers through which the MoH and DHBs will monitor its base casemix service agreements. All other facilities (historically designated as "rural") are excluded.

*/

value $desage

'1022','3091','4121','4111','2041',

'3082','3061','4131','4122','4123',

'3092','2031','2042','3081','1011',

'3101','2047','1023','4141','2071',

'2051','2043','3093','1021','0223',

'8630','8656' = 1

other = 0;

value $desfac

'4111','4112','3211','3212','3213',

'3214','3215','3216','3239','5011',

'3311','4911','3411','5311','5312',

'5313','5320','5323','4811','5329',

'4711','4712','3611','3612','5711',

'4311','5511','5812','5816','5811',

'3811','3911','4011','4013','4014',

'3111','5911','4411','4211','4511',

'3250','3220','3221','3240','4113',

'4114','8270','8331','8432','8595',

'8233','8422','8366','8377','8580',

'3313','3314','4212','8507','8462',

'8471','5818','5819','5820','5814',

'8313','8314','8630','8656','3260' = 1

other = 0;

value $matfac

'4111','3215','3216','3213','3214',

'5311','5312','4911','3311','4711',

'5711','3612','5511','4311','5811',

'5812','3811','3911','4014','5911',

'4411','4211','4511','3260' = 'Y'

other = 'N';

run;

options missing = 0;

data test(index = (drg_nz));

length NONMEDSG deshosp BOARDER CANC_OP ERR_DRG XPLANT SPINAL TERMPREG RENAL CHEM_RAD SLEEP LITHO

COLPO CYSTO ERCP COLON GASTRO BRONCHO TRANSFUS base $1;

set &indset;

array px {20} op01-op20; /* load up oper1-20 */

array dx {20} diag01-diag20; /* load up diag1-20 */

drg_nz = drg_42;

*-- Require change in DRG for medical DRGs with code V580--;

radio='N';

drgnumb=input(substr(drg_nz,2),2.);

do i = 1 to 20;

tempx = dx{i} || ' ';

if substr(tempx,1,4) = 'Z510' then radio='Y';

end;

if (radio = 'Y') and (drgnumb ge 60) then drg_nz = 'R64Z';

if substr(diag01,1,4) = 'Z492' then drg_nz='L61Y';

age = intck('year', dob, evendate);

LOS = max(1,min(sum(evendate, -evstdate, -(evntlvd/1)), 365)) ;

*REMAP THE HEALTH SPECIALITY CODES;

if not(put(hlthspec, $remap.) = '???') then hlthspec = put(hlthspec, $remap.);

*BELOW IS INCLUSION RULE FOR NEONATAL INPATIENT (CASEMIX) SERVICES;

if substr(hlthspec,1,1)='P'

and ((hlthspec in ('P41','P42','P43'))

or

(drg_nz in ('P02Z', 'P61Z', 'P62Z', 'P03Z', 'P63Z', 'P64Z', 'P04Z', 'P65A','P65B', 'P65C', 'P65D', 'P05Z', 'P66A', 'P66B', 'P66C', 'P06A','P06B', 'P67B', 'P67A'))

or

(drg_nz in ('P60A', 'P01Z', 'P60B', 'P66D', 'P67C', 'P67D')

and

(diag03 ne ' ' or op01 ne ' ')

))

then NEONATE='Y';

else NEONATE='N';

if hlthspec = 'P50' then NEONATE = 'N'; * specifically exclude this code;

*BELOW IS EXCLUSION RULE FOR NON MEDICAL/SURGICAL SERVICES;

*Exclude maternity only if at non tertiary/secondary facility;

*Determine maternity events but continue to use nonmedsg exclusion;

if (substr(hlthspec,1,1)='P' and (hlthspec ne ‘P50’) and (neonate ='N') and put(facility,$matfac.) = 'Y') then materny = ‘Y’;

else if (substr(hlthspec,1,1)='P' and (hlthspec ne ‘P50’) and (neonate ='N') and put(facility,$matfac.) = 'N') then materny = ‘N’;

else materny = ‘X’;

if ((substr(hlthspec,1,1) in ('D','Y')) or

(materny = ‘N’))

then NONMEDSG='Y';

else NONMEDSG='N';

*DEFINE BASE CONTRACT PAYMENTS;

If compress(purchasr) in ('01','02','03','04','13','20') then base = 'Y';

else base = 'N';

if compress(adm_typ) = 'ZW' then base = 'N';

*BELOW IS EXCLUSION RULE FOR DESIGNATED HOSPITAL PURCHASING;

If (put(agency, $desage.)*put(facility, $desfac.)) then Deshosp = 'Y';

else deshosp='N';

*BELOW ARE EXCLUSION RULES FOR NON-TREATED PATIENTS;

if diag01 in ('Z763','Z764') then BOARDER='Y';

else BOARDER='N';

if (put(diag01, $notret.) + put(diag02, $notret.) +

put(diag03, $notret.) + put(diag04, $notret.) +

put(diag05, $notret.) + put(diag06, $notret.))

and (op01=' ') and (substr(adm_typ,2,1) ne 'C') and (LOS15

and substr(adm_typ,2,1) ne 'C'

and evendate=evstdate then COLPO='Y';

else COLPO='N';

*BELOW IS EXCLUSION RULE FOR CYSTOSCOPIES;

if put(op01, $CYSTOS.)*(put(op02, $CYSTOS.) or op02 in (' ','9250202','9250300'))

and op03 in (' ','9250202','9250300')

and (evendate=evstdate)

and age>15

and substr(adm_typ,2,1) ne 'C' then CYSTO='Y';

else CYSTO='N';

*BELOW IS EXCLUSION RULE FOR ERCPs;

if (put(op01, $ERCPa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then ERCP='Y';

else ERCP='N';

*BELOW IS EXCLUSION RULE FOR COLONOSCOPIES;

if (put(op01, $COLONsa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then COLON='Y';

else COLON='N';

*BELOW IS EXCLUSION RULE FOR GASTROSCOPIES;

if (put(op01, $GASTRa.)*put(op02, $op2test.))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then GASTRO='Y';

else GASTRO='N';

*BELOW IS EXCLUSION RULE FOR BRONCHOSCOPIES;

if (put(op01, $bron.)*((put(op02, $bron.) or op02 in (' ','9250202','9250300'))))

and op03 in (' ','9250202','9250300')

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C'

and age>15 then BRONCHO='Y';

else BRONCHO='N';

*BELOW IS EXCLUSION RULE FOR DAY CASE BLOOD TRANSFUSIONS;

if (diag01='Z513' or (op01 in ('9206000','1370601','1370602','1370603') and

op02 in (' ','9206000','1370601','1370602','1370603') and

op03 =' '))

and evendate=evstdate

and substr(adm_typ,2,1) ne 'C' then TRANSFUS='Y';

else TRANSFUS='N';

*Following 4 exclusions relate to maternity events only;

*Below is Amniocentesis exclusion;

if (materny = ‘Y’ and evstdate=evendate and op01 in ('1660000','1661800','1662100')) then amnio='Y';

else amnio = 'N';

*Below is Chorio Villis Sampling exclusion;

If (materny = ‘Y’ and evstdate=evendate and op01 = '1660300') then chorio = 'Y';

Else chorio = 'N';

*Below is Rhesus Isoimmunisation exclusion;

If (materny = ‘Y’ and evstdate=evendate and substr(diag01,1,4) in ('O360',’O361’)) then rhesus = 'Y';

Else rhesus = 'N';

*Breast feeding/lactation exclusion *;

if ( materny = ‘Y’ and evstdate=evendate and diag01 in ('O9230','O9231','O9240','O9241','O9250','O9251','O9270','O9271'))

then bfl = 'Y';

else bfl = 'N';

*BELOW CREATES A MASTER EXCLUSION VARIABLE TO IDENTIFY ALL EXCLUDED EVENTS;

if NONMEDSG='Y' or Deshosp='N' or BOARDER='Y' or CANC_OP='Y' or ERR_DRG='Y' or XPLANT='Y' or SPINAL='Y' or TERMPREG='Y' or RENAL='Y' or CHEM_RAD='Y' or SLEEP='Y' or LITHO='Y' or COLPO='Y' or CYSTO='Y' or ERCP='Y' or COLON='Y' or GASTRO='Y' or BRONCHO='Y' or TRANSFUS='Y' or base = 'N' or amnio = 'Y' or chorio = 'Y' or rhesus = 'Y' or bfl = 'Y'

then EXCLU='Y';

else EXCLU='N';

*BELOW MAPS EVENTS TO CASEMIX PURCHASED UNITS OR IDENTIFIES AS CASEMIX EXCLUSIONS;

if EXCLU='N' then

do;

if NEONATE='Y' then PU='W06.03';

else pu = put(hlthspec, $newpu.);

end;

else PU='EXCLU';

PU_name=put(PU,$PU_name.);

*BELOW REALLOCATES BONE MARROW TRANSPLANT AN-DRGs;

if drg_nz='A04Z' then

do;

if (put(op01, $bone.) + put(op02, $bone.) + put(op03, $bone.) + put(op04, $bone.)+

put(op05, $bone.) + put(op06, $bone.) + put(op07, $bone.) + put(op08, $bone.)+

put(op09, $bone.) + put(op10, $bone.) + put(op11, $bone.) + put(op12, $bone.)+

put(op13, $bone.) + put(op14, $bone.) + put(op15, $bone.) + put(op16, $bone.)+

put(op17, $bone.) + put(op18, $bone.) + put(op19, $bone.) + put(op20, $bone.))

then DRG_NZ='A04A';

else DRG_NZ='A04B';

end;

proc sort data = cwd.wies8; by vicdrg4;

data &outdset;

merge test (in=wanted)

cwd.wies8 (rename=(vicdrg4=drg_nz)

drop =vicdesc sameday);

by DRG_nz;

if wanted;

*------------------------------------------------------------------*;

*---------- Mechanical ventilation copayments first -----------*;

*------------------------------------------------------------------*;

if evendate < mdy(07,01,1999) then

do;

if drg_nz in ('A01Z', 'A02Z', 'A03Z', 'A04A', 'A04B', 'A05Z', 'A40Z', 'F02Z', 'F40Z', 'L61Y', 'P01Z', 'P02Z', 'P03Z', 'P04Z', 'P05Z', 'P60A', 'P60B', 'P61Z', 'P62Z', 'P63Z', 'P64Z', 'P65A', 'P65B', 'P65C',

'P65D', 'P66A', 'P66B', 'P66C', 'P66D', 'P67A', 'P67B', 'P67C', 'P67D', 'W01Z', '960Z', '961Z')

then adjmvday=0;

else if op01='1388202' or op02='1388202' or op03='1388202' or op04='1388202' or op05='1388202' or op06='1388202' or op07='1388202' or op08='1388202' or op09='1388202' or op10='1388202' or op11='1388202' or op12='1388202' or op13='1388202' or op14='1388202' or op15='1388202'

then adjmvday=5;

else if (put(op01, $mechven.) + put(op02, $mechven.) + put(op03, $mechven.) + put(op04, $mechven.)+ put(op05, $mechven.) + put(op06, $mechven.) + put(op07, $mechven.) + put(op08, $mechven.)+ put(op09, $mechven.) + put(op10, $mechven.) + put(op11, $mechven.) + put(op12, $mechven.)+ put(op13, $mechven.) + put(op14, $mechven.) + put(op15, $mechven.) )

then adjmvday=2;

else if op01='1388200' or op02='1388200' or op03='1388200' or op04='1388200' or op05='1388200' or op06='1388200' or op07='1388200' or op08='1388200' or op09='1388200' or op10='1388200' or

op11='1388200' or op12='1388200' or op13='1388200' or op14='1388200' or op15='1388200'

then adjmvday=1;

else adjmvday=0;

end;

else

do;

if drg_nz in ('A01Z', 'A02Z', 'A03Z', 'A04A', 'A04B', 'A05Z', 'A40Z', 'F02Z', 'F40Z', 'L61Y', 'P01Z', 'P02Z', 'P03Z', 'P04Z', 'P05Z', 'P60A', 'P60B', 'P61Z', 'P62Z', 'P63Z', 'P64Z', 'P65A', 'P65B', 'P65C',

'P65D', 'P66A', 'P66B', 'P66C', 'P66D', 'P67A', 'P67B', 'P67C', 'P67D', 'W01Z', '960Z', '961Z')

then adjmvday=0;

else if (HMVHRS < 6) then adjmvday=0;

else adjmvday=round((HMVHRS+12)/24);

end;

*------------------------------------------------------------------*;

*---------- LOS category and Inlier category ---------*;

*------------------------------------------------------------------*;

** Before value of Inlier is determined need to make adjustment to adjmvday

for those drgs with mv_elig = '4');

if mv_elig = '4' then adjmvday = max(0,adjmvday-4);

if (sum(evendate, -evstdate, -(evntlvd/1)) lt lb) then inlier='L';

else if (sum(evendate, -evstdate, -(evntlvd/1)) gt sum(HB, adjmvday)) then inlier='H';

else inlier='I';

if evstdate=evendate then los_cat = 'S';

else if (sum(evendate, -evstdate, -(evntlvd/1)) 0) then mv_copay = adjmvday *0.7729;

else mv_copay = 0;

end;

when ('E')

do;

*--- Check for neonate mechanical ventilation ---*;

do i = 1 to 20;

if (substr(px(i),1,7) = '1388202') then nmvsepn = 1;

end;

if (nmvsepn = 1) then

do;

adjmvday= 0;

mv_copay = 3.1323;

end;

else

do;

adjmvday = 0;

mv_copay = 0;

end;

end;

when ('4')

if (hmvhrs gt 96) then

do;

/* adjmvday= sum(adjmvday, -4); */

mv_copay = adjmvday *0.7729;

end;

else

do;

adjmvday = 0;

mv_copay = 0;

end;

otherwise

do;

adjmvday = 0;

mv_copay = 0;

end;

end;

*------------------------------------------------------------------*;

*---------- Box 3c: Calculate Base WIES -----*;

*------------------------------------------------------------------*;

select (Inlier);

when ('L')

do; *---- Same day cases --;

select (los_cat);

when ('S') wies8 = sd;

when ('O') wies8 = od;

when ('M') wies8 = los * lo_pd;

otherwise wies8 = 0;

end;

if md_in gt 0 then ies= wies8 / md_in;

else ies=0;

high_day = 0;

hiwies = 0;

end;

when ('I')

do; *---- Inlier calculations --;

select (los_cat);

when ('S') wies8 = sd;

when ('O') wies8 = od;

when ('M') wies8 = md_in;

otherwise wies8 = 0;

end;

ies= 1;

high_day=0;

hiwies = 0;

end;

when ('H')

do; *---- high outlier calculations --;

high_day = max(0,sum(los,-hb,-adjmvday));

hiwies = high_day * ho_pd ;

wies8 = md_in + hiwies;

if md_in gt 0 then ies= wies8 / md_in;

else ies=1;

end;

Otherwise

do;

high_day=0;

wies8=0;

ies=0;

end;

end;

*------------------------------------------------------------------*;

*---------- Box 5: Total WIES -----*;

*------------------------------------------------------------------*;

wies8c = sum(wies8, mv_copay);

*

* Clean up temporary datasets

*

*;

proc datasets library=work;

delete test;

run;

options mlogic mrecall details merror mprint symbolgen;

%mend w8CICD10;

-----------------------

[1] Financial Years run from 1 July through to 30 June of the following calendar year and are abbreviated by stringing together the last two digits of the portions of calendar years in question, i.e. 98/99, 99/00, 00/01 represent the 3 consecutive financial years from 1 July 1998 through 30 June 2001.

[2] Two slightly different DRG versions are in use within the methodology. The DRG version currently in use within the NZ health sector is AR-DRG version 4.2 and all DRG tests on NMDS events refer to this version. However, for the purposes of applying costweights, some AR-DRGs are not clinically homogeneous and in these cases an AR-DRG may be reallocated to a different ‘WIES’ DRG. The WIES DRGs contain all the AR-DRGs as well as two additional DRG codes (not used in AR-DRG) for the purpose of applying the appropriate costweights to NMDS events.

[3] Costweights Project Group, , “National Service Framework Project: Report of the Costweights Project Group”, Ministry of Health, 23 March 2001 (available on Ministry of Health Website)

[4] This adjustment was added on 3 August 2001 by NZHIS. The adjustment was already in the SAS program but had been omitted from this documentation.

[5] This was changed to greater than or equal to 6 on 1 October 2001.

[6] This was changed on 10 October 2001. It was less than one.

[7] This was changed on 10 October 2001 to be less than or eq 1, prior to that it was eq 1.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches