Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pd1-4 mapping to Patient.generalPractitioner #17019

Merged
merged 10 commits into from
Jan 13, 2025
Merged

Conversation

jbiskie
Copy link
Contributor

@jbiskie jbiskie commented Jan 8, 2025

This PR adds mapping for PD1-4. The field is backwards compatible in NIST/HL7 2.5.1 and we are adding to support the ETOR NBS use case. In FHIR, the field maps to/from Patient.generalPractitioner.

Test Steps:

  1. Run integration tests, specifically test OML_O21 all segments and test PD1 populated with PD1-14-1 populated.

Changes

  • Updates HL7v2 to FHIR mapping. The PD1-4 field is mapped to a Patient.generalPractitioner Practitioner reference. Note that PD1-3 maps to Patient.generalPractitioner, but uses an organization reference. Both fields support repetitions.
  • Updates FHIR to HL7v2 mapping to move the Practitioner into PD1-4
  • Updates test input and output files

Checklist

Testing

  • Tested locally?
  • Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
  • Added tests? *Updated existing OML and PD1 tests to include PD1-4.

Process

  • Are there licensing issues with any new dependencies introduced? N/A
  • Includes a summary of what a code reviewer should test/verify?
  • Updated the release notes?
  • Database changes are submitted as a separate PR? N/A
  • DevOps team has been notified if PR requires ops support? N/A

Linked Issues

Specific Security-related subjects a reviewer should pay specific attention to

  • Does this PR introduce new endpoints?
    • new endpoint A
    • new endpoint B
  • Does this PR include changes in authentication and/or authorization of existing endpoints?
  • Does this change introduce new dependencies that need vetting?
  • Does this change require changes to our infrastructure?
  • Does logging contain sensitive data?
  • Does this PR include or remove any sensitive information itself?

If you answered 'yes' to any of the questions above, conduct a detailed Review that addresses at least:

  • What are the potential security threats and mitigations? Please list the STRIDE threats and how they are mitigated
    • Spoofing (faking authenticity)
      • Threat T, which could be achieved by A, is mitigated by M
    • Tampering (influence or sabotage the integrity of information, data, or system)
    • Repudiation (the ability to dispute the origin or originator of an action)
    • Information disclosure (data made available to entities who should not have it)
    • Denial of service (make a resource unavailable)
    • Elevation of Privilege (reduce restrictions that apply or gain privileges one should not have)
  • Have you ensured logging does not contain sensitive data?
  • Have you received any additional approvals needed for this change?

@jbiskie jbiskie added platform Platform Team etor labels Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test Results

1 265 tests  ±0   1 261 ✅ ±0   7m 30s ⏱️ -8s
  164 suites ±0       4 💤 ±0 
  164 files   ±0       0 ❌ ±0 

Results for commit 0b029d7. ± Comparison against base commit c942a9a.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Integration Test Results

 60 files   60 suites   43m 34s ⏱️
428 tests 418 ✅ 10 💤 0 ❌
431 runs  421 ✅ 10 💤 0 ❌

Results for commit 0b029d7.

♻️ This comment has been updated with latest results.

@jbiskie jbiskie marked this pull request as ready for review January 9, 2025 23:10
@jbiskie jbiskie requested a review from a team as a code owner January 9, 2025 23:10
Copy link
Collaborator

@JFisk42 JFisk42 left a comment

Choose a reason for hiding this comment

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

Changes look good! 👍

@@ -18,7 +18,7 @@ resourceType: Patient
# to Patient.link which includes a reference to RelatedPerson


# - PD1.4 Deprecated in NIST, set to NullDT in HAPI. Field not mapped
# - PD1.4 Backwards compatible in NIST. Needed for ETOR NBS use case. Mapped to Patient.generalPractitioner.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a whole heap of context for what this comment is referring to (you can ignore this if you're already aware). The HAPI library will set the object type of some fields to NULLDT (as opposed to String or CE or XCN, etc.) which effectively means values cannot be mapped to those fields. To get around this we have been importing and modifying some of the java classes from HAPI so that we can set field to the most universal types.

Copy link
Collaborator

@mkalish mkalish left a comment

Choose a reason for hiding this comment

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

Looks great to me! Only thought would be to maybe update one of the integration tests for the ETOR use case to make sure that ORM -> FHIR is working for their sample

@GilmoreA6
Copy link
Collaborator

Looks great to me! Only thought would be to maybe update one of the integration tests for the ETOR use case to make sure that ORM -> FHIR is working for their sample

Hey Michael! Just want to clarify this is for the ETOR use case. Our partners are able to send us OML_O21 messages as it turns out so that's what we're mapping here. There's a couple more backwards compatible fields we'll be mapping but they are all for message type OML_021

@mkalish
Copy link
Collaborator

mkalish commented Jan 13, 2025

@GilmoreA6 Got it that makes sense!

@basiliskus basiliskus merged commit 3408c7f into main Jan 13, 2025
25 checks passed
@basiliskus basiliskus deleted the Flexion/1620-add-PD1-4 branch January 13, 2025 17:06
@jack-h-wang
Copy link
Collaborator

Progresses #15503.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
etor platform Platform Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants