Created
December 6, 2018 15:32
-
-
Save KevinMayfield/e94e947d3642649b4b58ca56daa0126f to your computer and use it in GitHub Desktop.
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()); | |
doc.getContext().getPracticeSetting().addCoding() | |
.setSystem("http://snomed.info/sct") | |
.setCode("408467006") | |
.setDisplay("Adult mental illness"); | |
System.out.println(FhirContext.forDstu3().newJsonParser().setPrettyPrint(true).encodeResourceToString(doc)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment