IPS builder test case

This commit is contained in:
Grahame Grieve 2023-11-22 07:51:59 +11:00
parent ea9a498730
commit 2e19e6bbc1
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package org.hl7.fhir.r4.ips;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URISyntaxException;
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
import org.hl7.fhir.r4.formats.JsonParser;
import org.hl7.fhir.r4.model.Base64BinaryType;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.utils.client.FHIRToolingClient;
import org.hl7.fhir.utilities.Utilities;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
public class IpsBuilderTest {
@Test
@DisplayName("Test IPS Generation")
void testIpsGeneration() throws URISyntaxException, FileNotFoundException, IOException {
FHIRToolingClient server = new FHIRToolingClient("https://hl7auconnectathon.salessbx.smiledigitalhealth.com/fhir-request", "FHIR-Validator");
server.setUsername("HL7AU");
server.setPassword("Connectathon123");
Bundle bnd = IPSBuilder.generateIPS(server, "wang-li");
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path("[tmp]", "ips-gen.json")), bnd);
}
}