/** Getter for pet name */ public StringType getPetName() { if (myPetName == null) { myPetName = new StringType(); } return myPetName; }
public StringType makeString(String v) { StringType s = new StringType(); s.setValue(v); return s; }
public void foo() { //START SNIPPET: subExtension Patient patient = new Patient(); // Add an extension (initially with no contents) to the resource Extension parent = new Extension("http://example.com#parent"); patient.addExtension(parent); // Add two extensions as children to the parent extension Extension child1 = new Extension("http://example.com#childOne", new StringType("value1")); parent.addExtension(child1); Extension child2 = new Extension("http://example.com#chilwo", new StringType("value1")); parent.addExtension(child2); //END SNIPPET: subExtension }
public org.hl7.fhir.dstu3.model.StringType convertString(org.hl7.fhir.instance.model.StringType src) throws FHIRException { org.hl7.fhir.dstu3.model.StringType tgt = new org.hl7.fhir.dstu3.model.StringType(src.getValue()); copyElement(src, tgt); return tgt; }
public static org.hl7.fhir.dstu3.model.StringType convertString(org.hl7.fhir.dstu2016may.model.StringType src) throws FHIRException { org.hl7.fhir.dstu3.model.StringType tgt = new org.hl7.fhir.dstu3.model.StringType(); if (src.hasValue()) tgt.setValue(src.getValue()); copyElement(src, tgt); return tgt; }
public static void main(String[] args) { // START SNIPPET: usage // Create a context. Note that we declare the custom types we'll be using // on the context before actually using them FhirContext ctx = FhirContext.forDstu3(); ctx.registerCustomType(CustomResource.class); ctx.registerCustomType(CustomDatatype.class); // Now let's create an instance of our custom resource type // and populate it with some data CustomResource res = new CustomResource(); // Add some values, including our custom datatype DateType value0 = new DateType("2015-01-01"); res.getTelevision().add(value0); CustomDatatype value1 = new CustomDatatype(); value1.setDate(new DateTimeType(new Date())); value1.setKittens(new StringType("FOO")); res.getTelevision().add(value1); res.setDogs(new StringType("Some Dogs")); // Now let's serialize our instance String output = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(res); System.out.println(output); // END SNIPPET: usage }
@Operation(name = JpaConstants.OPERATION_SUGGEST_KEYWORDS, idempotent = true) public Parameters suggestKeywords( @OperationParam(name = "context", min = 1, max = 1) String theContext, @OperationParam(name = "searchParam", min = 1, max = 1) String theSearchParam, @OperationParam(name = "text", min = 1, max = 1) String theText ) { if (isBlank(theContext)) { throw new InvalidRequestException("Parameter 'context' must be provided"); } if (isBlank(theSearchParam)) { throw new InvalidRequestException("Parameter 'searchParam' must be provided"); } if (isBlank(theText)) { throw new InvalidRequestException("Parameter 'text' must be provided"); } List<Suggestion> keywords = mySearchDao.suggestKeywords(theContext, theSearchParam, theText); Parameters retVal = new Parameters(); for (Suggestion next : keywords) { retVal.addParameter() .addPart(new ParametersParameterComponent().setName("keyword").setValue(new StringType(next.getTerm()))) .addPart(new ParametersParameterComponent().setName("score").setValue(new DecimalType(next.getScore()))); } return retVal; }
/** * @return {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.) */ public StringType addLineElement() {//2 StringType t = new StringType(); if (this.line == null) this.line = new ArrayList<StringType>(); this.line.add(t); return t; }
obs.setValue(new StringType("This is a value"));
Extension givenExt = new Extension("http://examples.com#moreext", new StringType("Hello")); given.addExtension(givenExt);
p.addParameter().setName("url").setValue(new org.hl7.fhir.dstu3.model.UriType(termUrl)); for (String next : datafile) { p.addParameter().setName("localfile").setValue(new org.hl7.fhir.dstu3.model.StringType(next));
retVal.addParameter().setName("result").setValue(new BooleanType(result.isResult())); if (isNotBlank(result.getMessage())) { retVal.addParameter().setName("message").setValue(new StringType(result.getMessage())); retVal.addParameter().setName("display").setValue(new StringType(result.getDisplay()));
custPatient.setPetName(new StringType("Rover")); // populate the extension
/** * @return {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value */ public StringType getDocumentationElement() { if (this.documentation == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.documentation"); else if (Configuration.doAutoCreate()) this.documentation = new StringType(); // bb return this.documentation; }
/** * @return {@link #name} (A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create CapabilityStatement.name"); else if (Configuration.doAutoCreate()) this.name = new StringType(); // bb return this.name; }
/** * @return {@link #causalityProductRelatedness} (AdverseEvent.suspectEntity.causalityProductRelatedness.). This is the underlying object with id, value and extensions. The accessor "getCausalityProductRelatedness" gives direct access to the value */ public StringType getCausalityProductRelatednessElement() { if (this.causalityProductRelatedness == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AdverseEventSuspectEntityComponent.causalityProductRelatedness"); else if (Configuration.doAutoCreate()) this.causalityProductRelatedness = new StringType(); // bb return this.causalityProductRelatedness; }
/** * @return {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value */ public StringType getIfMatchElement() { if (this.ifMatch == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch"); else if (Configuration.doAutoCreate()) this.ifMatch = new StringType(); // bb return this.ifMatch; }
/** * @return {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value */ public StringType getEtagElement() { if (this.etag == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryResponseComponent.etag"); else if (Configuration.doAutoCreate()) this.etag = new StringType(); // bb return this.etag; }
*/ public StringType getVersionElement() { if (this.version == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ActivityDefinition.version"); else if (Configuration.doAutoCreate()) this.version = new StringType(); // bb return this.version; } public boolean hasVersionElement() { return this.version != null && !this.version.isEmpty();
*/ public StringType getNameElement() { if (this.name == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ActivityDefinition.name"); else if (Configuration.doAutoCreate()) this.name = new StringType(); // bb return this.name; } public boolean hasNameElement() { return this.name != null && !this.name.isEmpty();