Skip to content

Split PT/OT/ST into separate service_category_3 values (#1016)#1352

Open
gopidaxhealthcaresolutions wants to merge 2 commits into
tuva-health:mainfrom
gopidaxhealthcaresolutions:feat/1016-split-pt-ot-st-service-category
Open

Split PT/OT/ST into separate service_category_3 values (#1016)#1352
gopidaxhealthcaresolutions wants to merge 2 commits into
tuva-health:mainfrom
gopidaxhealthcaresolutions:feat/1016-split-pt-ot-st-service-category

Conversation

@gopidaxhealthcaresolutions

Copy link
Copy Markdown

Closes #1016

It would be great to split PT/OT/ST into their own service category 3 categories. Currently, both service category 2 and 3 are simply PT/OT/ST.

What changed

The therapy service-category models set both service_category_2 and service_category_3 to the same umbrella value (outpatient pt/ot/st / office-based pt/ot/st), so the individual disciplines couldn't be told apart.

  • service_category_2 is unchanged — it stays the pt/ot/st umbrella.
  • service_category_3 now resolves to physical therapy, occupational therapy, or speech therapy.

This mirrors how service_category_2 = 'outpatient radiology' already fans out into ct / general / mri / pet in service_category_3.

How the discipline is determined

  1. HCPCS therapy modifier (primary) — Medicare requires a discipline modifier on therapy lines: GP = physical, GO = occupational, GN = speech. This is surfaced once as a therapy_modifier_discipline column in service_category__stg_medical_claim (works for institutional claims too, which carry no rendering specialty).
  2. Rendering provider specialty (fallback, professional/office-based only) — e.g. Physical Therapist → physical therapy.
  3. Umbrella fallback — when neither signal is conclusive the row stays in the existing pt/ot/st value, so category membership is unchanged; only service_category_3 is refined.

Files

  • service_category__stg_medical_claim.sql — add therapy_modifier_discipline (additive).
  • service_category__outpatient_physical_therapy_institutional.sql, ...outpatient_physical_therapy_professional.sql, ...office_based_physical_therapy_professional.sql — set service_category_3 from the discipline.
  • Docs: core-platform/service-categories.md and knowledge/claims-groupers-and-algos/service-categories.md updated to list the new values.

Testing

Added service_category__pt_ot_st_unit_tests.yml covering modifier precedence, specialty fallback, and the umbrella default. Passes locally on DuckDB:

dbt test --select test_service_category_pt_ot_st_split_by_discipline
1 of 1 PASS ... test_service_category_pt_ot_st_split_by_discipline

The modifier IN-list expression was also verified directly on DuckDB (including NULL handling). No downstream model filters on service_category_3 = '...pt/ot/st', and there is no accepted_values test on the column, so nothing downstream breaks.

Note

Discipline assignment depends on therapy modifiers / provider specialty being populated in the source data. Lines lacking both stay in the pt/ot/st umbrella rather than being misclassified.

)

Previously the therapy service-category models set both service_category_2
and service_category_3 to the same 'pt/ot/st' umbrella, so PT, OT and ST
could not be distinguished at the most granular level.

service_category_2 stays the 'outpatient pt/ot/st' / 'office-based pt/ot/st'
umbrella; service_category_3 now resolves to the individual discipline:
physical therapy, occupational therapy, or speech therapy.

Discipline is determined by the HCPCS therapy modifiers Medicare requires on
therapy lines (GP = physical, GO = occupational, GN = speech), surfaced once
as a therapy_modifier_discipline column in service_category__stg_medical_claim.
The professional and office-based models fall back to the rendering provider
specialty when no modifier is present, and all three fall back to the existing
pt/ot/st umbrella when neither signal is conclusive (so category membership is
unchanged - only service_category_3 is refined).

Adds a unit test covering modifier precedence, specialty fallback, and the
umbrella default, and updates the service-categories docs.
@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for thetuvaproject ready!

Name Link
🔨 Latest commit f5869cf
🔍 Latest deploy log https://app.netlify.com/projects/thetuvaproject/deploys/6a4725d1176e0800086afc74
😎 Deploy Preview https://deploy-preview-1352--thetuvaproject.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@chase-jones chase-jones added the community Issues created by community members label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues created by community members

Projects

Status: 👀 Ready for Review

Development

Successfully merging this pull request may close these issues.

Split PT/OT/ST in service category 3

2 participants