1. Health
Download icon

SNFsim: A Discrete Event Simulator for Decision Support in Skilled Nursing Facilities

  1. Caroline Strickland  Is a corresponding author
  2. Brittin Wagner
  3. Stanley Wang
  4. Daniel J Lizotte
  1. Department of Computer Science, Canada
  2. PointClickCare, Canada
  3. Department of Epidemiology and Biostatistics, Canada
Research article
Cite this article as: C. Strickland, B. Wagner, S. Wang, D. J Lizotte; 2026; SNFsim: A Discrete Event Simulator for Decision Support in Skilled Nursing Facilities; International Journal of Microsimulation; 19(1); 79-112. doi: 10.34196/ijm.00337
13 figures and 19 tables

Figures

Skilled nursing intake flow and staffing process.

The red circled numbers denote the temporal ordering of the referral process, starting at the hospital and ending with a patient accepting an offer from a nursing facility. The green circled numbers denote the temporal ordering of a scheduling coordinator making staffing decisions. It is important to note that the intake flow and staffing process occur at different times.

Code snippet demonstrating an example setup for training an RL agentusing SNFsim.
Simplified SNFsim simulation step.

We assume preset configuration values. Algorithm 1 presents an equivalent but more granular presentation of a simulation step.

Patient information typically available to the SNF at the point of referral.
Bivariate relationships between a subset of columns in the generated dataset versus the original dataset.

(a) Age distribution by gender. (b) LoS distribution by age group.

SNF intake flow and joint staffing decision process.

The red circled numbers denote the temporal ordering of a referral, beginning at the hospital and concluding with a patient accepting an offer from a nursing facility. This is abstracted, and is assumed rather than implemented within SNFsim. The blue circled numbers denote the temporal ordering of a referral within SNFsim, beginning with an empirically sampled referral and concluding with the SNF accepting the referral. The green circled numbers represent the temporal ordering of a simplified staffing decision process within SNFsim, beginning with assessment of the care needs of current inpatients and concluding with increasing, decreasing, or not altering current staffing hours.

Random Forest model performance for patient rehospitalization prediction.

ROC curve (AUC = 0.921) shows excellent discrimination between rehospitalized and non-rehospitalized patients. Precision-Recall curve (average precision = 0.592) demonstrates strong performance relative to baseline prevalence of 7.4%. The model substantially outperforms logistic regression (AUC = 0.867) using the same feature set.

Performance comparison of five rollouts between P1 and P2 in the snf_v0 environment.
Performance comparison of five rollouts between P1 and P2 in the snf_v0 environment.
PPO agent training performance under varied weight configurations across 200,000 timesteps.

Objective weights follow the order [reimbursement, nursing costs, rehospitalization, occupancy]. (a) Balanced approach with uniform weights [1.0, 1.0, 1.0, 1.0]. (b) Care optimization with weights [0.4, 0.4, 1.6, 1.6], emphasizing rehospitalization minimization and occupancy management while de-emphasizing financial metrics. (c) Financial optimization with weights [1.6, 1.6, 0.4, 0.4], prioritizing reimbursement maximization and nursing cost minimization over patient care and facility occupancy. The theoretical summed reward range is [-4, 4].

PDPM HIPPS code classification build sample.
Example of the ICD-10-CM hierarchy for a specific cholera diagnosis.

This hierarchy tree demonstrates that a cholera diagnosis falls under chapter 1 (certain infectious and parasitic diseases), section A00- A09 (intestinal infectious diseases), category A00 (cholera), and could ultimately be one of codes A00.0, A00.1, or A00.9 (biovar cholerae, biovar eltor, or unspecified). Beginning from the top layer and descending, there is an increase in group specificity.

Flow of environment for the snf_v0 Gymnasium environment.

Tables

Table 1
Marginal similarity between original and synthetic data including the metrics mean diff (percentage difference in means), KDE Sim (kernel density overlap), TV dist (total variation distance), JS sim (Jensen-Shannon similarity), and cov (category coverage).
VariableMean Diff.KDE Sim.TV Dist.JS Sim.Cov.
Continuous:
Age0.02%88.1%
Length of Stay13.8%92.4%
Categorical:
ICD-10-CM0.19479.1%78.7%
Insurance Type0.15083.6%100%
PDPM Code0.13883.4%98.2%
Gender0.08087.2%100%
Table 2
Multivariate Logistic Regression Results
Model AModel BModel CModel D
FeatureCoef.PCoef.PCoef.PCoef.P
LoS-3.173***-3.180***-3.193***
meanHours-0.216***-0.215***
reimbursement+0.188***-0.344*-0.329*
age-0.028-0.005-0.005
NPG-0.230***-0.274***-0.293***
SLP+0.077+0.100+0.083
PT_OT+0.033+0.035
NTA_0.448**_0.428**
days_since_start+0.052
gender+0.017
Additional categorical features in Model D (not included):
ICD-10-CM Chapter (***), facility, insurance type
Number of features23813
AUC-ROC0.5500.8670.8730.867
Max VIF14.72.133.336.6
  1. Model D contains full feature set used in Random Forest (RF AUC=0.921 vs. Logistic Regression AUC=0.867). ***p < 0.001, **p < 0.01, *p < 0.05. N=7,948; 588 (7.4%) readmissions.

Table 3
Required SNF Configuration Parameters
ParameterDescriptionDefault Value
total_bedsNumber of beds in the facility100
occupancy_boundsTarget min/max occupancy range75%/90%
nursing_hours_targetTarget min/max nursing hours per patient2.5/3.5
full_time_cnaTotal available full-time nursing assistants20
prn_cnaTotal available pro re nata (as-needed) staff10
agency_cnaTotal available agency-contracted staff15
referral_rateMean number of daily referrals5
min_cna_hoursMandated nursing hours per patient day2.8
fac_stateState where the SNF is locatedNew York
readmission_thresholdThreshold for readmission prediction0.7
Table 4
Summary of training performance across different PPO weight configurations.
MetricBalancedFinancial FocusCare Focus
Weights[1.0, 1.0, 1.0, 1.0][1.6, 1.6, 0.4, 0.4][0.4, 0.4, 1.6, 1.6]
Average Reward1.410.402.54
First Quarter Avg1.070.131.88
Last Quarter Avg1.530.532.94
Improvement (%)42.74%312.67%56.00%
Trend Slope0.59820.53071.3929
Table 5
Outcomes by policy configuration over 10 different 365-day episodes. Weight vectors indicate a priori selection of importance for [reimbursement, nursing cost, rehospitalization, occupancy] objectives.
MetricBalancedFinancial FocusCare Focus
Weights[1.0, 1.0, 1.0, 1.0][1.6, 1.6, 0.4, 0.4][0.4, 0.4, 1.6, 1.6]
Occupancy Rate55.62% ± 0.24%53.89% ± 0.20%72.97% ± 0.39%
Rehospitalization Rate37.3% ± 4.1%42.8% ± 3.6%13.6% ± 3.4%
Referral Acceptance Rate80.0%100.0%60.1%
Daily Revenue$31, 618 ± $131$32, 199 ± $13638, 467 ± $141
Daily Cost$6, 938 ± $1.81$6, 922 ± $1.75$9, 933 ± $1.44
Daily Profit$24, 680$25,277$28,534
Table A1
PDPM payment groups to code value.
PT/OTSLPNURSNPGCode Value
TASAES3NAA
TBSBES2NBB
TCSCES1NCC
TDSDHDE2NDD
TESEHDE1NEE
TFSFHBC2NFF
TGSGCBC2G
THSHCA2H
TISICBC1I
TJSJCA1J
TKSKBAB2K
TLSLBAB1L
TMHBC1M
TNLDE2N
TOLDE1O
TPLBC2P
LBC1Q
CDE2R
CDE1S
PDE2T
PDE1U
PBC2V
PA2W
PBC1X
PA1Y
Table A2
PT and OT case mix groups and PT and OT CMIs based on clinical category and PT and OT function score.
Clinical CategoryPT & OT Function ScorePT & OT Case Mix GroupPT CMIOT CMI
Major Joint Replacement or Spinal Surgery0-5TA1.531.49
Major Joint Replacement or Spinal Surgery6-9TB1.691.63
Major Joint Replacement or Spinal Surgery10-23TC1.881.68
Major Joint Replacement or Spinal Surgery24TD1.921.53
Other Orthopedic0-5TE1.421.41
Other Orthopedic6-9TF1.611.59
Other Orthopedic10-23TG1.671.64
Other Orthopedic24TH1.161.15
Medical Management0-5TI1.131.17
Medical Management6-9TJ1.421.44
Medical Management10-23TK1.521.54
Medical Management24TL1.091.11
Non-Orthopedic Surgery and Acute Neurologic0-5TM1.271.30
Non-Orthopedic Surgery and Acute Neurologic6-9TN1.481.49
Non-Orthopedic Surgery and Acute Neurologic10-23TO1.551.55
Non-Orthopedic Surgery and Acute Neurologic24TP1.081.09
Table A3
PDPM assessment type to code value.
Assessment TypeCode Value
Initial Patient Assessment0
PPS 5-Day Assessment1
Table A4
PT and OT case mix groups and PT and OT CMIs based on clinical category and PT and OT function score.
Clinical CategoryPT & OT Function ScorePT & OT Case Mix GroupPT CMIOT CMI
Major Joint Replacement or Spinal Surgery0-5TA1.531.49
Major Joint Replacement or Spinal Surgery6-9TB1.691.63
Major Joint Replacement or Spinal Surgery10-23TC1.881.68
Major Joint Replacement or Spinal Surgery24TD1.921.53
Other Orthopedic0-5TE1.421.41
Other Orthopedic6-9TF1.611.59
Other Orthopedic10-23TG1.671.64
Other Orthopedic24TH1.161.15
Medical Management0-5TI1.131.17
Medical Management6-9TJ1.421.44
Medical Management10-23TK1.521.54
Medical Management24TL1.091.11
Non-Orthopedic Surgery and Acute Neurologic0-5TM1.271.30
Non-Orthopedic Surgery and Acute Neurologic6-9TN1.481.49
Non-Orthopedic Surgery and Acute Neurologic10-23TO1.551.55
Non-Orthopedic Surgery and Acute Neurologic24TP1.081.09
Table A5
SLP case mix groups and SLP CMIs based on whether patient has a mechanically altered diet or swallowing disorder and the presence of acute neurological conditions, SLP-related comorbidity, or cognitive impairment.
Condition*Mechanically Altered Dietor Swallowing DisorderSLP Case Mix GroupSLP CMI
NoneNeitherSA0.68
NoneEitherSB1.82
NoneBothSC2.66
Any OneNeitherSD1.46
Any OneEitherSE2.33
Any OneBothSF2.97
Any TwoNeitherSG2.04
Any TwoEitherSH2.85
Any TwoBothSI3.51
All ThreeNeitherSJ2.98
All ThreeEitherSK3.69
All ThreeBothSL4.19
  1. *

    Presence of Acute Neurological Condition, SLP-Related Comorbidity, or Cognitive Impairment.

