Refine search
/** * Adds a new value for <b>discriminator</b> () * * <p> * <b>Definition:</b> * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public Slicing addDiscriminator( String theString) { if (myDiscriminator == null) { myDiscriminator = new java.util.ArrayList<StringDt>(); } myDiscriminator.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>suffix</b> () * * <p> * <b>Definition:</b> * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public HumanNameDt addSuffix( String theString) { if (mySuffix == null) { mySuffix = new java.util.ArrayList<StringDt>(); } mySuffix.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>family</b> () * * <p> * <b>Definition:</b> * The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public HumanNameDt addFamily( String theString) { if (myFamily == null) { myFamily = new java.util.ArrayList<StringDt>(); } myFamily.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>alias</b> () * * <p> * <b>Definition:</b> * Identifies additional names by which this element might also be known * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public ElementDefinitionDt addAlias( String theString) { if (myAlias == null) { myAlias = new java.util.ArrayList<StringDt>(); } myAlias.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>discriminator</b> () * * <p> * <b>Definition:</b> * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public Slicing addDiscriminator( String theString) { if (myDiscriminator == null) { myDiscriminator = new java.util.ArrayList<StringDt>(); } myDiscriminator.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>alias</b> () * * <p> * <b>Definition:</b> * Identifies additional names by which this element might also be known * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public ElementDefinitionDt addAlias( String theString) { if (myAlias == null) { myAlias = new java.util.ArrayList<StringDt>(); } myAlias.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>line</b> () * * <p> * <b>Definition:</b> * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public AddressDt addLine( String theString) { if (myLine == null) { myLine = new java.util.ArrayList<StringDt>(); } myLine.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>given</b> () * * <p> * <b>Definition:</b> * Given name * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public HumanNameDt addGiven( String theString) { if (myGiven == null) { myGiven = new java.util.ArrayList<StringDt>(); } myGiven.add(new StringDt(theString)); return this; }
/** * Adds a new value for <b>prefix</b> () * * <p> * <b>Definition:</b> * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name * </p> * * @return Returns a reference to this object, to allow for simple chaining. */ public HumanNameDt addPrefix( String theString) { if (myPrefix == null) { myPrefix = new java.util.ArrayList<StringDt>(); } myPrefix.add(new StringDt(theString)); return this; }
/** * Adds and returns a new value for <b>line</b> () * * <p> * <b>Definition:</b> * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information * </p> */ public StringDt addLine() { StringDt newType = new StringDt(); getLine().add(newType); return newType; }
/** * Adds and returns a new value for <b>discriminator</b> () * * <p> * <b>Definition:</b> * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices * </p> */ public StringDt addDiscriminator() { StringDt newType = new StringDt(); getDiscriminator().add(newType); return newType; }
/** * Adds and returns a new value for <b>family</b> () * * <p> * <b>Definition:</b> * The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. * </p> */ public StringDt addFamily() { StringDt newType = new StringDt(); getFamily().add(newType); return newType; }
/** * Adds and returns a new value for <b>prefix</b> () * * <p> * <b>Definition:</b> * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name * </p> */ public StringDt addPrefix() { StringDt newType = new StringDt(); getPrefix().add(newType); return newType; }
/** * Adds and returns a new value for <b>suffix</b> () * * <p> * <b>Definition:</b> * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name * </p> */ public StringDt addSuffix() { StringDt newType = new StringDt(); getSuffix().add(newType); return newType; }
/** * Adds and returns a new value for <b>discriminator</b> () * * <p> * <b>Definition:</b> * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices * </p> */ public StringDt addDiscriminator() { StringDt newType = new StringDt(); getDiscriminator().add(newType); return newType; }
@SuppressWarnings("unused") public static void main(String[] args) throws DataFormatException, IOException { //START SNIPPET: patientUse MyPatient patient = new MyPatient(); patient.setPetName(new StringDt("Fido")); patient.getImportantDates().add(new DateTimeDt("2010-01-02")); patient.getImportantDates().add(new DateTimeDt("2014-01-26T11:11:11")); patient.addName().addFamily("Smith").addGiven("John").addGiven("Quincy").addSuffix("Jr"); IParser p = FhirContext.forDstu2().newXmlParser().setPrettyPrint(true); String messageString = p.encodeResourceToString(patient); System.out.println(messageString); //END SNIPPET: patientUse //START SNIPPET: patientParse IParser parser = FhirContext.forDstu2().newXmlParser(); MyPatient newPatient = parser.parseResource(MyPatient.class, messageString); //END SNIPPET: patientParse { FhirContext ctx2 = FhirContext.forDstu2(); RuntimeResourceDefinition def = ctx2.getResourceDefinition(patient); System.out.println(ctx2.newXmlParser().setPrettyPrint(true).encodeResourceToString(def.toProfile())); } }