This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendNRLS(Bundle bundle) { | |
for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { | |
if (entry.getResource() instanceof DocumentReference) { | |
DocumentReference documentReference = (DocumentReference) entry.getResource(); | |
documentReference.setSubject(new Reference("https://demographics.spineservices.nhs.uk/STU3/Patient/9658220169")); | |
documentReference.setAuthor(new ArrayList<>()); | |
documentReference.addAuthor().setReference("https://directory.spineservices.nhs.uk/STU3/Organization/MHT01"); | |
documentReference.setCustodian(new Reference("https://directory.spineservices.nhs.uk/STU3/Organization/MHT01")); | |
documentReference.setType(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendNRLS(Bundle bundle) { | |
for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { | |
if (entry.getResource() instanceof DocumentReference) { | |
DocumentReference documentReference = (DocumentReference) entry.getResource(); | |
documentReference.setSubject(new Reference("https://demographics.spineservices.nhs.uk/STU3/Patient/9658220169")); | |
documentReference.setAuthor(new ArrayList<>()); | |
documentReference.addAuthor().setReference("https://directory.spineservices.nhs.uk/STU3/Organization/MHT01"); | |
documentReference.setCustodian(new Reference("https://directory.spineservices.nhs.uk/STU3/Organization/MHT01")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.nhs.careconnect.hapiclient.App; | |
import ca.uhn.fhir.rest.api.Constants; | |
import ca.uhn.fhir.rest.client.api.IClientInterceptor; | |
import ca.uhn.fhir.rest.client.api.IHttpRequest; | |
import ca.uhn.fhir.rest.client.api.IHttpResponse; | |
import java.io.IOException; | |
import java.util.Iterator; | |
import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc.getMeta().addProfile("https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-DocumentReference-1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MedicationDispense> | |
... | |
<medicationReference> | |
<reference value="urn:uuid:9c7e61c3-5b92-4828-9ebc-21e74bcdbc96"/> | |
</medicationReference> | |
.... | |
</MedicationDispense> | |
or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Condition> | |
... | |
<subject> | |
<reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"/> | |
</subject> | |
.... | |
</Condition> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Condition> | |
... | |
<subject> | |
<reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"/> | |
<display value="Mike Meakin"/> | |
<identifier> | |
<system value="https://fhir.nhs.uk/Id/nhs-number"/> | |
<value value="9876543210"/> | |
<identifier> | |
</subject> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resourceType": "Questionnaire", | |
"id": "4", | |
"meta": { | |
"lastUpdated": "2019-03-09T12:52:16.950+00:00" | |
}, | |
"url": "https://fhir.nhs.uk/STU3/Questionnaire/CareConnect-EOLC-1", | |
"identifier": [ | |
{ | |
"system": "https://fhir.nhs.uk/STU3/Questionnaire", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Bundle xmlns="http://hl7.org/fhir"> | |
<id value="53426798-d3ec-4a20-9483-6a643f75b08a"/> | |
<meta> | |
<lastUpdated value="2019-03-09T12:52:55.554+00:00"/> | |
</meta> | |
<type value="searchset"/> | |
<total value="15"/> | |
<link> | |
<relation value="self"/> | |
<url value="https://data.developer-test.nhs.uk/ccri-fhir/STU3/QuestionnaireResponse?_count=50&_include=*&questionnaire=https%3A%2F%2Ffhir.nhs.uk%2FSTU3%2FQuestionnaire%2FCareConnect-EOLC-1"/> |