Skip to content

Commit 4550de9

Browse files
authored
Update to Firely 5.11.3, add binary resource test (#4814)
Update FhirService to use Firely 5.11.3 SDK Refs AB#135366
1 parent 0606cc8 commit 4550de9

22 files changed

+1090
-52
lines changed

Diff for: Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2020
<RepositoryUrl>https://github.com/microsoft/fhir-server</RepositoryUrl>
2121
<RunSettingsFilePath>$(MSBuildThisFileDirectory)\CodeCoverage.runsettings</RunSettingsFilePath>
22-
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
22+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
2323
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
2424
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2525
<WarningsAsErrors />

Diff for: Directory.Packages.props

+13-19
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
11
<Project>
22
<!-- Shared dependencies versions.-->
33
<PropertyGroup>
4-
<HealthcareSharedPackageVersion>8.0.30</HealthcareSharedPackageVersion>
5-
<Hl7FhirVersion>5.4.0</Hl7FhirVersion>
6-
<Hl7FhirLegacyVersion>5.3.0</Hl7FhirLegacyVersion>
4+
<HealthcareSharedPackageVersion>8.0.33</HealthcareSharedPackageVersion>
5+
<Hl7FhirVersion>5.11.3</Hl7FhirVersion>
6+
<Hl7FhirLegacyVersion>5.11.0</Hl7FhirLegacyVersion>
77
</PropertyGroup>
88
<!-- SDK Packages -->
99
<Choose>
10-
<When Condition="'$(TargetFramework)' == 'net6.0'">
11-
<PropertyGroup>
12-
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
13-
<MediatRVersion>12.4.1</MediatRVersion>
14-
<LoggingVersion>8.0.2</LoggingVersion>
15-
<SdkPackageVersion>8.0</SdkPackageVersion>
16-
<AspNetPackageVersion>6.0</AspNetPackageVersion>
17-
</PropertyGroup>
18-
</When>
1910
<When Condition="'$(TargetFramework)' == 'net8.0'">
2011
<PropertyGroup>
2112
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
2213
<MediatRVersion>12.4.1</MediatRVersion>
2314
<LoggingVersion>8.0.2</LoggingVersion>
15+
<ConsoleLoggingVersion>8.0.1</ConsoleLoggingVersion>
2416
<SdkPackageVersion>8.0</SdkPackageVersion>
25-
<AspNetPackageVersion>8.0</AspNetPackageVersion>
17+
<AspNetPackageVersion>8.0.12</AspNetPackageVersion>
2618
</PropertyGroup>
2719
</When>
2820
<Otherwise>
2921
<PropertyGroup>
3022
<MediatRVersion>12.4.1</MediatRVersion>
3123
<LoggingVersion>9.0.1</LoggingVersion>
32-
<SdkPackageVersion>9.0.0</SdkPackageVersion>
33-
<AspNetPackageVersion>9.0.0</AspNetPackageVersion>
24+
<ConsoleLoggingVersion>9.0.1</ConsoleLoggingVersion>
25+
<SdkPackageVersion>9.0</SdkPackageVersion>
26+
<AspNetPackageVersion>9.0.1</AspNetPackageVersion>
3427
</PropertyGroup>
3528
</Otherwise>
3629
</Choose>
@@ -40,7 +33,7 @@
4033
<!--CVE-2023-29331-->
4134
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="8.0.1" />
4235
<!-- CVE-2021-26701 -->
43-
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
36+
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.1" />
4437
<!-- CVE-2020-1045 -->
4538
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
4639
<!-- CVE-2022-26907 -->
@@ -100,7 +93,7 @@
10093
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(LoggingVersion)" />
10194
<PackageVersion Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
10295
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(SdkPackageVersion)" />
103-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(SdkPackageVersion)" />
96+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(ConsoleLoggingVersion)" />
10497
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(SdkPackageVersion)" />
10598
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(SdkPackageVersion)" />
10699
<PackageVersion Include="Microsoft.Health.Abstractions" Version="$(HealthcareSharedPackageVersion)" />
@@ -110,8 +103,8 @@
110103
<PackageVersion Include="Microsoft.Health.Encryption" Version="$(HealthcareSharedPackageVersion)" />
111104
<PackageVersion Include="Microsoft.Health.Extensions.BuildTimeCodeGenerator" Version="$(HealthcareSharedPackageVersion)" />
112105
<PackageVersion Include="Microsoft.Health.Extensions.DependencyInjection" Version="$(HealthcareSharedPackageVersion)" />
113-
<PackageVersion Include="Microsoft.Health.Fhir.Anonymizer.R4.Core" Version="3.1.0.90" />
114-
<PackageVersion Include="Microsoft.Health.Fhir.Anonymizer.Stu3.Core" Version="3.1.0.90" />
106+
<PackageVersion Include="Microsoft.Health.Fhir.Anonymizer.R4.Core" Version="4.1.1.3" />
107+
<PackageVersion Include="Microsoft.Health.Fhir.Anonymizer.Stu3.Core" Version="4.1.1.3" />
115108
<PackageVersion Include="Microsoft.Health.Fhir.Liquid.Converter" Version="7.0.1" />
116109
<PackageVersion Include="Microsoft.Health.SqlServer.Api" Version="$(HealthcareSharedPackageVersion)" />
117110
<PackageVersion Include="Microsoft.Health.SqlServer" Version="$(HealthcareSharedPackageVersion)" />
@@ -147,5 +140,6 @@
147140
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
148141
<PackageVersion Include="System.Drawing.Common" Version="8.0.8" />
149142
<PackageVersion Include="Moq" Version="4.20.69" />
143+
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
150144
</ItemGroup>
151145
</Project>

Diff for: build/ci-pipeline.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,14 @@ stages:
7474
targetBuildFramework: $(defaultBuildFramework)
7575
unitTest: false
7676
codeCoverage: true
77-
- job: Windows_dotnet8
78-
pool:
79-
name: '$(DefaultWindowsPool)'
80-
steps:
81-
- template: ./jobs/build.yml
82-
parameters:
83-
targetBuildFramework: 'net8.0'
84-
- job: Linux_dotnet6
77+
- job: Linux_dotnet8
8578
pool:
8679
name: '$(DefaultLinuxPool)'
8780
vmImage: '$(LinuxVmImage)'
8881
steps:
8982
- template: ./jobs/build.yml
9083
parameters:
91-
targetBuildFramework: 'net6.0'
84+
targetBuildFramework: 'net8.0'
9285

9386
- stage: BuildArtifacts
9487
displayName: 'Build artifacts'

Diff for: build/pr-pipeline.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,14 @@ stages:
4646
targetBuildFramework: $(defaultBuildFramework)
4747
unitTest: false
4848
codeCoverage: true
49-
- job: Windows_dotnet8
50-
pool:
51-
name: '$(DefaultWindowsPool)'
52-
steps:
53-
- template: ./jobs/build.yml
54-
parameters:
55-
targetBuildFramework: 'net8.0'
56-
- job: Linux_dotnet6
49+
- job: Linux_dotnet8
5750
pool:
5851
name: '$(DefaultLinuxPool)'
5952
vmImage: '$(LinuxVmImage)'
6053
steps:
6154
- template: ./jobs/build.yml
6255
parameters:
63-
targetBuildFramework: 'net6.0'
56+
targetBuildFramework: 'net8.0'
6457

6558
- stage: BuildArtifacts
6659
displayName: 'Build artifacts'

Diff for: docs/rest/binary-example.json

+9
Large diffs are not rendered by default.

Diff for: src/Microsoft.Health.Fhir.Core/Models/ResourceElement.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public ResourceElement(ITypedElement instance)
3131
EnsureArg.IsNotNull(instance, nameof(instance));
3232

3333
Instance = instance;
34-
_context = new Lazy<EvaluationContext>(() => new EvaluationContext(instance));
34+
_context = new Lazy<EvaluationContext>(() =>
35+
new EvaluationContext().WithResourceOverrides(instance));
3536
}
3637

3738
internal ResourceElement(ITypedElement instance, object resourceInstance)

Diff for: src/Microsoft.Health.Fhir.Shared.Core/Features/Search/Parameters/SearchParameterToTypeResolver.cs

+12
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,18 @@ private static EnumerableReturnType Visit(VariableRefExpression expression, Cont
289289
throw new NotImplementedException();
290290
}
291291

292+
private static EnumerableReturnType Visit(BracketExpression expression, Context ctx)
293+
{
294+
if (expression.Operand != null)
295+
{
296+
return Accept(expression.Operand, ctx);
297+
}
298+
299+
// Bracket expressions should always have an operand.
300+
// They should fail compilation if they don't.
301+
throw new NotImplementedException();
302+
}
303+
292304
private static EnumerableReturnType Visit(Expression expression, Context ctx)
293305
{
294306
throw new NotImplementedException();

Diff for: src/Microsoft.Health.Fhir.Tests.Common/Microsoft.Health.Fhir.Tests.Common.csproj

+22
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<None Remove="TestFiles\Normative\Bundle-BatchWithConditionalUpdateByIdentifier.json" />
1717
<None Remove="TestFiles\Normative\MemberMatch.json" />
1818
<None Remove="TestFiles\Normative\sql_8623_script.sql" />
19+
<None Remove="TestFiles\R4B\CommunicationAttachment.json" />
20+
<None Remove="TestFiles\R4\binary-example.json" />
21+
<None Remove="TestFiles\R4\CommunicationAttachment.json" />
22+
<None Remove="TestFiles\R4\DocumentReference-example-with-base64.json" />
23+
<None Remove="TestFiles\R5\binary-example.json" />
24+
<None Remove="TestFiles\R5\CommunicationAttachment.json" />
25+
<None Remove="TestFiles\R5\DocumentReference-example-with-base64.json" />
26+
<None Remove="TestFiles\Stu3\binary-example.json" />
27+
<None Remove="TestFiles\Stu3\CommunicationAttachment.json" />
28+
<None Remove="TestFiles\Stu3\DocumentReference-example-with-base64.json" />
1929
<None Remove="TestFiles\Stu3\MemberMatch.json" />
2030
<None Remove="TestFiles\Normative\Bundle-BatchWithDuplicatedItems.json" />
2131
</ItemGroup>
@@ -92,6 +102,10 @@
92102
<EmbeddedResource Include="TestFiles\Normative\SearchParameterMissingExpression.json" />
93103
<EmbeddedResource Include="TestFiles\Normative\SearchParameterMissingBase.json" />
94104
<EmbeddedResource Include="TestFiles\Normative\Specimen.json" />
105+
<EmbeddedResource Include="TestFiles\R4B\binary-example.json" />
106+
<EmbeddedResource Include="TestFiles\R4B\CommunicationAttachment.json" />
107+
<EmbeddedResource Include="TestFiles\R4B\DocumentReference-example-with-base64.json" />
108+
<EmbeddedResource Include="TestFiles\R4\binary-example.json" />
95109
<EmbeddedResource Include="TestFiles\R4\Bundle-ChainingSortAndSearchValidation.json" />
96110
<EmbeddedResource Include="TestFiles\R4\CarePlan.json" />
97111
<EmbeddedResource Include="TestFiles\Normative\CodeSystem-careplan-category.json" />
@@ -156,6 +170,7 @@
156170
<EmbeddedResource Include="TestFiles\Normative\ValueSet.json" />
157171
<EmbeddedResource Include="TestFiles\Normative\Weight.json" />
158172
<EmbeddedResource Include="TestFiles\Normative\WeightInGrams.json" />
173+
<EmbeddedResource Include="TestFiles\R4\CommunicationAttachment.json" />
159174
<EmbeddedResource Include="TestFiles\R4\DocumentReference-example-relatesTo-code-appends.indexes.json" />
160175
<EmbeddedResource Include="TestFiles\R4\DocumentReference-example-relatesTo-code-appends.json" />
161176
<EmbeddedResource Include="TestFiles\R4\DocumentReference-example-relatesTo-code-transforms-replaces-target.indexes.json" />
@@ -164,6 +179,7 @@
164179
<EmbeddedResource Include="TestFiles\R4\DocumentReference-example-relatesTo-code-transforms.json" />
165180
<EmbeddedResource Include="TestFiles\Normative\Sequence.json" />
166181
<EmbeddedResource Include="TestFiles\Normative\Parameter-Convert-Data.json" />
182+
<EmbeddedResource Include="TestFiles\R4\DocumentReference-example-with-base64.json" />
167183
<EmbeddedResource Include="TestFiles\R4\Immunization.json" />
168184
<EmbeddedResource Include="TestFiles\R4\SmartCommon.json" />
169185
<EmbeddedResource Include="TestFiles\R4\SmartPatientA.json" />
@@ -172,10 +188,12 @@
172188
<EmbeddedResource Include="TestFiles\R5\Appointment.json" />
173189
<EmbeddedResource Include="TestFiles\R5\BasicExampleNarrative.json" />
174190
<EmbeddedResource Include="TestFiles\R5\BasicExampleNarrative.xml" />
191+
<EmbeddedResource Include="TestFiles\R5\binary-example.json" />
175192
<EmbeddedResource Include="TestFiles\R5\Bundle-ChainingSortAndSearchValidation.json" />
176193
<EmbeddedResource Include="TestFiles\R5\Bundle-TransactionWithInvalidBundleEntry.json" />
177194
<EmbeddedResource Include="TestFiles\R5\Bundle-TransactionWithReferenceInResourceBody.json" />
178195
<EmbeddedResource Include="TestFiles\R5\CarePlan.json" />
196+
<EmbeddedResource Include="TestFiles\R5\CommunicationAttachment.json" />
179197
<EmbeddedResource Include="TestFiles\R5\Condition-For-Patient-f001.json" />
180198
<EmbeddedResource Include="TestFiles\R5\Coverage.json" />
181199
<EmbeddedResource Include="TestFiles\R5\Device-d1.json" />
@@ -185,6 +203,7 @@
185203
<EmbeddedResource Include="TestFiles\R5\DocumentReference-example-relatesTo-code-transforms-replaces-target.json" />
186204
<EmbeddedResource Include="TestFiles\R5\DocumentReference-example-relatesTo-code-transforms.indexes.json" />
187205
<EmbeddedResource Include="TestFiles\R5\DocumentReference-example-relatesTo-code-transforms.json" />
206+
<EmbeddedResource Include="TestFiles\R5\DocumentReference-example-with-base64.json" />
188207
<EmbeddedResource Include="TestFiles\R5\Encounter-For-Patient-f001.json" />
189208
<EmbeddedResource Include="TestFiles\R5\Immunization.json" />
190209
<EmbeddedResource Include="TestFiles\R5\InvalidCompartmentDefinition.json" />
@@ -226,6 +245,7 @@
226245
<EmbeddedResource Include="TestFiles\R4\ValidCompartmentDefinition.json" />
227246
<EmbeddedResource Include="TestFiles\Stu3\BasicExampleNarrative.json" />
228247
<EmbeddedResource Include="TestFiles\Stu3\BasicExampleNarrative.xml" />
248+
<EmbeddedResource Include="TestFiles\Stu3\binary-example.json" />
229249
<EmbeddedResource Include="TestFiles\Stu3\BloodGlucose.json" />
230250
<EmbeddedResource Include="TestFiles\Stu3\BloodPressure.json" />
231251
<EmbeddedResource Include="TestFiles\Stu3\Bundle-Batch.json" />
@@ -246,6 +266,7 @@
246266
<EmbeddedResource Include="TestFiles\Stu3\Bundle-TransactionWithPOSTFullUrlMatchesWithPUTRequestUrl.json" />
247267
<EmbeddedResource Include="TestFiles\Stu3\Bundle-TypeMissing.json" />
248268
<EmbeddedResource Include="TestFiles\Stu3\CarePlan.json" />
269+
<EmbeddedResource Include="TestFiles\Stu3\CommunicationAttachment.json" />
249270
<EmbeddedResource Include="TestFiles\Stu3\Condition-For-Patient-f001.json" />
250271
<EmbeddedResource Include="TestFiles\Stu3\Device-d1.json" />
251272
<EmbeddedResource Include="TestFiles\Stu3\DeviceComponent-For-Device-d1.json" />
@@ -255,6 +276,7 @@
255276
<EmbeddedResource Include="TestFiles\Stu3\DocumentReference-example-relatesTo-code-transforms-replaces-target.json" />
256277
<EmbeddedResource Include="TestFiles\Stu3\DocumentReference-example-relatesTo-code-transforms.indexes.json" />
257278
<EmbeddedResource Include="TestFiles\Stu3\DocumentReference-example-relatesTo-code-transforms.json" />
279+
<EmbeddedResource Include="TestFiles\Stu3\DocumentReference-example-with-base64.json" />
258280
<EmbeddedResource Include="TestFiles\Stu3\Encounter-For-Patient-f001.json" />
259281
<EmbeddedResource Include="TestFiles\Stu3\Immunization.json" />
260282
<EmbeddedResource Include="TestFiles\Stu3\InvalidObservation.json" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"resourceType": "Communication",
3+
"id": "fm-attachment",
4+
"text": {
5+
"status": "generated",
6+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Attachment which is unsolicited</div>"
7+
},
8+
"identifier": [
9+
{
10+
"system": "http://www.providerco.com/communication",
11+
"value": "12345"
12+
}
13+
],
14+
"status": "completed",
15+
"category": [
16+
{
17+
"coding": [
18+
{
19+
"system": "http://acme.org/messagetypes",
20+
"code": "SolicitedAttachment"
21+
}
22+
]
23+
}
24+
],
25+
"subject": {
26+
"reference": "Patient/1"
27+
},
28+
"about": [
29+
{
30+
"identifier": {
31+
"system": "http://happyvalley.com/claim",
32+
"value": "12345"
33+
}
34+
},
35+
{
36+
"identifier": {
37+
"system": "http://www.BenefitsInc.com/fhir/claimresponse",
38+
"value": "R3500"
39+
}
40+
}
41+
],
42+
"sent": "2016-06-12T18:01:10-08:00",
43+
"recipient": [
44+
{
45+
"identifier": {
46+
"system": "http://www.jurisdiction.com/insurer",
47+
"value": "123456"
48+
}
49+
}
50+
],
51+
"sender": {
52+
"identifier": {
53+
"system": "http://www.jurisdiction.com/provideroffices",
54+
"value": "3456"
55+
}
56+
},
57+
"payload": [
58+
{
59+
"contentAttachment": {
60+
"contentType": "application/pdf",
61+
"data": "SGVsbG8=",
62+
"title": "accident notes 20100201.pdf",
63+
"creation": "2010-02-01T11:50:23-05:00"
64+
}
65+
},
66+
{
67+
"contentAttachment": {
68+
"contentType": "application/pdf",
69+
"url": "http://example.org/docs/AB12345",
70+
"size": 104274,
71+
"hash": "SGVsbG8gdGhlcmU=",
72+
"creation": "2010-02-01T10:57:34+01:00"
73+
}
74+
}
75+
]
76+
}

0 commit comments

Comments
 (0)