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
Binary binary = new Binary(); | |
String dummyContent = "<!DOCTYPE html><html><body>SOME TEXT</body></html>"; | |
binary.setContent (dummyContent.getBytes()); | |
binary.setContentType("text/html"); | |
System.out.println(FhirContext.forDstu3().newJsonParser().setPrettyPrint(true).encodeResourceToString(binary)); |
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
DocumentReference doc = new DocumentReference(); | |
doc.setSubject(new Reference("https://demographics.spineservices.nhs.uk/STU3/Patient/9658218881")); | |
doc.setStatus(Enumerations.DocumentReferenceStatus.CURRENT); | |
doc.getType().addCoding() | |
.setSystem("http://snomed.info/sct") | |
.setCode("734163000") | |
.setDisplay("Care Plan"); | |
doc.addAuthor() .setReference("https://directory.spineservices.nhs.uk/STU3/Organization/RR8").setDisplay("LEEDS TEACHING HOSPITALS NHS TRUST"); | |
doc.setIndexed(new Date()); |
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
Binary binary = new Binary(); | |
binary.setId(UUID.randomUUID().toString()); | |
String dummyContent = "<!DOCTYPE html><html><body>SOME TEXT</body></html>"; | |
binary.setContent (dummyContent.getBytes()); | |
binary.setContentType("text/html"); | |
System.out.println(FhirContext.forDstu3().newJsonParser().setPrettyPrint(true).encodeResourceToString(binary)); | |
DocumentReference doc = new DocumentReference(); | |
doc.setId(UUID.randomUUID().toString()); | |
doc.setSubject(new Reference("https://demographics.spineservices.nhs.uk/STU3/Patient/9658220169")); |
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
IGenericClient clientODS = ctxFHIR.newRestfulGenericClient("https://directory.spineservices.nhs.uk/STU3/"); | |
clientODS.setEncoding(EncodingEnum.XML); | |
Organization organization = clientODS | |
.read() | |
.resource(Organization.class) | |
.withId("RR8").execute(); | |
organization.setId(UUID.randomUUID().toString()); |
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
Patient patient = null; | |
IGenericClient clientCCRI = ctxFHIR.newRestfulGenericClient("https://directory.spineservices.nhs.uk/STU3/"); | |
clientODS.setEncoding(EncodingEnum.XML); | |
Bundle patientSearchbundle = clientCCRI | |
.search() | |
.forResource(Patient.class) | |
.where(Patient.IDENTIFIER.exactly().systemAndCode("https://fhir.nhs.uk/Id/nhs-number","9658220169")) | |
.returnBundle(Bundle.class) | |
.execute(); | |
if (patientSearchbundle.getEntry().size()>0) { |
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 DocumentReference getSimple() { | |
Binary binary = new Binary(); | |
binary.setId(UUID.randomUUID().toString()); | |
String dummyContent = "<!DOCTYPE html><html><body>SOME TEXT</body></html>"; | |
binary.setContent (dummyContent.getBytes()); | |
binary.setContentType("text/html"); | |
//System.out.println(FhirContext.forDstu3().newJsonParser().setPrettyPrint(true).encodeResourceToString(binary)); | |
DocumentReference doc = new 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
<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:fhir="http://hl7.org/fhir"> | |
<head> | |
<title>Patient Summary Care Record</title> | |
<style type="text/css"> | |
body { color: #000000; font-size: 10pt; line-height: normal; font-family: Verdana, Arial, sans-serif; margin: 10px; } | |
h1 { font-size: 14pt; text-decoration: underline; font-weight: bold; color: #000000; margin-top: 25px; margin-bottom: 15px;} | |
h2 { font-size: 12pt; text-decoration: underline; font-weight: bold; color: #000000; margin-top: 25px; margin-bottom: 15px; } | |
h3 { font-size: 10pt; font-weight: bold; color: #000000; margin-top: 5px; margin-bottom: 15px; } | |
h4 { font-size: 10pt; font-weight: bold; text-decoration: underline; color: #000000; margin-top: 5px; margin-bottom: 15px; } | |
h5 { font-size: 10pt; font-weight: normal; text-decoration: underline; color: #000000; margin-top: 5px; margin-bottom: 15px; } |
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": "Bundle", | |
"identifier": { | |
"system": "https://tools.ietf.org/html/rfc4122", | |
"value": "d124df3f-e966-46c7-9159-401af1974541" | |
}, | |
"type": "document", | |
"entry": [ | |
{ | |
"fullUrl": "urn:uuid:37f316aa-94a7-4659-90fd-1d605095cf64", |
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
<Observation xmlns="http://hl7.org/fhir"> | |
<id value="178200"/> | |
<meta> | |
<lastUpdated value="2017-11-03T12:37:46.920+00:00"/> | |
<profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Observation-1"/> | |
</meta> | |
<status value="final"/> | |
<category> | |
<coding> | |
<system value="http://hl7.org/fhir/observation-category"/> |
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
This is indicative of how acute would represent their relationship with a Patient. It does relate 1:1 with HL7v2 messaging (PV1 segment) | |
This is a maternity episode when the child was born and represents an episode over 5 days. | |
Have not included Diagnosis/Condition but this would be applicable here. | |
This would be used for Inpatient and Outpatients (and Emergency if part of the PAS/EPR system), | |
other parts of the HL7v2 PV1 segment would be covered by FHIR Encounter such as admission, discharge, etc | |
<EpisodeOfCare xmlns="http://hl7.org/fhir"> | |
<status value="finished"/> | |
<type> | |
<coding> |