Health

Research articles · Jun 3, 2026

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

Caroline Strickland, Brittin Wagner, Stanley Wang, Daniel J Lizotte

University of Western Ontario, London, Canada; PointClickCare, Ontario, Canada

Volume 19(1) Spring 2026

Cite as: C. Strickland, B. Wagner, S. Wang, D. 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

Abstract

We introduce SNFsim, an open-source discrete-event simulator for developing and evaluating reinforcement learning (RL) methods for multi-dimensional sequential decision support in Skilled Nursing Facilities (SNFs). SNFs play a vital role in the United States healthcare system, delivering specialized care to individuals with ongoing medical needs. Decision-making within SNFs is often complex due to their fast-paced and stochastic nature. SNFsim provides a modular and extendable simulation of major decision-making processes within SNFs, capturing many of the complexities and uncertainties existing in healthcare environments while still being flexible enough to allow for easy customization. Its potential uses are two-fold: First, as a test bed for the development and comparison of RL algorithms, and second, as the basis of a decision-support system that can be tailored to individual SNFs.

This article contains 13 figures and 20 tables.

Figures

Figure 1. Skilled nursing intake flow and staffing process.
Figure 2. Code snippet demonstrating an example setup for training an RL agentusing SNFsim.
Figure 3. Simplified SNFsim simulation step.
Figure 4. Patient information typically available to the SNF at the point of referral.
Figure 5. Bivariate relationships between a subset of columns in the generated dataset versus the original dataset.
Figure 6. SNF intake flow and joint staffing decision process.
Figure 7. Random Forest model performance for patient rehospitalization prediction.
Figure 8. Performance comparison of five rollouts between P1 and P2 in the snf_v0 environment.
Figure 9. Performance comparison of five rollouts between P1 and P2 in the snf_v0 environment.
Figure 10. PPO agent training performance under varied weight configurations across 200,000 timesteps.
Figure A1. PDPM HIPPS code classification build sample.
Figure A2. Example of the ICD-10-CM hierarchy for a specific cholera diagnosis.
Figure A3. 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%
Algorithm 1 Temporal Day in SNFsim (broad visual representation in Figure 3).
1: Input: State St={Pt,Ot,Ht,Ct,Rt}, Action at={At,Δt}
2: Output: Next state St+1={Pt+1,Ot+1,Ht+1,Ct+1,Rt+1}
3: where:Pt: patients, Ot: occupancy, Ht: nursing hours, Ct: finances, Rt: referrals
4: Initialize daily metrics: Revenuet←0, Rehospitalizationst←0, Costt←0
5: // Update staffing levels based on action
6: for each staff type s∈{FullTime,PRN,Agency} do
7:    Staffts←min(Stafft−1s+Δts,%MaxStaffs) {Enforce staffing constraints}
8:    Costt←Costt+∑i=13Staffts[i]⋅Hourss⋅Rates
9: end for
10: // Process referrals
11: Pnew← Accept referrals based on At (0 or 1 for each referral in Rt) and bed availability Bmax
12: // Calculate nursing hours per patient
13: h→t← Nursing hours per patient per shift
14: αt← Staffing modifier based on ratio of actual to expected care
15: // Update patients and compute rehospitalizations
16: Premove←∅
17: for each patient p∈Pt do
18:    Update patient day count, accumulate revenue, and record nursing hours received
19:    Calculate shift-specific understaffing penalties ϵ→
20:    p.r← Rehospitalization risk based on patient data, staffing, and care quality
21:    if p.r>threshold then
22:      Mark patient for rehospitalization and update count
23:    end if
24: end for
25: Update patient population: Pt+1←(Pt∖Premove)∪Pnew
26: Update occupancy:
27:    Ot+1←|Pt+1|Bmax {Occupancy as proportion of available beds}
28: Update finances:
29:    Ct+1←Ct+Revenuet−Costt
30: Set next-day nursing hours:
31:    Ht+1←Ht {Staffing decision at time t determines hours for day t+1}
32: Generate new referrals for next day: Rt+1
33: ReturnSt+1={Pt+1,Ot+1,Ht+1,Ct+1,Rt+1}
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

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

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