-
Notifications
You must be signed in to change notification settings - Fork 2
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
NIAD-3220: Detect Referral + Document LinkSets and not create a Problem (Condition) from them #937
Merged
MartinWheelerMT
merged 9 commits into
main
from
niad-3220-handle-referral-request-to-external-document-linkset
Nov 22, 2024
Merged
NIAD-3220: Detect Referral + Document LinkSets and not create a Problem (Condition) from them #937
MartinWheelerMT
merged 9 commits into
main
from
niad-3220-handle-referral-request-to-external-document-linkset
Nov 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…l document LinkSets * Add Test to check verify that the provided `LinkSet` is a "Referral Request to External Document LinkSet." * Add test XML file containing a "Referral Request to External Document LinkSet." * Add method `isReferralRequestToExternalDocumentLinkSet` to `ResourceFilterUtil` with parameters for the `ehrExtract` and te `LinkSet` itself to identify `LinkSets` matching the criteria for a "Referral Request to External Document LinkSet."
…em (Condition) from them Add functionality to ConditionMapper to ensure that a `Condition` is not mapped from a `LinkSet` when it is a "ReferralRequestToExternalDocumentLinkSet." Add unit test for the above functionality. Add functionality to ReferralRequestMapper to set `supportingInfo` with `DocumentReferences` to when the `ReferralRequest` is referenced from a "ReferralRequestToExternalDocumentLinkSet." Add unit test for above functionality. Update PWTP7_vis-output.json to reflect the changes made.
adrianclay
reviewed
Nov 21, 2024
gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/mapper/ReferralRequestMapper.java
Outdated
Show resolved
Hide resolved
adrianclay
reviewed
Nov 21, 2024
gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/mapper/ReferralRequestMapper.java
Show resolved
Hide resolved
…od to set the `supportingInfo` field to the provided newly added List<Reference> parameter. Update test method which uses this method to pass in an empty list.
Base automatically changed from
niad-3220-add-resource-filter-util-for-referral_to_document_linkset
to
main
November 21, 2024 17:03
…l-document-linkset
…re human-readable.
…ple LinkSets referencing the same RequestStatement by adding a custom collector merge function Add additional test and XML file for this case.
adrianclay
reviewed
Nov 22, 2024
} | ||
|
||
@Test | ||
void When_ReferralRequestReferencedByMultipleLinkSets_Expect_AllRelatedDocumentReferencesAddedAsSupportingInfo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
adrianclay
reviewed
Nov 22, 2024
); | ||
final var referralRequest = referralRequests.getFirst(); | ||
assertAll( | ||
() -> assertThat(referralRequest.getSupportingInfo()).hasSize(expectedSize), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: The containsExactly
below already checks that there will be three items, so this is a little redundant.
adrianclay
approved these changes
Nov 22, 2024
MartinWheelerMT
deleted the
niad-3220-handle-referral-request-to-external-document-linkset
branch
November 22, 2024 10:36
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Condition
is not mapped from aLinkSet
when it is a "ReferralRequestToExternalDocumentLinkSet."supportingInfo
withDocumentReferences
to when theReferralRequest
is referenced from a "ReferralRequestToExternalDocumentLinkSet."Why
In #936 the functionality was added to identify
LinkSets
which are a "Referral Request to External Document LinkSet".A "ReferralRequest to ExternalDocument LinkSet" is defined as a
LinkSet
which matches the following criteria:code
with avalue
of394776006
and asystem
of2.16.840.1.113883.2.1.3.2.4.15
and noqualifier
and nooriginalText
conditionNamed / namedStatementRef / id[root]
is aRequestStatement
component
component / statementRef / id[root]
are references to GP2GP document/attachments.The purpose of this PR is to use the resource filter previously added to ensure that:
Condition
is not created from the LinkSet.ReferralRequest
, then thesupportingInfo
field should be populated byDocumentReference
references taken from the LinksetstatementRef
field.Type of change
Please delete options that are not relevant.
Checklist: