More JDK10 fixes

This commit is contained in:
jamesagnew 2018-05-31 16:15:10 -04:00
parent 1999e23dc9
commit 2b7e0a87c8
3 changed files with 18 additions and 33 deletions

View File

@ -14,6 +14,7 @@ import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.Ignore;
import java.io.*;
import java.net.HttpURLConnection;
@ -188,7 +189,8 @@ public class CdsExampleTests {
Assert.assertTrue(procedureRequest.getDoNotPerform());
}
//@Test
@Test
@Ignore
public void CdsHooksPatientViewTest() throws IOException {
putResource("cds-bcs-library.json", "patient-view");
putResource("cds-bcs-patient.json", "Patient-6532");

View File

@ -77,6 +77,21 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.helger</groupId>
<artifactId>ph-schematron</artifactId>

View File

@ -1228,38 +1228,6 @@ public class XmlParserHl7OrgDstu2Test {
"<given value=\"Shmoe\"><extension url=\"http://examples.com#givenext_parent\"><extension url=\"http://examples.com#givenext_child\"><valueString value=\"CHILD\"/></extension></extension></given>"));
}
// Narrative generation not currently supported for HL7org structures
public void testNarrativeGeneration() throws DataFormatException, IOException {
org.hl7.fhir.instance.model.Patient patient = new org.hl7.fhir.instance.model.Patient();
patient.addName().addFamily("Smith");
Organization org = new Organization();
patient.getManagingOrganization().setResource(org);
INarrativeGenerator gen = new INarrativeGenerator() {
@Override
public void generateNarrative(FhirContext theContext, IBaseResource theResource, INarrative theNarrative) {
try {
theNarrative.setDivAsString("<div>help</div>");
} catch (Exception e) {
throw new Error(e);
}
theNarrative.setStatusAsString("generated");
}
};
FhirContext context = ourCtx;
context.setNarrativeGenerator(gen);
IParser p = context.newXmlParser();
String str = p.encodeResourceToString(patient);
ourLog.info(str);
assertThat(str, StringContains.containsString(",\"text\":{\"status\":\"generated\",\"div\":\"<div>help</div>\"},"));
}
@Test
public void testNestedContainedResources() {