Enrollment¶
The enrollment module handles continuous enrollment validation, gap analysis, and censoring date calculation for survival analysis.
When to Use¶
Use the enrollment module when you need to:
- Validate continuous enrollment for a patient cohort
- Calculate enrollment gaps and identify drop-outs
- Determine censoring dates for survival analysis
- Apply enrollment-based inclusion criteria
Integrated with Cohort Module
When you use EnrollmentCriteria in get_cohort(), enrollment analysis is handled automatically. Use this module directly for custom enrollment analysis or when working outside the cohort workflow.
Quick Example¶
from alx_heor.database import RedshiftConnection
from alx_heor.enrollment import (
get_enrollment,
calculate_enrollment_gaps,
filter_continuous_enrollment,
get_censor_dates,
)
conn = RedshiftConnection().connect()
# Get enrollment data for a cohort
df_enroll = get_enrollment(
conn,
source="iqvia",
schema="iqvia_pharmetrics_2024q3",
patient_ids=df_cohort["pat_id"].tolist(),
start_year=2015,
end_year=2024,
)
# Calculate gaps relative to index date
df_gaps = calculate_enrollment_gaps(
df_enroll,
df_cohort,
patient_id_col="pat_id",
index_date_col="index_date",
months_pre=6,
months_post=12,
)
# Filter to continuous enrollment (max 1 month gap)
df_continuous = filter_continuous_enrollment(df_gaps, max_gap=1)
# Get censoring dates for survival analysis
df_censor = get_censor_dates(
df_gaps,
study_end="2024-03-31",
max_gap_for_censor=3,
)
Common Patterns¶
High-Level Enrollment Analysis¶
from alx_heor.enrollment import analyze_enrollment
# All-in-one function
result = analyze_enrollment(
conn,
df_cohort,
source="iqvia",
schema="iqvia_pharmetrics_2024q3",
months_pre=6,
months_post=12,
max_gap=1,
study_end="2024-03-31",
)
# Access results
df_enrolled = result.df_enrolled # Patients with continuous enrollment
df_censor = result.df_censor # Censoring dates
Censoring for Survival Analysis¶
# Calculate censoring dates
# Patients are censored at the earlier of:
# 1. First enrollment gap > 3 months
# 2. Study end date
df_censor = get_censor_dates(
df_gaps,
study_end="2024-03-31",
max_gap_for_censor=3,
)
# Merge with cohort for survival analysis
df_survival = df_cohort.merge(df_censor, on="pat_id")
df_survival["follow_up_days"] = (
df_survival["censor_date"] - df_survival["index_date"]
).dt.days
Related Modules¶
cohort- Uses enrollment viaEnrollmentCriteriaclaims- Claims data accessconfig- Enrollment table patterns
enrollment ¶
Enrollment and censoring utilities for longitudinal RWE studies.
This module handles one of the most critical aspects of retrospective database studies: ensuring patients are continuously observable throughout the study period. Without continuous enrollment, patients may appear to have no healthcare utilization when they've actually just left the database - a major source of bias.
Key Concepts:
Enrollment: In claims databases, patients are only observable when they have active insurance coverage captured in the database. Enrollment data tracks which months each patient was "enrolled" (observable).
Continuous enrollment: A requirement that patients have uninterrupted enrollment for a specified period (e.g., 6 months before index, 12 months after). Small gaps (1 month) are often allowed due to data processing delays.
Enrollment gap: A period where a patient has no enrollment record. Large gaps (>1-3 months) suggest the patient left the database and may bias outcome assessment.
Censoring: In survival analysis, patients are "censored" when they become unobservable (enrollment gap or study end). Censoring dates are essential for time-to-event analyses.
Why Enrollment Matters:
False negatives: A patient without claims might be healthy OR might have dropped enrollment. Without enrollment checks, you can't tell the difference.
Baseline assessment: To assess comorbidities/exclusion criteria, patients must be observable before index date.
Follow-up assessment: To measure outcomes, patients must remain observable after index date.
Survival analysis: Censoring must occur at enrollment loss, not just study end.
Core Functions:
- get_enrollment: Fetch enrollment data from database
- calculate_enrollment_gaps: Identify enrollment gaps relative to index date
- filter_continuous_enrollment: Select patients meeting enrollment requirements
- get_censor_dates: Calculate censoring dates for survival analysis
- analyze_enrollment: High-level workflow combining all steps
Typical Workflow:
- Build initial cohort with
cohort.get_cohort()(already includes enrollment if specified) - OR use these functions directly for custom enrollment analysis: a. get_enrollment() - Fetch raw enrollment data b. calculate_enrollment_gaps() - Identify gaps c. filter_continuous_enrollment() - Apply requirements d. get_censor_dates() - Calculate censoring for survival analysis
Example
from alx_heor.enrollment import ( ... get_enrollment, ... calculate_enrollment_gaps, ... filter_continuous_enrollment, ... get_censor_dates, ... ) df_enroll = get_enrollment( ... conn, ... source='iqvia', ... schema='iqvia_pharmetrics_2024q3', ... patient_ids=df_cohort['pat_id'].tolist(), ... start_year=2015, ... end_year=2024, ... ) df_gaps = calculate_enrollment_gaps( ... df_enroll, ... df_cohort, ... patient_id_col='pat_id', ... index_date_col='index_date', ... months_pre=6, ... months_post=12, ... ) df_continuous = filter_continuous_enrollment(df_gaps, max_gap=1) print(f"Patients with continuous enrollment: {df_continuous['pat_id'].nunique():,}") df_censor = get_censor_dates( ... df_gaps, ... study_end='2024-03-31', ... max_gap_for_censor=3, ... patient_id_col='pat_id', ... ) print(f"Median follow-up: {df_censor['days_to_censor'].median():.0f} days")
See Also
cohort.get_cohort : High-level cohort function (includes enrollment if specified) cohort.EnrollmentCriteria : Enrollment requirements for get_cohort()
Notes
- IQVIA enrollment tables: enroll2_2006 through enroll2_2025
- Enrollment is stored by month (month_id = YYYYMM format)
- A gap of 1 month is often allowed (data processing delays)
- Censoring at enrollment loss is critical for unbiased survival analysis
IQVIA Patient ID Pitfall:
IQVIA has two patient ID columns that can cause confusion:
- pat_id: The primary identifier used in claims tables (claims_YYYY) and enrollment tables (enroll2_YYYY). Always use this for joins.
- iq_patient_id: A secondary identifier found only in the
enrolltable (not enroll2_YYYY). Legacy code sometimes uses this for patient-level grouping after joining claims toenrollto get demographics.
When joining claims to enrollment data, always use pat_id. Using iq_patient_id
for claims joins will produce empty results because claims tables don't have
this column.
EnrollmentResult
dataclass
¶
Result from enrollment analysis.
Attributes:
| Name | Type | Description |
|---|---|---|
df_enrollment |
DataFrame
|
Raw enrollment data with patient_id and month_id. |
df_gaps |
DataFrame
|
Enrollment with gap calculations. |
df_continuous |
DataFrame
|
Patients meeting continuous enrollment criteria. |
df_censor |
DataFrame
|
Censoring dates for each patient. |
attrition |
dict[str, int]
|
Attrition counts at each filtering step. |
Source code in alx_heor\enrollment\__init__.py
summary ¶
Generate human-readable summary of enrollment analysis.
Source code in alx_heor\enrollment\__init__.py
get_enrollment ¶
get_enrollment(conn: RedshiftConnection, source: str, schema: str, patient_ids: list[str], start_year: int, end_year: int, columns: list[str] | None = None) -> pd.DataFrame
Fetch enrollment data from database for specified patients.
Enrollment data tracks which months each patient was "observable" in the database (had active insurance coverage). This is essential for: - Verifying patients were observable during baseline/follow-up periods - Calculating continuous enrollment for inclusion criteria - Determining censoring dates for survival analysis
The function queries yearly enrollment tables (e.g., enroll2_2020, enroll2_2021) and filters to the specified patients.
Workflow
- get_enrollment() <-- you are here
- calculate_enrollment_gaps() - Identify gaps relative to index date
- filter_continuous_enrollment() - Apply enrollment requirements
- get_censor_dates() - Calculate censoring for survival analysis
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn
|
RedshiftConnection
|
Active database connection. Must be connected before calling. |
required |
source
|
str
|
Data source name: 'iqvia', 'optum', 'komodo'. Determines enrollment table pattern and column names. |
required |
schema
|
str
|
Database schema name (e.g., 'iqvia_pharmetrics_2024q3'). |
required |
patient_ids
|
list[str]
|
List of patient IDs to fetch enrollment for.
Typically from |
required |
start_year
|
int
|
Start year for enrollment tables (e.g., 2015). |
required |
end_year
|
int
|
End year for enrollment tables (e.g., 2024). |
required |
columns
|
list[str]
|
Columns to select. If None, selects patient_id and month_id. Include 'pay_type' if you need payer classification. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Enrollment data with one row per patient-month, containing: - patient_id column (pat_id for IQVIA, patid for Optum) - month_id: Enrollment month in YYYYMM format (e.g., 202301) - Additional columns if specified |
See Also
calculate_enrollment_gaps : Next step - identify enrollment gaps cohort.get_cohort : High-level function that handles enrollment automatically
Notes
- IQVIA enrollment tables: enroll2_2006 through enroll2_2025
- month_id format: YYYYMM (e.g., 202301 = January 2023)
- Query can be slow for large patient lists (consider batching)
- Memory usage scales with patient count × months
Examples:
Basic enrollment fetch:
>>> df_enroll = get_enrollment(
... conn,
... source='iqvia',
... schema='iqvia_pharmetrics_2024q3',
... patient_ids=df_cohort['pat_id'].tolist(),
... start_year=2015,
... end_year=2024,
... )
>>> print(f"Enrollment records: {len(df_enroll):,}")
>>> print(f"Patients with enrollment: {df_enroll['pat_id'].nunique():,}")
Include payer type for payer classification:
>>> df_enroll = get_enrollment(
... conn,
... source='iqvia',
... schema='iqvia_pharmetrics_2024q3',
... patient_ids=patient_ids,
... start_year=2020,
... end_year=2024,
... columns=['pat_id', 'month_id', 'pay_type'],
... )
Source code in alx_heor\enrollment\__init__.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
build_enrollment_sql ¶
build_enrollment_sql(source: str, schema: str, start_year: int, end_year: int, columns: list[str] | None = None) -> str
Build SQL for enrollment table union (without patient filter).
Useful for joining enrollment data in larger queries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Data source name. |
required |
schema
|
str
|
Database schema name. |
required |
start_year
|
int
|
Start year. |
required |
end_year
|
int
|
End year. |
required |
columns
|
list[str]
|
Columns to select. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
SQL UNION ALL query for enrollment tables. |
Source code in alx_heor\enrollment\__init__.py
calculate_enrollment_gaps ¶
calculate_enrollment_gaps(df_enrollment: DataFrame, df_index: DataFrame, patient_id_col: str = 'pat_id', index_date_col: str = 'index_date', months_pre: int = 6, months_post: int = 12) -> pd.DataFrame
Calculate enrollment gaps relative to each patient's index date.
This function is the core of continuous enrollment assessment. It identifies gaps in each patient's enrollment record, measured relative to their index date. This allows you to: - Verify patients were observable during baseline period - Verify patients were observable during follow-up period - Identify where gaps occurred for censoring
Gap Calculation Logic
For each patient, the function calculates: 1. Gap from baseline start: Days between required baseline start (index - months_pre) and first enrollment month 2. Gaps between months: Days between consecutive enrollment records 3. Gap to follow-up end: Days between last enrollment and required follow-up end (index + months_post)
A max_gap_months column summarizes the largest gap for each patient, making it easy to filter for continuous enrollment.
Workflow
- get_enrollment() - Fetch raw enrollment data
- calculate_enrollment_gaps() <-- you are here
- filter_continuous_enrollment() - Apply requirements (max_gap <= N)
- get_censor_dates() - Calculate censoring for survival analysis
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df_enrollment
|
DataFrame
|
Enrollment data with patient_id and month_id columns. Output from get_enrollment(). |
required |
df_index
|
DataFrame
|
Patient cohort with patient_id and index_date columns. Output from claims.get_index_dates() or cohort.get_cohort(). |
required |
patient_id_col
|
str
|
Name of patient ID column. Use 'patid' for Optum. |
'pat_id'
|
index_date_col
|
str
|
Name of index date column in df_index. |
'index_date'
|
months_pre
|
int
|
Required months of enrollment BEFORE index date (baseline period). Common values: 6, 12. |
6
|
months_post
|
int
|
Required months of enrollment AFTER index date (follow-up period). Common values: 6, 12, 24. |
12
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Enrollment data with added gap calculation columns: - gap_months: Gap from previous enrollment month (in months) - max_gap_months: Maximum gap for this patient (for filtering) - rank: Enrollment month rank within patient (1 = earliest) - is_padded_last: True for synthetic "gap to follow-up end" rows |
See Also
get_enrollment : Previous step - fetch raw enrollment data filter_continuous_enrollment : Next step - apply gap threshold get_censor_dates : Calculate censoring based on gaps
Notes
- A gap of 1 month is often allowed (data processing delays)
- The function creates synthetic rows to measure gap to follow-up end
- Patients missing from enrollment data are dropped (inner join)
- Large gaps early in baseline vs late in follow-up have different implications
Examples:
Calculate gaps for 6-month baseline + 12-month follow-up:
>>> df_gaps = calculate_enrollment_gaps(
... df_enrollment,
... df_cohort,
... patient_id_col='pat_id',
... index_date_col='index_date',
... months_pre=6,
... months_post=12,
... )
>>>
>>> # Check gap distribution
>>> print(df_gaps.groupby('pat_id')['max_gap_months'].first().describe())
count 45678.000000
mean 1.234567
std 2.345678
min 1.000000
50% 1.000000
max 36.000000
Filter to continuous enrollment (max gap <= 1 month):
>>> df_continuous = df_gaps[df_gaps['max_gap_months'] <= 1]
>>> print(f"Continuous enrollment: {df_continuous['pat_id'].nunique():,}")
Check how many patients fail at each gap threshold:
>>> for threshold in [1, 2, 3]:
... n = df_gaps[df_gaps['max_gap_months'] <= threshold]['pat_id'].nunique()
... print(f"Gap <= {threshold}: {n:,} patients")
Source code in alx_heor\enrollment\__init__.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | |
get_max_enrollment_gap ¶
get_max_enrollment_gap(df_enrollment: DataFrame, df_index: DataFrame, patient_id_col: str = 'pat_id', index_date_col: str = 'index_date', months_pre: int = 6, months_post: int = 12) -> pd.DataFrame
Get maximum enrollment gap for each patient.
Convenience wrapper around calculate_enrollment_gaps that returns just the max gap per patient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df_enrollment
|
DataFrame
|
Enrollment data with |
required |
df_index
|
DataFrame
|
Patient index dates. |
required |
patient_id_col
|
str
|
Name of patient ID column. |
'pat_id'
|
index_date_col
|
str
|
Name of index date column. |
'index_date'
|
months_pre
|
int
|
Required months before index. |
6
|
months_post
|
int
|
Required months after index. |
12
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per patient with columns: patient_id, max_gap_months. |
Example
df_max_gap = get_max_enrollment_gap(df_enrollment, df_cohort) continuous = df_max_gap[df_max_gap['max_gap_months'] <= 1]
Source code in alx_heor\enrollment\__init__.py
filter_continuous_enrollment ¶
filter_continuous_enrollment(df_gaps: DataFrame, max_gap: int = 1, patient_id_col: str = 'pat_id') -> pd.DataFrame
Filter to patients with continuous enrollment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df_gaps
|
DataFrame
|
Output from calculate_enrollment_gaps with max_gap_months column. |
required |
max_gap
|
int
|
Maximum allowed gap in months (default: 1, meaning consecutive months). |
1
|
patient_id_col
|
str
|
Name of patient ID column. |
'pat_id'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Filtered to patients where max_gap_months <= max_gap. |
Example
df_continuous = filter_continuous_enrollment(df_gaps, max_gap=1) print(f"Patients with continuous enrollment: {df_continuous[patient_id_col].nunique()}")
Source code in alx_heor\enrollment\__init__.py
get_censor_dates ¶
get_censor_dates(df_gaps: DataFrame, study_end: str, max_gap_for_censor: int = 3, patient_id_col: str = 'pat_id', index_date_col: str = 'index_date') -> pd.DataFrame
Calculate censoring dates for each patient for survival analysis.
In survival analysis (time-to-event analysis), patients must be "censored" when they become unobservable. This function calculates the censoring date as the earlier of: 1. First enrollment gap exceeding the threshold (patient left database) 2. Study end date (administrative censoring)
Proper censoring is critical for unbiased survival estimates. Without it, patients who leave the database would appear to never have the event, biasing results toward better outcomes.
Censoring Logic
For each patient: 1. Find first enrollment gap > max_gap_for_censor 2. If found: censor_date = start of gap period + tolerance 3. If not found: censor_date = last enrollment + tolerance OR study_end 4. Final censor_date = min(calculated date, study_end)
The tolerance (max_gap_for_censor) allows for some gap before censoring, as small gaps may be data processing issues rather than true disenrollment.
Workflow
- get_enrollment() - Fetch raw enrollment data
- calculate_enrollment_gaps() - Identify gaps
- filter_continuous_enrollment() - Apply requirements
- get_censor_dates() <-- you are here
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df_gaps
|
DataFrame
|
Output from calculate_enrollment_gaps(). Must contain gap_months, month_id, and patient_id columns. |
required |
study_end
|
str
|
Study end date in 'YYYY-MM-DD' format (e.g., '2024-03-31'). All patients are censored by this date at latest. |
required |
max_gap_for_censor
|
int
|
Maximum gap (in months) allowed before censoring. Gaps exceeding this trigger censoring at the start of the gap. Common values: 3 (lenient), 1 (strict). |
3
|
patient_id_col
|
str
|
Name of patient ID column. |
'pat_id'
|
index_date_col
|
str
|
Name of index date column. |
'index_date'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per patient with columns: - patient_id_col: Patient identifier - index_date_col: Patient's index date - censor_date: Date patient is censored (datetime) - is_censored_by_gap: True if censored due to enrollment gap, False if censored at study end - days_to_censor: Days from index_date to censor_date (int) |
See Also
calculate_enrollment_gaps : Previous step - calculate gaps filter_continuous_enrollment : Filter for continuous enrollment
Notes
- Censoring is RIGHT censoring (event may occur after censor date)
- Patients censored by gap were likely lost to follow-up
- Median days_to_censor is a key metric for study feasibility
- High proportion censored by gap suggests data quality issues
Examples:
Calculate censoring dates with 3-month tolerance:
>>> df_censor = get_censor_dates(
... df_gaps,
... study_end='2024-03-31',
... max_gap_for_censor=3,
... patient_id_col='pat_id',
... )
>>>
>>> # Summary statistics
>>> print(f"Patients: {len(df_censor):,}")
>>> print(f"Median follow-up: {df_censor['days_to_censor'].median():.0f} days")
>>> print(f"Mean follow-up: {df_censor['days_to_censor'].mean():.0f} days")
>>>
>>> # Censoring breakdown
>>> n_gap = df_censor['is_censored_by_gap'].sum()
>>> n_end = len(df_censor) - n_gap
>>> print(f"Censored by enrollment gap: {n_gap:,} ({n_gap/len(df_censor)*100:.1f}%)")
>>> print(f"Censored at study end: {n_end:,} ({n_end/len(df_censor)*100:.1f}%)")
Use for survival analysis:
>>> # Prepare data for lifelines or survival analysis
>>> df_survival = df_cohort.merge(df_censor, on='pat_id')
>>> df_survival['duration'] = df_survival['days_to_censor']
>>> df_survival['event'] = df_survival['had_event'] & ~df_survival['is_censored_by_gap']
Source code in alx_heor\enrollment\__init__.py
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | |
analyze_enrollment ¶
analyze_enrollment(conn: RedshiftConnection, source: str, schema: str, df_cohort: DataFrame, start_year: int, end_year: int, patient_id_col: str = 'pat_id', index_date_col: str = 'index_date', months_pre: int = 6, months_post: int = 12, max_gap_continuous: int = 1, max_gap_censor: int = 3, study_end: str | None = None) -> EnrollmentResult
Complete enrollment analysis workflow.
This high-level function performs: 1. Fetch enrollment data for cohort 2. Calculate enrollment gaps 3. Filter for continuous enrollment 4. Calculate censoring dates
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn
|
RedshiftConnection
|
Active database connection. |
required |
source
|
str
|
Data source name: 'iqvia', 'optum', 'komodo'. |
required |
schema
|
str
|
Database schema name. |
required |
df_cohort
|
DataFrame
|
Cohort with patient_id and index_date columns. |
required |
start_year
|
int
|
Start year for enrollment tables. |
required |
end_year
|
int
|
End year for enrollment tables. |
required |
patient_id_col
|
str
|
Name of patient ID column (default: 'pat_id'). |
'pat_id'
|
index_date_col
|
str
|
Name of index date column (default: 'index_date'). |
'index_date'
|
months_pre
|
int
|
Required baseline months (default: 6). |
6
|
months_post
|
int
|
Required follow-up months (default: 12). |
12
|
max_gap_continuous
|
int
|
Max gap for continuous enrollment filter (default: 1). |
1
|
max_gap_censor
|
int
|
Max gap before censoring (default: 3). |
3
|
study_end
|
str
|
Study end date for censoring. If None, uses end of end_year. |
None
|
Returns:
| Type | Description |
|---|---|
EnrollmentResult
|
Complete enrollment analysis results with attrition tracking. |
Example
result = analyze_enrollment( ... conn, source='iqvia', schema='iqvia_pharmetrics_2024q3', ... df_cohort=df_cohort, start_year=2015, end_year=2024, ... months_pre=6, months_post=12, ... ) print(result.summary()) df_final = result.df_continuous # Patients with continuous enrollment
Source code in alx_heor\enrollment\__init__.py
788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | |