-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
3153 update unknowncodesystemwarningvallidationsupport to have configurable severities #3155
3153 update unknowncodesystemwarningvallidationsupport to have configurable severities #3155
Conversation
closes #3153 |
|
Codecov Report
@@ Coverage Diff @@
## master #3155 +/- ##
============================================
- Coverage 82.76% 82.76% -0.01%
- Complexity 20057 20064 +7
============================================
Files 1346 1346
Lines 72213 72235 +22
Branches 10885 10886 +1
============================================
+ Hits 59769 59785 +16
- Misses 8270 8272 +2
- Partials 4174 4178 +4
Continue to review full report at Codecov.
|
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.
Approved pending a few minor things noted in comments. One question though, does this need a version bump? Does the change in this MR actually break the API surface? Far as I can tell you changed some implementation details, but didn't break the API. Let me know if I'm wrong.
Nice work!
@@ -162,11 +162,12 @@ public void testValidateCodeInValueSetWithUnknownCodeSystem_FailValidation() { | |||
} | |||
|
|||
/** | |||
* By default an unknown code system should fail vaildation | |||
* By default, an unknown code system should fail validation |
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.
i love javadoc fixes 👍🏻
...a/org/hl7/fhir/common/hapi/validation/support/UnknownCodeSystemWarningValidationSupport.java
Show resolved
Hide resolved
@Override | ||
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { | ||
// filters out error/fatal | ||
if (!canValidateCodeSystem(theValidationSupportContext, theCodeSystem)) { |
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.
I'd love a bit more context about this. It seems that if this returns false, we just return a null CodeValidationResult, (which I guess means its fine and valid?) But when I read the code for canValidateCodeSystem
I see this:
if (!allowNonExistentCodeSystems()) {
return false;
}
Should this not be a failure, if it is set to not allow non-existent code systems? Or is this handled by another part of validation?
case FATAL: | ||
return false; | ||
default: | ||
ourLog.info("Unknown issue severity " + myNonExistentCodeSystemSeverity.name() |
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.
style nitpick: move default to the bottom of the switch.
} | ||
} | ||
|
||
private boolean canValidateCodeSystem(ValidationSupportContext theValidationSupportContext, |
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.
javadocs for the private methods would be helpful to future devs (though this code mostly documents itself)
|
||
// Invalid code | ||
obs.setValue(new Quantity().setSystem("http://cs").setCode("code99").setValue(123)); | ||
oo = validateAndReturnOutcome(obs); | ||
encoded = encode(oo); | ||
ourLog.info(encoded); | ||
assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encoded); | ||
assertTrue(oo.getIssueFirstRep().getDiagnostics().contains("No issues detected during validation")); |
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.
I'd love to see maybe one more test just covering a few of the lines considered uncovered by codecov in your implementation. This is a high value fix so it feels worthwhile to write another test to check the other cases.
@@ -0,0 +1,5 @@ | |||
--- | |||
type: fix | |||
issue: 3153 |
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.
Since I know there happens to be a related jira issue for this, could you possibly add:
jira: SMILE-XXXX
below the issue line? this will allow our automation tools to wire them together.
…urable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]>
* 3138 externalized binary packages (#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (#3134) * Remove leading underscores from identifiers (#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Add 5.5.4 * Remove jpaconstants Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]>
* 3138 externalized binary packages (#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (#3134) * Remove leading underscores from identifiers (#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Bump minor version * 3170 language portion of language code is case insensitive (#3171) * 3170 language portion of language code is case insensitive * 3170 adding changelog * 3170 house keeping Co-authored-by: leif stawnyczy <[email protected]> * Add backport info: * Add version enum * Remove worthless import Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]>
* 3138 externalized binary packages (#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (#3134) * Remove leading underscores from identifiers (#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Bump minor version * 3170 language portion of language code is case insensitive (#3171) * 3170 language portion of language code is case insensitive * 3170 adding changelog * 3170 house keeping Co-authored-by: leif stawnyczy <[email protected]> * Add backport info: * Add version enum * Bump hapi version to 5.6.3 * Add version enum * Add changelog folder and version.yaml * Patch vulnerability, add changelog * Add new version * Remove test Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]>
* 3138 externalized binary packages (hapifhir#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (hapifhir#3134) * Remove leading underscores from identifiers (hapifhir#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (hapifhir#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (hapifhir#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (hapifhir#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (hapifhir#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (hapifhir#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (hapifhir#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Bump minor version * 3170 language portion of language code is case insensitive (hapifhir#3171) * 3170 language portion of language code is case insensitive * 3170 adding changelog * 3170 house keeping Co-authored-by: leif stawnyczy <[email protected]> * Add backport info: * Add version enum * Bump hapi version to 5.6.3 * Add version enum * Add changelog folder and version.yaml * Patch vulnerability, add changelog * Add new version * Remove test Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]>
* 3138 externalized binary packages (#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (#3134) * Remove leading underscores from identifiers (#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Bump minor version * 3170 language portion of language code is case insensitive (#3171) * 3170 language portion of language code is case insensitive * 3170 adding changelog * 3170 house keeping Co-authored-by: leif stawnyczy <[email protected]> * Add backport info: * Add version enum * Bump hapi version to 5.6.3 * Add version enum * Add changelog folder and version.yaml * Patch vulnerability, add changelog * AuthorizationInterceptor concurrency failure (#3528) * Fix #3256 - AuthorizationInterceptor concurrency failure * Test fixes * Add backport info * Fix test for lang level 8 * Bump hapi * License updates * Add release pipeline * remove checkstyle from old version * swap jdk for build * Couple removals for arbitrary failures * disabling tests for this next 5_6 release because we shoot from the hip here * Updating version to: 5.6.5 post release. * add new folder * fix versionenum * remove unreleased versions * Bring back into line Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]> Co-authored-by: James Agnew <[email protected]> Co-authored-by: markiantorno <[email protected]>
* 3138 externalized binary packages (#3139) * Add test and impl * Add changelog * Fix test * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml * add beans to test configs * Typo * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java Co-authored-by: michaelabuckley <[email protected]> * Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> * 3131 - Added support for the lookup operation in the Remote Terminology code (#3134) * Remove leading underscores from identifiers (#3146) * Version bump * License files * version.yaml * Add executeRawSql() method to Migrator (#3183) * Add implementation, add test * Add javadoc * Add another helper function * Bump version * 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155) * 3153 updating the unknowncodesystemwarningvalidationsupport class * 3153 updating version for smile * 3153 update broken tests * 3153 adding log * 3153 cleanup * 3153 cleanup Co-authored-by: leif stawnyczy <[email protected]> * Add backport info * Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158) * Add check before mapping storage ID to resource ID in TransactionDetails. * Add change log. * Changed to instead prevent creation of ResourcePersistentId with null ID value. * Changed to instead prevent ResourcePersistentId being created with null resource ID. Co-authored-by: ianmarshall <[email protected]> * Fix bug loading packages in non-database mode (#3199) * Add implementation * Add changelog * Add backports * 3164 updating code review points (#3165) * 3164 updating code review points * 3164 updating code review points Co-authored-by: leif stawnyczy <[email protected]> * Add executeRawSqlStub (#3203) Co-authored-by: Joanne Mendoza <[email protected]> * Add new version * begin with failing test * fix bug * change log * change log * Add backport informationm * begin with failing test * fix issue * change log * code review * Add backport info. Add folder * fixed * Add test * Update test * Add backport info * Bump minor version * 3170 language portion of language code is case insensitive (#3171) * 3170 language portion of language code is case insensitive * 3170 adding changelog * 3170 house keeping Co-authored-by: leif stawnyczy <[email protected]> * Add backport info: * Add version enum * Bump hapi version to 5.6.3 * Add version enum * Add changelog folder and version.yaml * Patch vulnerability, add changelog * AuthorizationInterceptor concurrency failure (#3528) * Fix #3256 - AuthorizationInterceptor concurrency failure * Test fixes * Add backport info * Fix test for lang level 8 * Bump hapi * License updates * Add release pipeline * remove checkstyle from old version * swap jdk for build * Couple removals for arbitrary failures * disabling tests for this next 5_6 release because we shoot from the hip here * Updating version to: 5.6.5 post release. * add new folder * fix versionenum * remove unreleased versions * Bring back into line Co-authored-by: Kevin Dougan SmileCDR <[email protected]> Co-authored-by: michaelabuckley <[email protected]> Co-authored-by: TipzCM <[email protected]> Co-authored-by: leif stawnyczy <[email protected]> Co-authored-by: IanMMarshall <[email protected]> Co-authored-by: ianmarshall <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Joanne Mendoza <[email protected]> Co-authored-by: Ken Stevens <[email protected]> Co-authored-by: katie_smilecdr <[email protected]> Co-authored-by: James Agnew <[email protected]> Co-authored-by: markiantorno <[email protected]>
Updated UnknownCodeSystemWarningValidationSystem to allow specifying specific issue severity
Updated to allow warnings to be displayed as warnings instead of failing as errors
Added changelog and updated tests