private void loadStructureDefinitions(FhirContext theContext, Map<String, StructureDefinition> theCodeSystems, String theClasspath) { ourLog.info("Loading structure definitions from classpath: {}", theClasspath); InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); if (valuesetText != null) { InputStreamReader reader = new InputStreamReader(valuesetText, Charsets.UTF_8); Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); for (BundleEntryComponent next : bundle.getEntry()) { if (next.getResource() instanceof StructureDefinition) { StructureDefinition nextSd = (StructureDefinition) next.getResource(); nextSd.getText().setDivAsString(""); String system = nextSd.getUrl(); if (isNotBlank(system)) { theCodeSystems.put(system, nextSd); } } } } else { ourLog.warn("Unable to load resource: {}", theClasspath); } }
if (next.getResource() instanceof CodeSystem) { CodeSystem nextValueSet = (CodeSystem) next.getResource(); nextValueSet.getText().setDivAsString(""); String system = nextValueSet.getUrl(); if (isNotBlank(system)) { nextValueSet.getText().setDivAsString(""); String system = nextValueSet.getUrl(); if (isNotBlank(system)) {
@Patch public OperationOutcome patientPatch(@IdParam IdType theId, PatchTypeEnum thePatchType, @ResourceParam String theBody) { if (thePatchType == PatchTypeEnum.JSON_PATCH) { // do something } if (thePatchType == PatchTypeEnum.XML_PATCH) { // do something } OperationOutcome retVal = new OperationOutcome(); retVal.getText().setDivAsString("<div>OK</div>"); return retVal; } //END SNIPPET: patch
private void loadStructureDefinitions(FhirContext theContext, Map<String, StructureDefinition> theCodeSystems, String theClasspath) { ourLog.info("Loading structure definitions from classpath: {}", theClasspath); InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath); if (valuesetText != null) { InputStreamReader reader = new InputStreamReader(valuesetText, Charsets.UTF_8); Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader); for (BundleEntryComponent next : bundle.getEntry()) { if (next.getResource() instanceof StructureDefinition) { StructureDefinition nextSd = (StructureDefinition) next.getResource(); nextSd.getText().setDivAsString(""); String system = nextSd.getUrl(); if (isNotBlank(system)) { theCodeSystems.put(system, nextSd); } } } } else { ourLog.warn("Unable to load resource: {}", theClasspath); } }
if (next.getResource() instanceof CodeSystem) { CodeSystem nextValueSet = (CodeSystem) next.getResource(); nextValueSet.getText().setDivAsString(""); String system = nextValueSet.getUrl(); if (isNotBlank(system)) { nextValueSet.getText().setDivAsString(""); String system = nextValueSet.getUrl(); if (isNotBlank(system)) {