Table A6
Nursing payment group (CMG) and corresponding CMIs based on RUG-IV Nursing RUG, extensive services status, clinical conditions, depression status, and restorative nursing services.
RUG-IV Nursing RUGExtensive ServicesClinical ConditionsDepressionRNSFunction ScoreCMGCMI
ES3Trach & Ventilator0-14ES34.04
ES2Trach or Ventilator0-14ES23.06
ES1Infection Isolation0-14ES12.91
HE2/HD2SMCYes0-5HDE22.39
HE1/HD1SMCNo0-5HDE11.99
HC2/HB2SMCYes6-14HBC22.23
HC1/HB1SMCNo6-14HBC11.85
LE2/LD2RMCYes0-5LDE22.07
LE1/LD1RMCNo0-5LDE11.72
LC2/LB2RMCYes6-14LBC21.71
LC1/LB1RMCNo6-14LBC11.43
CE2/CD2CRCYes0-5CDE21.86
CE1/CD1CRCNo905CDE11.62
CC2/CB2CRCYes6-14CBC21.54
CA2CRCYes15-16CA21.08
CC1/CB1CRCNo6-14CBC11.34
CA1CRCNo15-16CA10.94
BB2/BA2BCS2+11-16BAB21.04
BB1/BA1BCS0-111-16BAB10.99
PE2/PD2ADL2+0-5PDE21.57
PE1/PD1ADL0-10-5PDE11.47
PC2/PB2ADL2+6-14PBC21.21
PA2ADL2+15-16PA20.7
PC1/PB1ADL0-16-14PBC11.13
PA1ADL0-115-16PA10.66
Table A7
Non-Therapy Ancillaries (NTA) CMIs based on NTA case mix groups and NTA score ranges.
NTA Score RangeNTA Case Mix GroupCMI
12+NA3.25
9-11NB2.53
6-8NC1.85
3-5ND1.34
1-2NE0.96
0NF0.72
Table A8
Urban rate components.
Rate ComponentPTOTSLPNursingNTANon-Case-Mix (NCM)
Per Diem Amount$62.84$58.49$23.46$109.55$82.64$98.10
Table A9
Rural rate components.
Rate ComponentPTOTSLPNursingNTANon-Case-Mix (NCM)
Per Diem Amount$71.63$65.79$29.56$104.66$78.96$99.91
Table A10
Day in stay adjustment factor.
Day in StayAdjustment Factor
1-201.00
21-270.98
28-340.96
35-410.94
42-480.92
49-550.90
56-620.88
63-690.86
70-760.84
77-830.82
84-900.80
91-970.78
98-1500.76
Table A11
NTA component adjustment factor.
Day in StayAdjustment Factor
1-33.00
4-1501.00
Table A12
Estimated Hourly Wages for Full-time, PRN, and Agency CNAs by State based on (Nursa, 2024).
StateFull-time CNA ($/hr)PRN CNA ($/hr)Agency CNA ($/hr)
Alabama15.0418.0520.30
Alaska22.6327.1630.55
Arizona19.6923.6326.58
Arkansas15.4118.4920.80
California22.6327.1630.55
Colorado20.9525.1428.28
Connecticut20.7024.8427.95
Delaware18.5722.2825.07
Florida17.6721.2023.85
Georgia16.7720.1222.64
Hawaii21.6325.9629.20
Idaho17.9221.5024.19
Illinois19.8723.8426.82
Indiana18.1021.7224.44
Iowa18.4522.1424.91
Kansas17.3220.7823.38
Kentucky17.3020.7623.36
Louisiana14.6317.5619.75
Maine20.6524.7827.88
Maryland19.6023.5226.46
Massachusetts21.2225.4628.65
Michigan18.7122.4525.26
Minnesota19.4023.2826.19
Mississippi12.3514.8216.67
Missouri15.0718.0820.34
Montana16.8320.2022.72
Nebraska17.0020.4022.95
Nevada19.8923.8726.85
New Hampshire20.3624.4327.49
New Jersey19.0222.8225.68
New Mexico16.2019.4421.87
New York19.5623.4726.41
North Carolina16.2419.4921.92
North Dakota18.3322.0024.75
Ohio16.0519.2621.67
Oklahoma13.3916.0718.08
Oregon18.6722.4025.20
Pennsylvania17.2320.6823.26
Rhode Island19.3923.2726.18
South Carolina15.4718.5620.88
South Dakota14.9017.8820.12
Tennessee15.5618.6721.01
Texas16.9420.3322.87
Utah16.1219.3421.76
Vermont18.6022.3225.11
Virginia17.1020.5223.09
Washington20.8024.9628.08
West Virginia14.2217.0619.20
Wisconsin17.5821.1023.73
Wyoming17.3820.8623.46
Table A13
ICD-10-CM Chapters and corresponding categories.
ChapterTitleCategories
1Certain Infectious and Parasitic DiseasesA00-B99
2NeoplasmsC00-D49
3Diseases of the Blood and Blood-Forming OrgansD50-D89
4Endocrine, Nutritional, and Metabolic DiseasesE00-E89
5Mental, Behavioral, and Neurodevelopmental DisordersF01-F99
6Diseases of the Nervous SystemG00-G99
7Diseases of the Eye and AdnexaH00-H59
8Diseases of the Ear and Mastoid ProcessH60-H95
9Diseases of the Circulatory SystemI00-I99
10Diseases of the Respiratory SystemJ00-J99
11Diseases of the Digestive SystemK00-K95
12Diseases of the Skin and Subcutaneous TissueL00-L99
13Diseases of the Musculoskeletal System and Connective TissueM00-M99
14Diseases of the Genitourinary SystemN00-N99
15Pregnancy, Childbirth, and the PuerperiumO00-O9A
16Certain Conditions Originating in the Perinatal PeriodP00-P96
17Congenital Malformations, Deformations, and Chromosomal AbnormalitiesQ00-Q99
18Symptoms, Signs, and Abnormal Clinical and Laboratory FindingsR00-R99
19Injury, Poisoning, and Certain Other Consequences of External CausesS00-T88
20External Causes of MorbidityV00-Y99
21Factors Influencing Health Status and Contact with Health ServicesZ00-Z99
22Codes for Special PurposesU00-U85, U89
Table A14
PPO Hyperparameters
HyperparameterValue
Learning rate (α)3 × 10-4
Batch size64
Steps per update2048
Epochs per batch10
Clipping parameter (ε)0.2
Max gradient norm0.5
Discount factor (γ)0.99
GAE λ0.95
Entropy coefficient0.01
Total timesteps200,000
Policy architectureMultiInputPolicy

Data and code availability

The raw data sets analyzed during this study are not publicly available as they are proprietary. However, synthetic data generated in this paper is included in the base repository. The base SNFsim code is available at https://github.com/Scorks/SNFsim.

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Download citations (links to download the citations from this article in formats compatible with various reference manager tools)

Open citations (links to open the citations from this article in various online reference manager services)