diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/resource/Patient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/resource/Patient.java
index 594bcd4c6e0..e78fbafe2f2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/resource/Patient.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/resource/Patient.java
@@ -62,10 +62,10 @@ public class Patient extends BaseResource {
private List
+ * Definition: + * A contact party (e.g. guardian, partner, friend) for the patient + *
+ */ @Block(name="Patient.contact") public static class Contact { + @Child(name="relationship", order=0, min=0, max=Child.MAX_UNLIMITED) + private List+ * Definition: + * The nature of the relationship between the patient and the contact person + *
+ */ + public List+ * Definition: + * The nature of the relationship between the patient and the contact person + *
+ */ + public void setRelationship(List+ * Definition: + * A name associated with the person + *
+ */ + public HumanNameDt getName() { + return myName; + } + + /** + * Sets the value(s) for name (A name associated with the person) + * + *+ * Definition: + * A name associated with the person + *
+ */ + public void setName(HumanNameDt theValue) { + myName = theValue; + } + + /** + * Gets the value(s) for telecom (A contact detail for the person) + * + *+ * Definition: + * A contact detail for the person, e.g. a telephone number or an email address. + *
+ */ + public List+ * Definition: + * A contact detail for the person, e.g. a telephone number or an email address. + *
+ */ + public void setTelecom(List+ * Definition: + * Address for the contact person + *
+ */ + public AddressDt getAddress() { + return myAddress; + } + + /** + * Sets the value(s) for address (Address for the contact person) + * + *+ * Definition: + * Address for the contact person + *
+ */ + public void setAddress(AddressDt theValue) { + myAddress = theValue; + } + + /** + * Gets the value(s) for gender (Gender for administrative purposes) + * + *+ * Definition: + * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + *
+ */ + public CodeableConceptDt getGender() { + return myGender; + } + + /** + * Sets the value(s) for gender (Gender for administrative purposes) + * + *+ * Definition: + * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + *
+ */ + public void setGender(CodeableConceptDt theValue) { + myGender = theValue; + } + + /** + * Gets the value(s) for organization (Organization that is associated with the contact) + * + *+ * Definition: + * Organization on behalf of which the contact is acting or for which the contact is working. + *
+ */ + public ResourceReference getOrganization() { + return myOrganization; + } + + /** + * Sets the value(s) for organization (Organization that is associated with the contact) + * + *+ * Definition: + * Organization on behalf of which the contact is acting or for which the contact is working. + *
+ */ + public void setOrganization(ResourceReference theValue) { + myOrganization = theValue; + } + } + /** + * Block class for child element: Patient.animal (If this patient is an animal (non-human)) + * + *+ * Definition: + * This element has a value if the patient is an animal + *
+ */ @Block(name="Patient.animal") public static class Animal { + @Child(name="species", order=0, min=1, max=1) + private CodeableConceptDt mySpecies; + + @Child(name="breed", order=1, min=0, max=1) + private CodeableConceptDt myBreed; + + @Child(name="genderStatus", order=2, min=0, max=1) + private CodeableConceptDt myGenderStatus; + + /** + * Gets the value(s) for species (E.g. Dog, Cow) + * + *+ * Definition: + * Identifies the high level categorization of the kind of animal + *
+ */ + public CodeableConceptDt getSpecies() { + return mySpecies; + } + + /** + * Sets the value(s) for species (E.g. Dog, Cow) + * + *+ * Definition: + * Identifies the high level categorization of the kind of animal + *
+ */ + public void setSpecies(CodeableConceptDt theValue) { + mySpecies = theValue; + } + + /** + * Gets the value(s) for breed (E.g. Poodle, Angus) + * + *+ * Definition: + * Identifies the detailed categorization of the kind of animal. + *
+ */ + public CodeableConceptDt getBreed() { + return myBreed; + } + + /** + * Sets the value(s) for breed (E.g. Poodle, Angus) + * + *+ * Definition: + * Identifies the detailed categorization of the kind of animal. + *
+ */ + public void setBreed(CodeableConceptDt theValue) { + myBreed = theValue; + } + + /** + * Gets the value(s) for genderStatus (E.g. Neutered, Intact) + * + *+ * Definition: + * Indicates the current state of the animal's reproductive organs + *
+ */ + public CodeableConceptDt getGenderStatus() { + return myGenderStatus; + } + + /** + * Sets the value(s) for genderStatus (E.g. Neutered, Intact) + * + *+ * Definition: + * Indicates the current state of the animal's reproductive organs + *
+ */ + public void setGenderStatus(CodeableConceptDt theValue) { + myGenderStatus = theValue; + } + } + /** + * Block class for child element: Patient.link (Link to another patient resource that concerns the same actual person) + * + *+ * Definition: + * Link to another patient resource that concerns the same actual person + *
+ */ @Block(name="Patient.link") public static class Link { + @Child(name="other", order=0, min=1, max=1) + private ResourceReference myOther; + + @Child(name="type", order=1, min=1, max=1) + private CodeDt myType; + + /** + * Gets the value(s) for other (The other patient resource that the link refers to) + * + *+ * Definition: + * The other patient resource that the link refers to + *
+ */ + public ResourceReference getOther() { + return myOther; + } + + /** + * Sets the value(s) for other (The other patient resource that the link refers to) + * + *+ * Definition: + * The other patient resource that the link refers to + *
+ */ + public void setOther(ResourceReference theValue) { + myOther = theValue; + } + + /** + * Gets the value(s) for type (replace | refer | seealso - type of link) + * + *+ * Definition: + * The type of link between this patient resource and another patient resource. + *
+ */ + public CodeDt getType() { + return myType; + } + + /** + * Sets the value(s) for type (replace | refer | seealso - type of link) + * + *+ * Definition: + * The type of link between this patient resource and another patient resource. + *
+ */ + public void setType(CodeDt theValue) { + myType = theValue; + } + } diff --git a/hapi-fhir-starter/.classpath b/hapi-fhir-starter/.classpath index 3cd1c7592b8..aebbc12fa86 100644 --- a/hapi-fhir-starter/.classpath +++ b/hapi-fhir-starter/.classpath @@ -254,5 +254,6 @@+ * Definition: + * ${child.definition} + *
+ */ @Block(name="${child.name}") public static class ${child.className} { +#foreach ( $subChild in $child.children ) + @Child(name="${subChild.elementName}", order=${foreach.index}, min=${subChild.cardMin}, max=${subChild.cardMaxForChildAnnotation}) + private ${subChild.referenceType} ${subChild.variableName}; + +#end +#foreach ( $subChild in $child.children ) + /** + * Gets the value(s) for ${subChild.elementName} (${subChild.shortName}) + * + *+ * Definition: + * ${subChild.definition} + *
+ */ + public ${subChild.referenceType} get${subChild.methodName}() { + return ${subChild.variableName}; + } + + /** + * Sets the value(s) for ${subChild.elementName} (${subChild.shortName}) + * + *+ * Definition: + * ${subChild.definition} + *
+ */ + public void set${subChild.methodName}(${subChild.referenceType} theValue) { + ${subChild.variableName} = theValue; + } + +#end } #end diff --git a/hapi-fhir-starter/src/test/resources/patient-spreadsheet.xml b/hapi-fhir-starter/src/test/resources/res/patient-spreadsheet.xml similarity index 100% rename from hapi-fhir-starter/src/test/resources/patient-spreadsheet.xml rename to hapi-fhir-starter/src/test/resources/res/patient-spreadsheet.xml