Skip to content

BFD-4661: Use derived NPI type for claim care team providers - #3257

Draft
patrickgmayday wants to merge 5 commits into
masterfrom
BFD-4661-Add-NPI_TYPE-to-pipeline-and-server
Draft

BFD-4661: Use derived NPI type for claim care team providers#3257
patrickgmayday wants to merge 5 commits into
masterfrom
BFD-4661-Add-NPI_TYPE-to-pipeline-and-server

Conversation

@patrickgmayday

Copy link
Copy Markdown
Contributor

JIRA Ticket:
BFD-XXXX

What Does This PR Do?

Replace me.

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies

  • Modifies any security controls

  • Adds new transmission or storage of data

  • Any other changes that could possibly affect security?

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)

  • I have created tests to sufficiently ensure the reliability of my code, if applicable. If this is a modification to an existing piece of code, I have audited the associated tests to ensure everything works as expected.

Validation

Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.

@patrickgmayday
patrickgmayday marked this pull request as ready for review August 13, 2026 12:17
@patrickgmayday
patrickgmayday marked this pull request as draft August 13, 2026 14:01
@bfd-sast

bfd-sast Bot commented Aug 13, 2026

Copy link
Copy Markdown

return ProviderHistoryBase.NpiType.INDIVIDUAL;
}
return ProviderHistoryBase.NpiType.fromNpiTypeCode(
npiType.isPresent() ? npiType : genericIdNpiType);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked in prod and there are cases where records have both prvdr_srvc_prvdr_npi_num and clm_srvc_prvdr_gnrc_id_num populated so setting the npi type for just one isn't correct.

@patrickgmayday patrickgmayday Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed I'm doing the following:

   bfd_srvc_prvdr_npi_type: Annotated[
        int | None,
        {EXPR: provider_npi_type_expr(ALIAS_PRVDR_SRVC)},
    ]
    bfd_srvc_prvdr_gnrc_id_npi_type: Annotated[
        int | None,
        {EXPR: provider_npi_type_expr(ALIAS_PRVDR_SRVC)},
    ]

should bfd_srvc_prvdr_gnrc_id_npi_type be using the same alias or have its' own?

@patrickgmayday patrickgmayday Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one more follow up question: In cases where we have both provider Npi and generic Npi populated,

would we expect the following logic to change (with callers) to accommodate both, since this only uses getNpiType

public Optional<DomainResource> toFhirNpiType() {
    return getProviderNpiNumber()
        .map(
            npi ->
                (getNpiType() == NpiType.ORGANIZATION
                    ? createOrganization(npi)
                    : createBillingPractitioner(npi)));
  }

@patrickgmayday patrickgmayday changed the title Use derived NPI type for claim care team providers BFD-4661: Use derived NPI type for claim care team providers Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants