@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); OperationOutcomeIssueComponent issue = oo.addIssue(); issue.getSeverityElement().setValueAsString(theSeverity); issue.setDiagnostics(theMessage); try { issue.setCode(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.fromCode(theCode)); } catch (FHIRException e) { ourLog.error("Unknown code: {}", theCode); } return oo; }
/** * Constructor */ public Enumeration(EnumFactory<T> theEnumFactory, String theValue) { if (theEnumFactory == null) throw new IllegalArgumentException("An enumeration factory must be provided"); myEnumFactory = theEnumFactory; setValueAsString(theValue); }
public INarrative setStatusAsString(String theString) { getStatusElement().setValueAsString(theString); return this; }
@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); OperationOutcomeIssueComponent issue = oo.addIssue(); issue.getSeverityElement().setValueAsString(theSeverity); issue.setDiagnostics(theMessage); try { issue.setCode(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.fromCode(theCode)); } catch (FHIRException e) { ourLog.error("Unknown code: {}", theCode); } return oo; }
param.getTypeElement().setValueAsString(nextParameter.getParamType().getCode());
String httpVerb = ResourceMetadataKeyEnum.ENTRY_TRANSACTION_METHOD.get(nextAsResource); if (httpVerb != null) { entry.getRequest().getMethodElement().setValueAsString(httpVerb); if (id != null) { entry.getRequest().setUrl(id.getValue()); entry.getSearch().getModeElement().setValueAsString(searchMode);
@Override public HumanName deserialize(String value) { String pcs[] = value.split("\\" + NAME_DELIM); HumanName result = new HumanName(); int i = 0; if ((value = getComponent(pcs, i++)) != null) { result.setFamily(value); } if ((value = getComponent(pcs, i++)) != null) { result.addGiven(value); } if ((value = getComponent(pcs, i++)) != null) { result.addGiven(value); } if ((value = getComponent(pcs, i++)) != null) { result.addSuffix(value); } if ((value = getComponent(pcs, i++)) != null) { result.addPrefix(value); } if ((value = getComponent(pcs, i++)) != null) { result.addSuffix(value); } if ((value = getComponent(pcs, i++)) != null) { result.getUseElement().setValueAsString(value.toLowerCase()); } return result; }
entry.getRequest().getMethodElement().setValueAsString(httpVerb); entry.getRequest().getUrlElement().setValue(next.getId());
@Override public void addRootPropertiesToBundle(String theId, String theServerBase, String theLinkSelf, String theLinkPrev, String theLinkNext, Integer theTotalResults, BundleTypeEnum theBundleType, IPrimitiveType<Date> theLastUpdated) { ensureBundle(); myBase = theServerBase; if (myBundle.getIdElement().isEmpty()) { myBundle.setId(theId); } if (myBundle.getIdElement().isEmpty()) { myBundle.setId(UUID.randomUUID().toString()); } if (myBundle.getMeta().getLastUpdated() == null && theLastUpdated != null) { myBundle.getMeta().getLastUpdatedElement().setValueAsString(theLastUpdated.getValueAsString()); } if (!hasLink(Constants.LINK_SELF, myBundle) && isNotBlank(theLinkSelf)) { myBundle.addLink().setRelation(Constants.LINK_SELF).setUrl(theLinkSelf); } if (!hasLink(Constants.LINK_NEXT, myBundle) && isNotBlank(theLinkNext)) { myBundle.addLink().setRelation(Constants.LINK_NEXT).setUrl(theLinkNext); } if (!hasLink(Constants.LINK_PREVIOUS, myBundle) && isNotBlank(theLinkPrev)) { myBundle.addLink().setRelation(Constants.LINK_PREVIOUS).setUrl(theLinkPrev); } if (myBundle.getTypeElement().isEmpty() && theBundleType != null) { myBundle.getTypeElement().setValueAsString(theBundleType.getCode()); } if (myBundle.getTotalElement().isEmpty() && theTotalResults != null) { myBundle.getTotalElement().setValue(theTotalResults); } }
param.setUse(OperationParameterUse.IN); param.setType("string"); param.getSearchTypeElement().setValueAsString(nextParam.getParamType().getCode()); param.setMin(nextParam.isRequired() ? 1 : 0); param.setMax("1");
myBundle.getTypeElement().setValueAsString(theBundleType.getCode());
param.getSearchTypeElement().setValueAsString(nextParam.getSearchParamType());