Skip to content

Instantly share code, notes, and snippets.

@KevinMayfield
Last active December 11, 2018 11:54
Show Gist options
  • Save KevinMayfield/446e69101e89ff9d65e38dcdd1dd5153 to your computer and use it in GitHub Desktop.
Save KevinMayfield/446e69101e89ff9d65e38dcdd1dd5153 to your computer and use it in GitHub Desktop.
MethodOutcome outcome = clientCCRI.create().resource(bundle).execute();
if (outcome.getCreated()) {
sendNRLS((Bundle) outcome.getResource());
}
}
private void sendNRLS(Bundle bundle) {
for (Bundle.BundleEntryComponent entry : bundle.getEntry()) {
if (entry.getResource() instanceof DocumentReference) {
DocumentReference documentReference = (DocumentReference) entry.getResource();
System.out.println(FhirContext.forDstu3().newXmlParser().setPrettyPrint(true).encodeResourceToString(documentReference));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment