-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add support for ValueSet.FilterOperator.EQUAL #7012
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
base: master
Are you sure you want to change the base?
Add support for ValueSet.FilterOperator.EQUAL #7012
Conversation
- Created a new ValueSet resource with ID 2.16.840.1.113762.1.4.1287.10. - Included metadata such as version, last updated date, and profiles. - Added extensions for author, last review date, and effective date. - Defined the ValueSet's URL, identifier, version, name, title, status, date, publisher, and description. - Composed the ValueSet to include ICD-10-CM codes related to esophageal conditions.
...ir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/CustomValueSetExpandTest.java
Outdated
Show resolved
Hide resolved
...ir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/CustomValueSetExpandTest.java
Outdated
Show resolved
Hide resolved
…d importance of the logs
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.
Please take a look at #7107 and let me know if that fix meets your needs.
code.getDisplay()); | ||
|
||
b.must(f.bool() | ||
.should(f.match().field("myParentPids").matching("" + code.getId())) |
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.
this doesn't look right
} | ||
|
||
// 4. Print all contains | ||
expanded.getExpansion().getContains().forEach(c -> { |
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.
missing assert
YES thanks |
Due to some reason, I need to make ValueSet expand support "EQUAL".
But I don't know how to write JAVA, so I asked GitHub Copilot to help me.
I had tested the code.
This pull request introduces enhancements to the ValueSet expansion functionality in the HAPI FHIR server, including support for new filtering operations and the ability to load and expand a custom ValueSet based on the ICD-10-CM CodeSystem. Key changes include modifying the filtering logic, adding a comprehensive test for ValueSet expansion, and defining a new ValueSet resource.
Enhancements to filtering logic:
TermReadSvcImpl.java
: Added support for theEQUAL
(=
) operator in ValueSet filtering, enabling filtering by specific codes. Includes debug logging for better traceability.New test for ValueSet expansion:
CustomValueSetExpandTest.java
: Introduced a new test class to validate the expansion of a custom ValueSet using the ICD-10-CM CodeSystem. The test includes loading the 2023 version of ICD-10-CM, creating a ValueSet, and expanding it using the$expand
operation. It also implements retry logic for robustness.Definition of custom ValueSet resource:
my-valueset.json
: Added a new JSON resource defining a custom ValueSet named "Esophageal Metal Stent Placement." The ValueSet includes filters usingdescendent-of
,is-a
, and=
operators on the ICD-10-CM CodeSystem (2023 version).