mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-17 18:35:50 +00:00
Just tester tweaks
This commit is contained in:
parent
5cd13bc73f
commit
364f11ad8f
@ -15,6 +15,8 @@ import ca.uhn.fhir.rest.client.IGenericClient;
|
||||
|
||||
public class UhnFhirTestApp {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UhnFhirTestApp.class);
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
int myPort = 8888;
|
||||
@ -42,7 +44,12 @@ public class UhnFhirTestApp {
|
||||
|
||||
server.setHandler(root);
|
||||
|
||||
try {
|
||||
server.start();
|
||||
} catch (Exception e) {
|
||||
ourLog.error("Failure during startup", e);
|
||||
}
|
||||
server.stop();
|
||||
|
||||
// base = "http://fhir.healthintersections.com.au/open";
|
||||
// base = "http://spark.furore.com/fhir";
|
||||
@ -50,7 +57,7 @@ public class UhnFhirTestApp {
|
||||
if (true) {
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
IGenericClient client = ctx.newRestfulGenericClient(base);
|
||||
// client.setLogRequestAndResponse(true);
|
||||
// client.setLogRequestAndResponse(true);
|
||||
|
||||
Organization o1 = new Organization();
|
||||
o1.getNameElement().setValue("Some Org");
|
||||
@ -69,14 +76,14 @@ public class UhnFhirTestApp {
|
||||
subs.setCriteria("Observation?");
|
||||
client.create().resource(subs).execute();
|
||||
|
||||
// for (int i = 0; i < 1000; i++) {
|
||||
//
|
||||
// Patient p = (Patient) resources.get(0);
|
||||
// p.addName().addFamily("Transaction"+i);
|
||||
//
|
||||
// ourLog.info("Transaction count {}", i);
|
||||
// client.transaction(resources);
|
||||
// }
|
||||
// for (int i = 0; i < 1000; i++) {
|
||||
//
|
||||
// Patient p = (Patient) resources.get(0);
|
||||
// p.addName().addFamily("Transaction"+i);
|
||||
//
|
||||
// ourLog.info("Transaction count {}", i);
|
||||
// client.transaction(resources);
|
||||
// }
|
||||
|
||||
client.create().resource(p1).execute();
|
||||
client.create().resource(p1).execute();
|
||||
@ -98,5 +105,4 @@ public class UhnFhirTestApp {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user