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

FI-3059 MustSupport Choice between Practitioner.address and PractitionerRole #198

Merged
merged 9 commits into from
Oct 3, 2024

Conversation

yunwwang
Copy link
Contributor

@yunwwang yunwwang commented Sep 9, 2024

Summary

This PR fixes GitHub Issue onc-healthit/onc-certification-g10-test-kit#559

Changes:

  • Add PractitionerAddressTest to US Core v6.1.0 and US Core v7.0.0
  • Refact reference_resolution_test and must_support_test for method reuse
  • Add unit tests

Testing Guidance

Inferno Reference Server does not support this use case, ie Practitioner does not have address but there is PractitionerRole references this Practitioner
There are three unit tests covers this use case.

@yunwwang yunwwang force-pushed the FI-3059-practitioner-location branch from 102f75c to b7d209c Compare September 22, 2024 15:37
target_profile_with_version = "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole|#{metadata.profile_version}"

practitioner_roles.any? do |pr|
validator_response = validator.validate(pr, target_profile_with_version)
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to unify this validation code and the validation code in the reference resolution test: https://github.com/inferno-framework/us-core-test-kit/blob/main/lib/us_core_test_kit/reference_resolution_test.rb#L159

@yunwwang yunwwang requested a review from Jammjammjamm October 2, 2024 15:54
end
end

messages = []
Copy link
Contributor

Choose a reason for hiding this comment

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

I think from here down should just be:

missing_must_support_message = <<~MESSAGE
  Could not find US Core PractitionerRole...in US Core Practitioner Profile
  Resources. Please use patients with more information.
MESSAGE

assert @missing_elements.blank?, missing_must_support_message

Yunwei Wang and others added 2 commits October 2, 2024 15:13
* auto generate practitioner_address_test for each allowed version

* remove commented codes

---------

Co-authored-by: Yunwei Wang <>
@yunwwang
Copy link
Contributor Author

yunwwang commented Oct 2, 2024

Refactored to automate practitioner_address_test generation.

@yunwwang yunwwang merged commit 4519c9e into main Oct 3, 2024
2 checks passed
@yunwwang yunwwang deleted the FI-3059-practitioner-location branch October 3, 2024 13:40
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