Skip to content

Commit

Permalink
Upgrade failing test to FHIR 6.6.1 (apache#931)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d365fd)
  • Loading branch information
Croway authored and ffang committed Sep 12, 2023
1 parent 7798b4b commit 9bdb1c8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.camel.component.fhir;

import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
Expand Down Expand Up @@ -164,7 +163,7 @@ public void testResourceBySearchUrl() throws Exception {
Date date = new SimpleDateFormat("yyyy-MM-dd").parse("1998-04-29");
assertNotEquals(date, patient.getBirthDate());
this.patient.setBirthDate(date);
String url = "Patient?" + Patient.SP_IDENTIFIER + '=' + URLEncoder.encode(this.patient.getId(), "UTF-8");
String url = "Patient?" + Patient.SP_RES_ID + '=' + patient.getIdPart();
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseResource
headers.put("CamelFhir.resource", this.patient);
Expand All @@ -185,7 +184,7 @@ public void testResourceBySearchUrlAndResourceAsString() throws Exception {
Date date = new SimpleDateFormat("yyyy-MM-dd").parse("1998-04-29");
assertNotEquals(date, patient.getBirthDate());
this.patient.setBirthDate(date);
String url = "Patient?" + Patient.SP_IDENTIFIER + '=' + URLEncoder.encode(this.patient.getId(), "UTF-8");
String url = "Patient?" + Patient.SP_RES_ID + '=' + patient.getIdPart();
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseResource
headers.put("CamelFhir.resourceAsString", this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
Expand Down

0 comments on commit 9bdb1c8

Please sign in to comment.