*This is a real, de-identified, clinical dataset. The use of these data for this competition has been reviewed and deemed not human subjects research by the Institutional Review Board at Washington University in St Louis (approval numbers 202204007 and 202202087). The data is intended for educational use only, and any other use is prohibited.*

## The Data
Results for all PTHrP orders since 2012 were retrieved from the laboratory information system along with all other results that would have been available at the time of the PTHrP order. For patients that had multiple PTHrP orders, we retained only the first order and its associated data. The data has been de-identified to protect the privacy of the patients, physicians, and institutions, but otherwise appears as it would in our laboratory information system, without additional cleaning or preprocessing. That part will be up to you!

Each row of the data represents a single laboratory result, and the columns are explained below. 

## The Target
You should be predicting the PTHrP result as a binary classification, normal or abnormal, where abnormal is defined as above the reference range. Note that the reference range changed during this study period, as displayed in the **REFERENCE_RANGE** column. Your predictions should encode normal PTHrP results as 0, and abnormal results as 1.

## The Features
You decide! We have provided an enormous feature space on which you can experiment. Use your domain expertise, favorite feature selection algorithms, and your creativity to engineer the best possible set of features to produce your predictions. 

If you are unsure of where to start, take a look at the example we have provided on the [*Code*](https://www.kaggle.com/competitions/aacc-2022-predicting-pthrp-results/code) page. This example uses some markers in calcium homeostasis and a boosted tree model to make predictions. This is meant to act as a guide, but there is plenty of optimization that can be done to improve the performance. 

## The Files

*   **input_data.txt** - A tab-separated, flat file containing the laboratory results available for each patient prior to the first PTHrP order, as described above. 
*   **PTHrP_train_results.txt** - The results of each PTHrp order for the training samples. Use this file to build and validate your models. This also contains some additional information about the PTHrP orders that might prove useful.
*   **PTHrP_test_results_masked.txt** - The results file for the testing set. Your submission file should contain one prediction for each of the orders in this file. A random subset of these will be graded and used for the final standings. 
*   **submission_template.csv** - a sample submission file in the correct format.

## Columns

*   `PATIENT_ID` - anonymized ID unique to each patient in the data. 
*   `ORDERABLE` - panel from which the lab was ordered (e.g. CBC, BMP). 
*   `TASK_ASSAY` - the discrete lab assay (e.g. hemoglobin, sodium). 
*   `RESULT_VAL` - the numeric or character result of a task_assay (e.g. 12.5, 141).
*   `RESULT_UNITS` - units for the corresponding result (e.g. g/dL, mmol/L).
*   `NORMAL_LOW` - the lower limit of normal for this result from our LIS.  
*   `NORMAL_HIGH` - the upper limit of normal for this result from our LIS. 
*   `NORMALCY` - a column that holds flags for high, low, abnormal, and critical results based on LIS rules.
*   `RESULT_STATUS` - the step in the final verification process for each result. 
*   `ORDER_STATUS` - whether the order was completed, modified, or canceled. 
*   `ORDER_PROVIDER` - an anonymized ID for the provider who placed the order in our EMR.
*   `ORDER_DT_TM` - the time that the order was placed in the EMR.
*   `PERFORMED_DT_TM` - the time that the test was performed and first resulted back to the EMR. 

*Additional columns in the results files*

*   `REFERENCE_RANGE` - the normal range for that particular result, either <2.0 or <=4.2 pmol/L.
*   `MEDICAL_SERVICE` - the service linked to the encounter from which the order is placed (e.g. Medicine, Surgery, Emergency). 
*   `ENCOUNTER_TYPE` - the type of encounter from which the order was placed (e.g. Inpatient, Outpatient, Emergency). 