/** * {@inheritDoc} */ @Override public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { setValue(theValue); }
public void namesHard() { // START SNIPPET: namesHard Patient patient = new Patient(); HumanNameDt name = patient.addName(); StringDt family = name.addFamily(); family.setValue("Smith"); StringDt firstName = name.addGiven(); firstName.setValue("Rob"); StringDt secondName = name.addGiven(); secondName.setValue("Bruce"); // END SNIPPET: namesHard }
/** * Create a new String */ @SimpleSetter public StringDt(@SimpleSetter.Parameter(name = "theString") String theValue) { setValue(theValue); }
@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); oo.getIssueFirstRep().getSeverityElement().setValue(theSeverity); oo.getIssueFirstRep().getDiagnosticsElement().setValue(theMessage); oo.getIssueFirstRep().getCodeElement().setValue(theCode); return oo; }
/** * {@inheritDoc} */ @Override public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { setValue(theValue); }
public static void manualContained() { // START SNIPPET: manualContained // Create an organization, and give it a local ID Organization org = new Organization(); org.setId("#localOrganization"); org.getNameElement().setValue("Contained Test Organization"); // Create a patient Patient patient = new Patient(); patient.setId("Patient/1333"); patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); // Set the reference, and manually add the contained resource patient.getManagingOrganization().setReference("#localOrganization"); patient.getContained().getContainedResources().add(org); String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); System.out.println(encoded); // END SNIPPET: manualContained }
/** * Create a new String */ @SimpleSetter public StringDt(@SimpleSetter.Parameter(name = "theString") String theValue) { setValue(theValue); }
private void fillMinAndMaxAndDefinitions(BaseRuntimeDeclaredChildDefinition child, StructureElement elem) { elem.getDefinition().setMin(child.getMin()); if (child.getMax() == Child.MAX_UNLIMITED) { elem.getDefinition().setMax("*"); } else { elem.getDefinition().setMax(Integer.toString(child.getMax())); } if (isNotBlank(child.getShortDefinition())) { elem.getDefinition().getShort().setValue(child.getShortDefinition()); } if (isNotBlank(child.getFormalDefinition())) { elem.getDefinition().getFormal().setValue(child.getFormalDefinition()); } }
@Override public void addRootPropertiesToBundle(String theAuthor, String theServerBase, String theCompleteUrl, Integer theTotalResults, BundleTypeEnum theBundleType, IPrimitiveType<Date> theLastUpdated) { if (myBundle.getAuthorName().isEmpty()) { myBundle.getAuthorName().setValue(theAuthor); } if (theLastUpdated != null && myBundle.getUpdated().isEmpty() && isNotBlank(theLastUpdated.getValueAsString())) { myBundle.getUpdated().setValueAsString(theLastUpdated.getValueAsString()); } if (myBundle.getBundleId().isEmpty()) { myBundle.getBundleId().setValue(UUID.randomUUID().toString()); } if (myBundle.getLinkBase().isEmpty()) { myBundle.getLinkBase().setValue(theServerBase); } if (myBundle.getLinkSelf().isEmpty()) { myBundle.getLinkSelf().setValue(theCompleteUrl); } if (theBundleType != null && myBundle.getType().isEmpty()) { myBundle.getType().setValueAsString(theBundleType.getCode()); } if (myBundle.getTotalResults().isEmpty() && theTotalResults != null) { myBundle.getTotalResults().setValue(theTotalResults); } }
@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); oo.getIssueFirstRep().getSeverityElement().setValue(theSeverity); oo.getIssueFirstRep().getDiagnosticsElement().setValue(theMessage); oo.getIssueFirstRep().getCodeElement().setValue(theCode); return oo; }
if (numTotalResults == null || theOffset + numToReturn < numTotalResults) { myBundle.getLinkNext() .setValue(RestfulServerUtils.createPagingLink(theIncludes, theServerBase, searchId, theOffset + numToReturn, numToReturn, theResponseEncoding, thePrettyPrint, theBundleType)); myBundle.getLinkPrevious().setValue(RestfulServerUtils.createPagingLink(theIncludes, theServerBase, searchId, start, limit, theResponseEncoding, thePrettyPrint, theBundleType));
if (!expectedPath.equals(name)) { path.pollLast(); theElement.getDefinition().getNameReference().setValue(def.getName()); return;
if (!allOptional) { query = rest.addQuery(); query.getDocumentation().setValue(searchMethodBinding.getDescription()); query.addUndeclaredExtension(false, ExtensionConstants.QUERY_RETURN_TYPE, new CodeDt(resourceName)); for (String nextInclude : searchMethodBinding.getIncludes()) {