Skip to content

Commit 0abbb1a

Browse files
dotasekjamesagnewvolodymyr-korzh
authored
Core library bump 6.3.11 (hapifhir#5772)
* Bump to core 6.2.6 + fix compilation errors * Fix signature error * Error ordering * WIP 1 Fixing failing tests * Fix FhirInstanceValidatorR4Test * Fix FhirInstanceValidatorR5Test * Fix FhirInstanceValidatorR4BTest * Fix FhirInstanceValidatorDstu3Test.testValidateBuiltInProfiles() * WIP Fix FhirInstanceValidatorDstu3Test * Fix isPrimitiveType * Add placeholder narratives to ServerCapabilityStatement * Fix QuestionnaireResponseValidatorR4Test * Newline cleanup * Fix QuestionnaireResponseValidatorDstu3Test * Fix QuestionnaireResponseValidatorR5Test * Increase expected error messages by two because VALIDATION_HL7_WG_NEEDED New validation requirement as of 2023-09-16 * Add placeholder fix for Balp narrative * Fix expected validation messages * Fix more expected validation messages * Don't generate a master IPS narrative * Fix IPS generation tests expecting old composition narrative * Update fhir core and clinical-reasoning * Remove commented code * Bump to core 6.2.16-SNAPSHOT * Add missing methods * Add missing methods 2 * Fix error codes * Fix error code * Fix failing tests for Unsupported method 2488 * Fix error text * Fix another expected error message * Apply spotless * Fix error strings * Add minimal implementation to fix failing test * Fix error message * Fix some validation tests (r4) * Fix more R5 tests * Update for changing API * Fix some R4B test failures * Fix android incompatibility * Fix more tests * Switch back to LF * Fix more tests 2 * Fix R4 IPS generation use of relative references, switch to random UUID * Fix missing codes and patient ID in IPS test * Fix missing codes in IPS R4 Test 2 * Fix display value * Fix display value * Reorg wrapper issue collection; fixes errors with Balp and others * Update for API changes * Fix code set typo causing test failure * Fix DiffProviderR4Test * Fix RepositoryValidatingInterceptorHttpR4Test fails due to stricter code validation * More code fixes * Don't expect an extra error. * Use more specific logic for details tx code * Catch expected error * Clean up * Account for HAPI isEnabledValidationForCodingsLogicalAnd cases * Apply spotless * Change outputs for en_US single code test * Add missing system from code to pass validation * Account for DSTU3 and R4 including different code systems for race * Add expected loinc codes to test dao * Add some codesystem support for test * Bump core version * WIP pass on a list of CodeValidationIssue from CodeValidationResults * Re-use v2 and v3 data from r4 in r4b * CodeSystems can be supported, but not have a resource * Remove hack around unitsofmeasure + return false LookupCodeResult * Clean up chatter. * Update test cases, remove FIXME * Stop returning before adding all issues to ValidationResults * Update for changes in core API * Add severity to code issues + return to unknown system support * Use new CollectionUtils * Fix more issue messages and orders + null in TermReadSvcImpl * After checking valueSet, also check codeSystem * On second thought, always check the codesystem * Improve validation message * Refactor * Add error consistent with core validator results * Decrement query counts for validation * Improve code validation messages + don't miss invalid display on cs * Fix expected messages (added code details) * More expected message fixes * Remove redundant text from diagnostics + match core exception handling * Explicitly send tx passthrough messages no longer managed in core * Apply spotless * Add issue to code validation in TermReadSvcImpl * Adjust indexes of expected errors now that TermReadSvc is reporting * Bump to released core version * Code cleanup: commented code * More commented code cleanup * Fix parameter names * Use Set.of and List.of + fix duplicate values in set * Revert animal sniffed breakage, make field private * Add comments to describe disabled test * Remove System.out chatter * Fix javadoc generation for r5 structures module * More comments and move disabled annotation It was working when it left the shop. * Move older changelog into 7.4.0 and create core update changelog * Switch changelog type to change * Bump HAPI version * Add validation utils for FATAL issue severity * Handle FATAL codeValidationIssue severity * Fix test (validation throws more warnings) * Bump to version 7.3.4-SNAPSHOT * Bump to SNAPSHOT version of core + add necessary method implementations * Add comments to explain R4 terminology resources in R4B * Add test for Observation vital signs profile validation * Try using default validatorPolicyAdvisor * Return an empty set for fetchCanonicalResourceVersions * Profile now gives more explicit error instead of valueSet * Revert commit * Add CodeValidationIssues and additional error info * Do not return first successful match from codings. Check all. + adjust for extra errors. * apply spotless * Fix failing test, add comments re: invocations * Fix test to expect more informative error * Fix stray compilation errors from merge. * Fix merge overwrite of validation messages and indices * Fix merge overwrite of new validation results * Use core release 6.3.11 * Update HAPI version to 7.3.5-SNAPSHOT * Fix changelog * Remove commented code --------- Co-authored-by: James Agnew <[email protected]> Co-authored-by: volodymyr <[email protected]>
1 parent b39e2f8 commit 0abbb1a

File tree

162 files changed

+2552
-604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+2552
-604
lines changed

hapi-deployable-pom/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-android/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-deployable-pom</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1111
</parent>

hapi-fhir-base/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-deployable-pom</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1111
</parent>

hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/DefaultProfileValidationSupportBundleStrategy.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ private void initializeResourceLists() {
123123
break;
124124
case R4B:
125125
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/valuesets.xml");
126-
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/v2-tables.xml");
127-
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/v3-codesystems.xml");
126+
// For R4B we can re-use the same v2 and v3 files as R4, as these will not be updated and it will reduce
127+
// duplication.
128+
terminologyResources.add("/org/hl7/fhir/r4/model/valueset/v2-tables.xml");
129+
terminologyResources.add("/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml");
128130
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-resources.xml");
129131
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-types.xml");
130132
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-others.xml");

hapi-fhir-base/src/main/java/ca/uhn/fhir/context/support/IValidationSupport.java

+80-1
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,58 @@ enum IssueSeverity {
459459
INFORMATION
460460
}
461461

462+
enum CodeValidationIssueCode {
463+
NOT_FOUND,
464+
CODE_INVALID,
465+
INVALID,
466+
OTHER
467+
}
468+
469+
enum CodeValidationIssueCoding {
470+
VS_INVALID,
471+
NOT_FOUND,
472+
NOT_IN_VS,
473+
474+
INVALID_CODE,
475+
INVALID_DISPLAY,
476+
OTHER
477+
}
478+
479+
class CodeValidationIssue {
480+
481+
private final String myMessage;
482+
private final IssueSeverity mySeverity;
483+
private final CodeValidationIssueCode myCode;
484+
private final CodeValidationIssueCoding myCoding;
485+
486+
public CodeValidationIssue(
487+
String theMessage,
488+
IssueSeverity mySeverity,
489+
CodeValidationIssueCode theCode,
490+
CodeValidationIssueCoding theCoding) {
491+
this.myMessage = theMessage;
492+
this.mySeverity = mySeverity;
493+
this.myCode = theCode;
494+
this.myCoding = theCoding;
495+
}
496+
497+
public String getMessage() {
498+
return myMessage;
499+
}
500+
501+
public IssueSeverity getSeverity() {
502+
return mySeverity;
503+
}
504+
505+
public CodeValidationIssueCode getCode() {
506+
return myCode;
507+
}
508+
509+
public CodeValidationIssueCoding getCoding() {
510+
return myCoding;
511+
}
512+
}
513+
462514
class ConceptDesignation {
463515

464516
private String myLanguage;
@@ -634,6 +686,8 @@ class CodeValidationResult {
634686
private String myDisplay;
635687
private String mySourceDetails;
636688

689+
private List<CodeValidationIssue> myCodeValidationIssues;
690+
637691
public CodeValidationResult() {
638692
super();
639693
}
@@ -717,6 +771,23 @@ public CodeValidationResult setSeverity(IssueSeverity theSeverity) {
717771
return this;
718772
}
719773

774+
public List<CodeValidationIssue> getCodeValidationIssues() {
775+
if (myCodeValidationIssues == null) {
776+
myCodeValidationIssues = new ArrayList<>();
777+
}
778+
return myCodeValidationIssues;
779+
}
780+
781+
public CodeValidationResult setCodeValidationIssues(List<CodeValidationIssue> theCodeValidationIssues) {
782+
myCodeValidationIssues = new ArrayList<>(theCodeValidationIssues);
783+
return this;
784+
}
785+
786+
public CodeValidationResult addCodeValidationIssue(CodeValidationIssue theCodeValidationIssue) {
787+
getCodeValidationIssues().add(theCodeValidationIssue);
788+
return this;
789+
}
790+
720791
public boolean isOk() {
721792
return isNotBlank(myCode);
722793
}
@@ -777,14 +848,18 @@ class ValueSetExpansionOutcome {
777848
private final IBaseResource myValueSet;
778849
private final String myError;
779850

780-
public ValueSetExpansionOutcome(String theError) {
851+
private boolean myErrorIsFromServer;
852+
853+
public ValueSetExpansionOutcome(String theError, boolean theErrorIsFromServer) {
781854
myValueSet = null;
782855
myError = theError;
856+
myErrorIsFromServer = theErrorIsFromServer;
783857
}
784858

785859
public ValueSetExpansionOutcome(IBaseResource theValueSet) {
786860
myValueSet = theValueSet;
787861
myError = null;
862+
myErrorIsFromServer = false;
788863
}
789864

790865
public String getError() {
@@ -794,6 +869,10 @@ public String getError() {
794869
public IBaseResource getValueSet() {
795870
return myValueSet;
796871
}
872+
873+
public boolean getErrorIsFromServer() {
874+
return myErrorIsFromServer;
875+
}
797876
}
798877

799878
class LookupCodeResult {

hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport.displayMismatch=Concept Display "{0}" does not match expected "{1}"
2+
org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport.displayMismatch=Concept Display "{0}" does not match expected "{1}" for ''{2}#{3}''
33

44
org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService.unknownCodeInSystem=Unknown code "{0}#{1}"
55
org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService.invalidCodeInSystem=Code {0} is not valid for system: {1}

hapi-fhir-bom/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-fhir-bom</artifactId>
7-
<version>7.3.4-SNAPSHOT</version>
7+
<version>7.3.5-SNAPSHOT</version>
88

99
<packaging>pom</packaging>
1010
<name>HAPI FHIR BOM</name>
1111

1212
<parent>
1313
<groupId>ca.uhn.hapi.fhir</groupId>
1414
<artifactId>hapi-deployable-pom</artifactId>
15-
<version>7.3.4-SNAPSHOT</version>
15+
<version>7.3.5-SNAPSHOT</version>
1616

1717
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1818
</parent>

hapi-fhir-checkstyle/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-cli/hapi-fhir-cli-api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-deployable-pom</artifactId>
7-
<version>7.3.4-SNAPSHOT</version>
7+
<version>7.3.5-SNAPSHOT</version>
88

99
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
1010
</parent>

hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateCommandTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void before() {
3838

3939
@Test
4040
public void testValidateLocalProfileDstu3() {
41-
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1.xml").getFile();
41+
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1-dstu3.xml").getFile();
4242

4343
App.main(new String[]{
4444
"validate",
@@ -49,7 +49,7 @@ public void testValidateLocalProfileDstu3() {
4949

5050
@Test
5151
public void testValidateLocalProfileR4() {
52-
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1.xml").getFile();
52+
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1-r4.xml").getFile();
5353
ourLog.info(resourcePath);
5454

5555
App.main(new String[]{

hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/patient-uslab-example1.xml hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/patient-uslab-example1-dstu3.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@
4040
<extension url="http://hl7.org/fhir/StructureDefinition/us-core-race">
4141
<valueCodeableConcept>
4242
<coding>
43+
<system value="http://hl7.org/fhir/v3/Race"/>
4344
<code value="2106-3"/>
4445
</coding>
4546
</valueCodeableConcept>
4647
</extension>
4748
<extension url="http://hl7.org/fhir/StructureDefinition/us-core-ethnicity">
4849
<valueCodeableConcept>
4950
<coding>
51+
<system value="http://hl7.org/fhir/v3/Ethnicity"/>
5052
<code value="2135-2"/>
5153
</coding>
5254
</valueCodeableConcept>
@@ -78,4 +80,4 @@
7880
<postalCode value="17102"/>
7981
<country value="USA"/>
8082
</address>
81-
</Patient>
83+
</Patient>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Patient xmlns="http://hl7.org/fhir">
3+
<id value="patient-uslab-example1"/>
4+
<text>
5+
<status value="generated"/>
6+
<div xmlns="http://www.w3.org/1999/xhtml">
7+
<p>
8+
<b>Generated Narrative with Details</b>
9+
</p>
10+
<p>
11+
<b>id</b>
12+
: patient-uslab-example1
13+
</p>
14+
<p>
15+
<b>identifier</b>
16+
: 18547545 (USUAL)
17+
</p>
18+
<p>
19+
<b>name</b>
20+
: Todd G. Lerr (OFFICIAL)
21+
</p>
22+
<p>
23+
<b>gender</b>
24+
: male
25+
</p>
26+
<p>
27+
<b>birthDate</b>
28+
: Jun 7, 2012
29+
</p>
30+
<p>
31+
<b>deceased</b>
32+
: false
33+
</p>
34+
<p>
35+
<b>address</b>
36+
: 123 North 102nd Street Apt 4d Harrisburg PA 17102 USA (HOME)
37+
</p>
38+
</div>
39+
</text>
40+
<extension url="http://hl7.org/fhir/StructureDefinition/us-core-race">
41+
<valueCodeableConcept>
42+
<coding>
43+
<system value="http://terminology.hl7.org/CodeSystem/v3-Race"/>
44+
<code value="2106-3"/>
45+
</coding>
46+
</valueCodeableConcept>
47+
</extension>
48+
<extension url="http://hl7.org/fhir/StructureDefinition/us-core-ethnicity">
49+
<valueCodeableConcept>
50+
<coding>
51+
<system value="http://terminology.hl7.org/CodeSystem/v3-Ethnicity"/>
52+
<code value="2135-2"/>
53+
</coding>
54+
</valueCodeableConcept>
55+
</extension>
56+
<!-- EH: limit to single identifier that orderer can match to patient system can be URL -->
57+
<identifier>
58+
<use value="usual"/>
59+
<system value="urn:oid:2.16.840.1.113883.3.72.5.30.2"/>
60+
<value value="18547545"/>
61+
</identifier>
62+
<!-- name use limited to official and anonymous -->
63+
<name>
64+
<use value="official"/>
65+
<family value="Lerr"/>
66+
<given value="Todd"/>
67+
<given value="G."/>
68+
<suffix value="Jr"/>
69+
</name>
70+
<!-- use FHIR code system for male / female -->
71+
<gender value="male"/>
72+
<birthDate value="2012-06-07"/>
73+
<deceasedBoolean value="false"/>
74+
<address>
75+
<use value="home"/>
76+
<line value="123 North 102nd Street"/>
77+
<line value="Apt 4d"/>
78+
<city value="Harrisburg"/>
79+
<state value="PA"/>
80+
<postalCode value="17102"/>
81+
<country value="USA"/>
82+
</address>
83+
</Patient>

hapi-fhir-cli/hapi-fhir-cli-app/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>ca.uhn.hapi.fhir</groupId>
88
<artifactId>hapi-fhir-cli</artifactId>
9-
<version>7.3.4-SNAPSHOT</version>
9+
<version>7.3.5-SNAPSHOT</version>
1010

1111
<relativePath>../pom.xml</relativePath>
1212
</parent>

hapi-fhir-cli/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-client-okhttp/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-deployable-pom</artifactId>
7-
<version>7.3.4-SNAPSHOT</version>
7+
<version>7.3.5-SNAPSHOT</version>
88

99
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1010
</parent>

hapi-fhir-client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-deployable-pom</artifactId>
7-
<version>7.3.4-SNAPSHOT</version>
7+
<version>7.3.5-SNAPSHOT</version>
88

99
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1010
</parent>

hapi-fhir-converter/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-deployable-pom</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1111
</parent>

hapi-fhir-converter/src/main/java/ca/uhn/hapi/converters/canonical/VersionCanonicalizer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ public StructureDefinition structureDefinitionToCanonical(IBaseResource theResou
250250
String packageUserData = (String) theResource.getUserData("package");
251251
if (packageUserData != null) {
252252
retVal.setUserData("package", packageUserData);
253-
retVal.setSourcePackage(new PackageInformation(packageUserData, new Date()));
253+
retVal.setSourcePackage(new PackageInformation(
254+
packageUserData, theResource.getStructureFhirVersionEnum().getFhirVersionString(), new Date()));
254255
}
255256
return retVal;
256257
}

hapi-fhir-dist/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>7.3.4-SNAPSHOT</version>
8+
<version>7.3.5-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

0 commit comments

Comments
 (0)