From dbeb6c09c623d42dfa68c4a870752cec8bef2d3a Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 18 Feb 2015 17:00:47 -0500 Subject: [PATCH 01/12] More work on new structures --- hapi-fhir-android/.classpath | 2 +- .../ca/uhn/fhir/context/ModelScanner.java | 5 +- .../api/annotation/SearchParamDefinition.java | 8 + .../java/ca/uhn/fhir/parser/XmlParser.java | 126 ++-- .../instance/model/api/IBackboneElement.java | 4 +- .../instance/model/api/IBaseExtension.java | 10 +- .../fhir/instance/model/api/IMetaType.java | 4 +- hapi-fhir-structures-hl7org-dstu2/.classpath | 4 +- .../org/hl7/fhir/instance/model/Address.java | 18 +- .../java/org/hl7/fhir/instance/model/Age.java | 2 +- .../org/hl7/fhir/instance/model/Alert.java | 63 +- .../instance/model/AllergyIntolerance.java | 74 +- .../hl7/fhir/instance/model/Appointment.java | 40 +- .../instance/model/AppointmentResponse.java | 22 +- .../hl7/fhir/instance/model/Attachment.java | 18 +- .../fhir/instance/model/BackboneElement.java | 4 +- .../org/hl7/fhir/instance/model/Basic.java | 24 +- .../org/hl7/fhir/instance/model/Binary.java | 6 +- .../org/hl7/fhir/instance/model/BodySite.java | 12 +- .../org/hl7/fhir/instance/model/Bundle.java | 194 +++-- .../org/hl7/fhir/instance/model/CarePlan.java | 46 +- .../hl7/fhir/instance/model/CarePlan2.java | 34 +- .../fhir/instance/model/ClaimResponse.java | 52 +- .../instance/model/ClinicalAssessment.java | 72 +- .../org/hl7/fhir/instance/model/CodeType.java | 2 +- .../fhir/instance/model/CodeableConcept.java | 8 +- .../org/hl7/fhir/instance/model/Coding.java | 14 +- .../fhir/instance/model/Communication.java | 62 +- .../instance/model/CommunicationRequest.java | 66 +- .../hl7/fhir/instance/model/Composition.java | 82 +-- .../hl7/fhir/instance/model/ConceptMap.java | 60 +- .../hl7/fhir/instance/model/Condition.java | 90 +-- .../hl7/fhir/instance/model/Conformance.java | 102 +-- .../hl7/fhir/instance/model/Constants.java | 6 +- .../hl7/fhir/instance/model/ContactPoint.java | 12 +- .../org/hl7/fhir/instance/model/Contract.java | 64 +- .../fhir/instance/model/Contraindication.java | 34 +- .../org/hl7/fhir/instance/model/Count.java | 2 +- .../org/hl7/fhir/instance/model/Coverage.java | 50 +- .../hl7/fhir/instance/model/DataElement.java | 66 +- .../org/hl7/fhir/instance/model/Device.java | 40 +- .../fhir/instance/model/DeviceComponent.java | 26 +- .../hl7/fhir/instance/model/DeviceMetric.java | 36 +- .../fhir/instance/model/DeviceUseRequest.java | 32 +- .../instance/model/DeviceUseStatement.java | 24 +- .../fhir/instance/model/DiagnosticOrder.java | 122 ++-- .../fhir/instance/model/DiagnosticReport.java | 80 +-- .../org/hl7/fhir/instance/model/Distance.java | 2 +- .../fhir/instance/model/DocumentManifest.java | 76 +- .../instance/model/DocumentReference.java | 104 +-- .../fhir/instance/model/DomainResource.java | 20 +- .../org/hl7/fhir/instance/model/Duration.java | 2 +- .../org/hl7/fhir/instance/model/Element.java | 15 +- .../instance/model/ElementDefinition.java | 69 +- .../instance/model/EligibilityRequest.java | 16 +- .../instance/model/EligibilityResponse.java | 22 +- .../hl7/fhir/instance/model/Encounter.java | 74 +- .../instance/model/EnrollmentRequest.java | 30 +- .../instance/model/EnrollmentResponse.java | 22 +- .../fhir/instance/model/EpisodeOfCare.java | 52 +- .../instance/model/ExplanationOfBenefit.java | 22 +- .../hl7/fhir/instance/model/Extension.java | 13 +- .../instance/model/ExtensionDefinition.java | 58 +- .../fhir/instance/model/FamilyHistory.java | 16 +- .../org/hl7/fhir/instance/model/Goal.java | 14 +- .../org/hl7/fhir/instance/model/Group.java | 46 +- .../instance/model/HealthcareService.java | 56 +- .../hl7/fhir/instance/model/HumanName.java | 18 +- .../hl7/fhir/instance/model/Identifier.java | 16 +- .../model/ImagingObjectSelection.java | 28 +- .../hl7/fhir/instance/model/ImagingStudy.java | 60 +- .../hl7/fhir/instance/model/Immunization.java | 96 +-- .../model/ImmunizationRecommendation.java | 40 +- .../hl7/fhir/instance/model/InstantType.java | 2 +- .../instance/model/InstitutionalClaim.java | 60 +- .../org/hl7/fhir/instance/model/List_.java | 43 +- .../org/hl7/fhir/instance/model/Location.java | 58 +- .../org/hl7/fhir/instance/model/Media.java | 44 +- .../hl7/fhir/instance/model/Medication.java | 36 +- .../model/MedicationAdministration.java | 50 +- .../instance/model/MedicationDispense.java | 66 +- .../model/MedicationPrescription.java | 46 +- .../instance/model/MedicationStatement.java | 38 +- .../fhir/instance/model/MessageHeader.java | 54 +- .../org/hl7/fhir/instance/model/Meta.java | 16 +- .../org/hl7/fhir/instance/model/Money.java | 2 +- .../hl7/fhir/instance/model/NamingSystem.java | 24 +- .../hl7/fhir/instance/model/Narrative.java | 42 +- .../fhir/instance/model/NutritionOrder.java | 118 +-- .../hl7/fhir/instance/model/Observation.java | 154 ++-- .../instance/model/OperationDefinition.java | 70 +- .../fhir/instance/model/OperationOutcome.java | 4 +- .../fhir/instance/model/OralHealthClaim.java | 64 +- .../org/hl7/fhir/instance/model/Order.java | 40 +- .../fhir/instance/model/OrderResponse.java | 30 +- .../hl7/fhir/instance/model/Organization.java | 28 +- .../org/hl7/fhir/instance/model/Other.java | 24 +- .../hl7/fhir/instance/model/Parameters.java | 4 +- .../org/hl7/fhir/instance/model/Patient.java | 84 +-- .../fhir/instance/model/PaymentNotice.java | 22 +- .../instance/model/PaymentReconciliation.java | 32 +- .../fhir/instance/model/PendedRequest.java | 24 +- .../org/hl7/fhir/instance/model/Period.java | 8 +- .../org/hl7/fhir/instance/model/Person.java | 38 +- .../fhir/instance/model/PharmacyClaim.java | 64 +- .../hl7/fhir/instance/model/Practitioner.java | 678 +++++++++++------- .../hl7/fhir/instance/model/Procedure.java | 34 +- .../fhir/instance/model/ProcedureRequest.java | 34 +- .../instance/model/ProfessionalClaim.java | 60 +- .../org/hl7/fhir/instance/model/Profile.java | 66 +- .../hl7/fhir/instance/model/Provenance.java | 36 +- .../org/hl7/fhir/instance/model/Quantity.java | 16 +- .../fhir/instance/model/Questionnaire.java | 151 ++-- .../instance/model/QuestionnaireAnswers.java | 111 +-- .../org/hl7/fhir/instance/model/Range.java | 8 +- .../org/hl7/fhir/instance/model/Ratio.java | 8 +- .../hl7/fhir/instance/model/Readjudicate.java | 24 +- .../hl7/fhir/instance/model/Reference.java | 93 ++- .../fhir/instance/model/ReferralRequest.java | 48 +- .../fhir/instance/model/RelatedPerson.java | 32 +- .../org/hl7/fhir/instance/model/Resource.java | 10 +- .../fhir/instance/model/ResourceFactory.java | 442 ++++++------ .../hl7/fhir/instance/model/ResourceType.java | 536 +++++++------- .../org/hl7/fhir/instance/model/Reversal.java | 26 +- .../fhir/instance/model/RiskAssessment.java | 40 +- .../hl7/fhir/instance/model/SampledData.java | 20 +- .../org/hl7/fhir/instance/model/Schedule.java | 14 +- .../fhir/instance/model/SearchParameter.java | 34 +- .../fhir/instance/model/SecurityEvent.java | 46 +- .../org/hl7/fhir/instance/model/Slot.java | 24 +- .../org/hl7/fhir/instance/model/Specimen.java | 48 +- .../fhir/instance/model/StatusRequest.java | 20 +- .../fhir/instance/model/StatusResponse.java | 28 +- .../instance/model/StructureDefinition.java | 76 +- .../hl7/fhir/instance/model/Subscription.java | 34 +- .../hl7/fhir/instance/model/Substance.java | 22 +- .../org/hl7/fhir/instance/model/Supply.java | 30 +- .../model/SupportingDocumentation.java | 38 +- .../org/hl7/fhir/instance/model/TimeType.java | 2 +- .../org/hl7/fhir/instance/model/Timing.java | 17 +- .../org/hl7/fhir/instance/model/ValueSet.java | 58 +- .../hl7/fhir/instance/model/VisionClaim.java | 62 +- .../instance/model/VisionPrescription.java | 28 +- .../uhn/fhir/model/ModelInheritanceTest.java | 153 ++++ .../parser/ContainedResourceEncodingTest.java | 10 +- .../ca/uhn/fhir/parser/JsonParserTest.java | 80 ++- .../ca/uhn/fhir/parser/XmlParserTest.java | 47 +- 147 files changed, 4114 insertions(+), 3530 deletions(-) create mode 100644 hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java diff --git a/hapi-fhir-android/.classpath b/hapi-fhir-android/.classpath index 874260329ff..0a155ef50de 100644 --- a/hapi-fhir-android/.classpath +++ b/hapi-fhir-android/.classpath @@ -12,7 +12,7 @@ - + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index 44bd306f661..893fc0d7481 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.context; * #L% */ -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.IOException; import java.io.InputStream; @@ -65,7 +65,6 @@ import ca.uhn.fhir.model.api.CodeableConceptElement; import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.IBoundCodeableConcept; import ca.uhn.fhir.model.api.ICodeEnum; -import ca.uhn.fhir.model.api.ICompositeElement; import ca.uhn.fhir.model.api.IDatatype; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IPrimitiveDatatype; @@ -321,7 +320,7 @@ class ModelScanner { } private void scanCompositeDatatype(Class theClass, DatatypeDef theDatatypeDefinition) { - ourLog.debug("Scanning resource class: {}", theClass.getName()); + ourLog.debug("Scanning datatype class: {}", theClass.getName()); RuntimeCompositeDatatypeDefinition resourceDef; if (theClass.equals(ExtensionDt.class)) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java index d4911c3d0fd..84ec07659dd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java @@ -25,6 +25,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.hl7.fhir.instance.model.IBaseResource; + @Target(value=ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface SearchParamDefinition { @@ -58,4 +60,10 @@ public @interface SearchParamDefinition { */ String[] compositeOf() default {}; + /** + * For search params of type "reference", this can optionally be used to + * specify the resource type(s) that this parameter applies to. + */ + Class[] target() default {}; + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index f3d3fcd4bd6..1e050b3ecd9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -47,6 +47,7 @@ import javax.xml.stream.events.XMLEvent; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.IBase; import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.INarrative; @@ -102,8 +103,7 @@ public class XmlParser extends BaseParser implements IParser { private boolean myPrettyPrint; /** - * Do not use this constructor, the recommended way to obtain a new instance of the XML parser is to invoke - * {@link FhirContext#newXmlParser()}. + * Do not use this constructor, the recommended way to obtain a new instance of the XML parser is to invoke {@link FhirContext#newXmlParser()}. */ public XmlParser(FhirContext theContext) { super(theContext); @@ -390,7 +390,7 @@ public class XmlParser extends BaseParser implements IParser { if (nextEntry.getDeletedAt() != null && nextEntry.getDeletedAt().isEmpty() == false) { deleted = true; } - + writeOptionalTagWithValue(theEventWriter, "base", determineResourceBaseUrl(bundleBaseUrl, nextEntry)); IResource resource = nextEntry.getResource(); @@ -433,8 +433,8 @@ public class XmlParser extends BaseParser implements IParser { theEventWriter.close(); } - private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition childDef, String theExtensionUrl, boolean theIncludedResource) - throws XMLStreamException, DataFormatException { + private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, + BaseRuntimeElementDefinition childDef, String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException { if (nextValue.isEmpty()) { if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) { // We still want to go in.. @@ -445,7 +445,7 @@ public class XmlParser extends BaseParser implements IParser { switch (childDef.getChildType()) { case PRIMITIVE_DATATYPE: { - IPrimitiveDatatype pd = (IPrimitiveDatatype) nextValue; + IPrimitiveType pd = (IPrimitiveType) nextValue; String value = pd.getValueAsString(); if (value != null) { theEventWriter.writeStartElement(childName); @@ -478,10 +478,9 @@ public class XmlParser extends BaseParser implements IParser { case CONTAINED_RESOURCES: { BaseContainedDt value = (BaseContainedDt) nextValue; /* - * Disable per #103 for (IResource next : value.getContainedResources()) { if - * (getContainedResources().getResourceId(next) != null) { continue; } - * theEventWriter.writeStartElement("contained"); encodeResourceToXmlStreamWriter(next, theEventWriter, - * true, fixContainedResourceId(next.getId().getValue())); theEventWriter.writeEndElement(); } + * Disable per #103 for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { continue; } + * theEventWriter.writeStartElement("contained"); encodeResourceToXmlStreamWriter(next, theEventWriter, true, fixContainedResourceId(next.getId().getValue())); + * theEventWriter.writeEndElement(); } */ for (IBaseResource next : getContainedResources().getContainedResources()) { IdDt resourceId = getContainedResources().getResourceId(next); @@ -513,8 +512,8 @@ public class XmlParser extends BaseParser implements IParser { } - private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List children, boolean theIncludedResource) throws XMLStreamException, - DataFormatException { + private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, + List children, boolean theIncludedResource) throws XMLStreamException, DataFormatException { for (BaseRuntimeChildDefinition nextChild : children) { if (nextChild instanceof RuntimeChildNarrativeDefinition && !theIncludedResource) { INarrativeGenerator gen = myContext.getNarrativeGenerator(); @@ -523,7 +522,7 @@ public class XmlParser extends BaseParser implements IParser { if (gen != null && narr.isEmpty()) { gen.generateNarrative(theResDef.getResourceProfile(), theResource, narr); } - if (narr.isEmpty()==false) { + if (narr.isEmpty() == false) { RuntimeChildNarrativeDefinition child = (RuntimeChildNarrativeDefinition) nextChild; String childName = nextChild.getChildNameByDatatype(child.getDatatype()); BaseRuntimeElementDefinition type = child.getChildByName(childName); @@ -589,13 +588,15 @@ public class XmlParser extends BaseParser implements IParser { } } - private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, + BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { encodeExtensionsIfPresent(theResDef, theResource, theEventWriter, theElement, theIncludedResource); encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getExtensions(), theIncludedResource); encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren(), theIncludedResource); } - private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, IBase theElement, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, IBase theElement, boolean theIncludedResource) + throws XMLStreamException, DataFormatException { if (theElement instanceof ISupportsUndeclaredExtensions) { ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement; encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource); @@ -618,10 +619,11 @@ public class XmlParser extends BaseParser implements IParser { } } - private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, + BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { /* - * DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy - * way to make that happen, but hopefully this won't matter as much once we use the HL7 structures + * DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy way to make that happen, but hopefully this won't matter as much once we use the + * HL7 structures */ List preExtensionChildren = new ArrayList(); @@ -701,54 +703,59 @@ public class XmlParser extends BaseParser implements IParser { theEventWriter.writeStartElement(resDef.getName()); theEventWriter.writeDefaultNamespace(FHIR_NS); - if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { + if (theResource instanceof IAnyResource) { - // DSTU2+ - IResource resource = (IResource) theResource; - writeOptionalTagWithValue(theEventWriter, "id", theResourceId); - - InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED); - IdDt resourceId = resource.getId(); - if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) { - theEventWriter.writeStartElement("meta"); - String versionIdPart = resourceId.getVersionIdPart(); - if (isBlank(versionIdPart)) { - versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource); - } - writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart); - if (updated != null) { - writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString()); - } - theEventWriter.writeEndElement(); - } + // HL7.org Structures + encodeCompositeElementToStreamWriter(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); } else { - // DSTU1 - if (theResourceId != null && theContainedResource) { - theEventWriter.writeAttribute("id", theResourceId); - } - - } - - if (theResource instanceof BaseBinary) { - BaseBinary bin = (BaseBinary) theResource; - if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { - writeOptionalTagWithValue(theEventWriter, "contentType", bin.getContentType()); - writeOptionalTagWithValue(theEventWriter, "content", bin.getContentAsBase64()); - } else { - if (bin.getContentType() != null) { - theEventWriter.writeAttribute("contentType", bin.getContentType()); - } - theEventWriter.writeCharacters(bin.getContentAsBase64()); - } - } else { if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { + // DSTU2+ - encodeResourceToStreamWriterInDstu2Format(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + IResource resource = (IResource) theResource; + writeOptionalTagWithValue(theEventWriter, "id", theResourceId); + + InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED); + IdDt resourceId = resource.getId(); + if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) { + theEventWriter.writeStartElement("meta"); + String versionIdPart = resourceId.getVersionIdPart(); + if (isBlank(versionIdPart)) { + versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource); + } + writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart); + if (updated != null) { + writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString()); + } + theEventWriter.writeEndElement(); + } + + if (theResource instanceof BaseBinary) { + BaseBinary bin = (BaseBinary) theResource; + writeOptionalTagWithValue(theEventWriter, "contentType", bin.getContentType()); + writeOptionalTagWithValue(theEventWriter, "content", bin.getContentAsBase64()); + } else { + encodeResourceToStreamWriterInDstu2Format(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + } + } else { + // DSTU1 - encodeCompositeElementToStreamWriter(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + if (theResourceId != null && theContainedResource) { + theEventWriter.writeAttribute("id", theResourceId); + } + + if (theResource instanceof BaseBinary) { + BaseBinary bin = (BaseBinary) theResource; + if (bin.getContentType() != null) { + theEventWriter.writeAttribute("contentType", bin.getContentType()); + } + theEventWriter.writeCharacters(bin.getContentAsBase64()); + } else { + encodeCompositeElementToStreamWriter(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + } + } } @@ -787,7 +794,8 @@ public class XmlParser extends BaseParser implements IParser { } } - private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, List theExtensions, String tagName, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, List theExtensions, String tagName, + boolean theIncludedResource) throws XMLStreamException, DataFormatException { for (ExtensionDt next : theExtensions) { theWriter.writeStartElement(tagName); theWriter.writeAttribute("url", next.getUrl().getValue()); diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java index 15841fa2396..b52e715f8ed 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java @@ -1,5 +1,7 @@ package org.hl7.fhir.instance.model.api; -public interface IBackboneElement { +import org.hl7.fhir.instance.model.IBase; + +public interface IBackboneElement extends IBase { } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java index 83ad1ce865c..d48da6dd004 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java @@ -1,7 +1,15 @@ package org.hl7.fhir.instance.model.api; +import java.util.List; + import org.hl7.fhir.instance.model.ICompositeType; -public interface IBaseExtension extends ICompositeType { +public interface IBaseExtension extends ICompositeType { + List getExtension(); + + String getUrl(); + + IBaseDatatype getValue(); + } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java index 5c7b61d74fe..7b843002002 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java @@ -2,7 +2,9 @@ package org.hl7.fhir.instance.model.api; import java.util.Date; -public interface IMetaType { +import org.hl7.fhir.instance.model.ICompositeType; + +public interface IMetaType extends ICompositeType { ICoding addTag(); diff --git a/hapi-fhir-structures-hl7org-dstu2/.classpath b/hapi-fhir-structures-hl7org-dstu2/.classpath index 306138bcb17..acfe2cc4f2a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/.classpath +++ b/hapi-fhir-structures-hl7org-dstu2/.classpath @@ -12,8 +12,8 @@ - - + + diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java index 7058567e2ae..2e95f7f14fe 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -146,14 +146,14 @@ public class Address extends Type implements ICompositeType { /** * The purpose of this address. */ - @Child(name="use", type={CodeType.class}, order=-1, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) @Description(shortDefinition="home | work | temp | old - purpose of this address", formalDefinition="The purpose of this address." ) protected Enumeration use; /** * A full text representation of the address. */ - @Child(name="text", type={StringType.class}, order=0, min=0, max=1) + @Child(name="text", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Text representation of the address", formalDefinition="A full text representation of the address." ) protected StringType text; @@ -161,42 +161,42 @@ public class Address extends Type implements ICompositeType { * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information. */ - @Child(name="line", type={StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="line", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Street name, number, direction & P.O. Box etc", formalDefinition="This component contains the house number, apartment number, street name, street direction, \nP.O. Box number, delivery hints, and similar address information." ) protected List line; /** * The name of the city, town, village or other community or delivery center. */ - @Child(name="city", type={StringType.class}, order=2, min=0, max=1) + @Child(name="city", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Name of city, town etc.", formalDefinition="The name of the city, town, village or other community or delivery center." ) protected StringType city; /** * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). */ - @Child(name="state", type={StringType.class}, order=3, min=0, max=1) + @Child(name="state", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Sub-unit of country (abreviations ok)", formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." ) protected StringType state; /** * A postal code designating a region defined by the postal service. */ - @Child(name="postalCode", type={StringType.class}, order=4, min=0, max=1) + @Child(name="postalCode", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Postal code for area", formalDefinition="A postal code designating a region defined by the postal service." ) protected StringType postalCode; /** * Country - a nation as commonly understood or generally accepted. */ - @Child(name="country", type={StringType.class}, order=5, min=0, max=1) + @Child(name="country", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Country (can be ISO 3166 3 letter code)", formalDefinition="Country - a nation as commonly understood or generally accepted." ) protected StringType country; /** * Time period when address was/is in use. */ - @Child(name="period", type={Period.class}, order=6, min=0, max=1) + @Child(name="period", type={Period.class}, order=7, min=0, max=1) @Description(shortDefinition="Time period when address was/is in use", formalDefinition="Time period when address was/is in use." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Age.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Age.java index aa8e0d32915..4c5cc844130 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Age.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Age.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java index ea8e78ffcc5..0583487b9b3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -134,28 +134,28 @@ public class Alert extends DomainResource { /** * Identifier assigned to the alert for external use (outside the FHIR environment). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the alert for external use (outside the FHIR environment)." ) protected List identifier; /** * Allows an alert to be divided into different categories like clinical, administrative etc. */ - @Child(name="category", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an alert to be divided into different categories like clinical, administrative etc." ) protected CodeableConcept category; /** * Supports basic workflow. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="Supports basic workflow." ) protected Enumeration status; /** * The person who this alert concerns. */ - @Child(name="subject", type={Patient.class}, order=2, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=3, min=1, max=1) @Description(shortDefinition="Who is alert about?", formalDefinition="The person who this alert concerns." ) protected Reference subject; @@ -167,7 +167,7 @@ public class Alert extends DomainResource { /** * The person or device that created the alert. */ - @Child(name="author", type={Practitioner.class, Patient.class, Device.class}, order=3, min=0, max=1) + @Child(name="author", type={Practitioner.class, Patient.class, Device.class}, order=4, min=0, max=1) @Description(shortDefinition="Alert creator", formalDefinition="The person or device that created the alert." ) protected Reference author; @@ -177,19 +177,19 @@ public class Alert extends DomainResource { protected Resource authorTarget; /** - * The textual component of the alert to display to the user. + * The coded value or textual component of the alert to display to the user. */ - @Child(name="note", type={StringType.class}, order=4, min=1, max=1) - @Description(shortDefinition="Text of alert", formalDefinition="The textual component of the alert to display to the user." ) - protected StringType note; + @Child(name="note", type={CodeableConcept.class}, order=5, min=1, max=1) + @Description(shortDefinition="Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition="The coded value or textual component of the alert to display to the user." ) + protected CodeableConcept note; - private static final long serialVersionUID = -655685828L; + private static final long serialVersionUID = -1519932996L; public Alert() { super(); } - public Alert(Enumeration status, Reference subject, StringType note) { + public Alert(Enumeration status, Reference subject, CodeableConcept note) { super(); this.status = status; this.subject = subject; @@ -379,50 +379,29 @@ public class Alert extends DomainResource { } /** - * @return {@link #note} (The textual component of the alert to display to the user.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + * @return {@link #note} (The coded value or textual component of the alert to display to the user.) */ - public StringType getNoteElement() { + public CodeableConcept getNote() { if (this.note == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Alert.note"); else if (Configuration.doAutoCreate()) - this.note = new StringType(); // bb + this.note = new CodeableConcept(); // cc return this.note; } - public boolean hasNoteElement() { - return this.note != null && !this.note.isEmpty(); - } - public boolean hasNote() { return this.note != null && !this.note.isEmpty(); } /** - * @param value {@link #note} (The textual component of the alert to display to the user.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + * @param value {@link #note} (The coded value or textual component of the alert to display to the user.) */ - public Alert setNoteElement(StringType value) { + public Alert setNote(CodeableConcept value) { this.note = value; return this; } - /** - * @return The textual component of the alert to display to the user. - */ - public String getNote() { - return this.note == null ? null : this.note.getValue(); - } - - /** - * @param value The textual component of the alert to display to the user. - */ - public Alert setNote(String value) { - if (this.note == null) - this.note = new StringType(); - this.note.setValue(value); - return this; - } - protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the alert for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier)); @@ -430,7 +409,7 @@ public class Alert extends DomainResource { childrenList.add(new Property("status", "code", "Supports basic workflow.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("subject", "Reference(Patient)", "The person who this alert concerns.", 0, java.lang.Integer.MAX_VALUE, subject)); childrenList.add(new Property("author", "Reference(Practitioner|Patient|Device)", "The person or device that created the alert.", 0, java.lang.Integer.MAX_VALUE, author)); - childrenList.add(new Property("note", "string", "The textual component of the alert to display to the user.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("note", "CodeableConcept", "The coded value or textual component of the alert to display to the user.", 0, java.lang.Integer.MAX_VALUE, note)); } public Alert copy() { @@ -472,7 +451,7 @@ public class Alert extends DomainResource { if (!(other instanceof Alert)) return false; Alert o = (Alert) other; - return compareValues(status, o.status, true) && compareValues(note, o.note, true); + return compareValues(status, o.status, true); } public boolean isEmpty() { @@ -486,10 +465,10 @@ public class Alert extends DomainResource { return ResourceType.Alert; } - @SearchParamDefinition(name="patient", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java index 4500a959dbb..516f79d891c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1049,21 +1049,21 @@ public class AllergyIntolerance extends DomainResource { /** * This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Date when the sensitivity was recorded. */ - @Child(name="recordedDate", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="recordedDate", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." ) protected DateTimeType recordedDate; /** * Indicates who has responsibility for the record. */ - @Child(name="recorder", type={Practitioner.class, Patient.class}, order=1, min=0, max=1) + @Child(name="recorder", type={Practitioner.class, Patient.class}, order=2, min=0, max=1) @Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Indicates who has responsibility for the record." ) protected Reference recorder; @@ -1075,7 +1075,7 @@ public class AllergyIntolerance extends DomainResource { /** * The patient who has the allergy or intolerance. */ - @Child(name="subject", type={Patient.class}, order=2, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=3, min=1, max=1) @Description(shortDefinition="Who the sensitivity is for", formalDefinition="The patient who has the allergy or intolerance." ) protected Reference subject; @@ -1087,56 +1087,56 @@ public class AllergyIntolerance extends DomainResource { /** * Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk. */ - @Child(name="substance", type={CodeableConcept.class}, order=3, min=1, max=1) + @Child(name="substance", type={CodeableConcept.class}, order=4, min=1, max=1) @Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk." ) protected CodeableConcept substance; /** * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. */ - @Child(name="status", type={CodeType.class}, order=4, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=5, min=0, max=1) @Description(shortDefinition="unconfirmed | confirmed | resolved | refuted", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." ) protected Enumeration status; /** * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. */ - @Child(name="criticality", type={CodeType.class}, order=5, min=0, max=1) + @Child(name="criticality", type={CodeType.class}, order=6, min=0, max=1) @Description(shortDefinition="low | high | unassessible - Estimated potential clinical harm", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." ) protected Enumeration criticality; /** * Identification of the underlying physiological mechanism for the Reaction Risk. */ - @Child(name="type", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="type", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="immune | non-immune - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the Reaction Risk." ) protected Enumeration type; /** * Category of the identified Substance. */ - @Child(name="category", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="category", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="food | medication | environment - Category of Substance", formalDefinition="Category of the identified Substance." ) protected Enumeration category; /** * Represents the date and/or time of the last known occurence of a reaction event. */ - @Child(name="lastOccurence", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="lastOccurence", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date(/time) of last known occurence of a reaction", formalDefinition="Represents the date and/or time of the last known occurence of a reaction event." ) protected DateTimeType lastOccurence; /** * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields. */ - @Child(name="comment", type={StringType.class}, order=9, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ) protected StringType comment; /** * Details about each Adverse Reaction Event linked to exposure to the identified Substance. */ - @Child(name="event", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each Adverse Reaction Event linked to exposure to the identified Substance." ) protected List event; @@ -1747,38 +1747,38 @@ public class AllergyIntolerance extends DomainResource { return ResourceType.AllergyIntolerance; } - @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="unconfirmed | confirmed | resolved | refuted", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="onset", path="AllergyIntolerance.event.onset", description="Date(/time) when manifestations showed", type="date" ) - public static final String SP_ONSET = "onset"; - @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurence of a reaction", type="date" ) - public static final String SP_LASTDATE = "last-date"; @SearchParamDefinition(name="severity", path="AllergyIntolerance.event.severity", description="mild | moderate | severe (of event as a whole)", type="token" ) public static final String SP_SEVERITY = "severity"; @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="immune | non-immune - Underlying mechanism (if known)", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance|AllergyIntolerance.event.substance", description="Substance, (or class) considered to be responsible for risk", type="token" ) - public static final String SP_SUBSTANCE = "substance"; - @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unassessible - Estimated potential clinical harm", type="token" ) - public static final String SP_CRITICALITY = "criticality"; - @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment - Category of Substance", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="duration", path="AllergyIntolerance.event.duration", description="How long Manifestations persisted", type="quantity" ) - public static final String SP_DURATION = "duration"; - @SearchParamDefinition(name="patient", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" ) - public static final String SP_RECORDER = "recorder"; - @SearchParamDefinition(name="route", path="AllergyIntolerance.event.exposureRoute", description="How the subject was exposed to the substance", type="token" ) - public static final String SP_ROUTE = "route"; @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External Ids for this item", type="token" ) public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.event.manifestation", description="Clinical symptoms/signs associated with the Event", type="token" ) public static final String SP_MANIFESTATION = "manifestation"; + @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" ) + public static final String SP_RECORDER = "recorder"; + @SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance|AllergyIntolerance.event.substance", description="Substance, (or class) considered to be responsible for risk", type="token" ) + public static final String SP_SUBSTANCE = "substance"; + @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unassessible - Estimated potential clinical harm", type="token" ) + public static final String SP_CRITICALITY = "criticality"; + @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="immune | non-immune - Underlying mechanism (if known)", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="onset", path="AllergyIntolerance.event.onset", description="Date(/time) when manifestations showed", type="date" ) + public static final String SP_ONSET = "onset"; + @SearchParamDefinition(name="duration", path="AllergyIntolerance.event.duration", description="How long Manifestations persisted", type="quantity" ) + public static final String SP_DURATION = "duration"; + @SearchParamDefinition(name="route", path="AllergyIntolerance.event.exposureRoute", description="How the subject was exposed to the substance", type="token" ) + public static final String SP_ROUTE = "route"; + @SearchParamDefinition(name="patient", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment - Category of Substance", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurence of a reaction", type="date" ) + public static final String SP_LASTDATE = "last-date"; + @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="unconfirmed | confirmed | resolved | refuted", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java index 72ea1d50ed9..16799d49428 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -649,63 +649,63 @@ public class Appointment extends DomainResource { /** * This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept). */ - @Child(name="priority", type={IntegerType.class}, order=0, min=0, max=1) + @Child(name="priority", type={IntegerType.class}, order=1, min=0, max=1) @Description(shortDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)." ) protected IntegerType priority; /** * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="pending | booked | arrived | fulfilled | cancelled | noshow", formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." ) protected Enumeration status; /** * The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself). */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)", formalDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)." ) protected CodeableConcept type; /** * The reason that this appointment is being scheduled, this is more clinical than administrative. */ - @Child(name="reason", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative", formalDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative." ) protected CodeableConcept reason; /** * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. */ - @Child(name="description", type={StringType.class}, order=4, min=0, max=1) + @Child(name="description", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." ) protected StringType description; /** * Date/Time that the appointment is to take place. */ - @Child(name="start", type={InstantType.class}, order=5, min=1, max=1) + @Child(name="start", type={InstantType.class}, order=6, min=1, max=1) @Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) protected InstantType start; /** * Date/Time that the appointment is to conclude. */ - @Child(name="end", type={InstantType.class}, order=6, min=1, max=1) + @Child(name="end", type={InstantType.class}, order=7, min=1, max=1) @Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) protected InstantType end; /** * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot. */ - @Child(name="slot", type={Slot.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="slot", type={Slot.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot", formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot." ) protected List slot; /** @@ -717,7 +717,7 @@ public class Appointment extends DomainResource { /** * The primary location that this appointment is to take place. */ - @Child(name="location", type={Location.class}, order=8, min=0, max=1) + @Child(name="location", type={Location.class}, order=9, min=0, max=1) @Description(shortDefinition="The primary location that this appointment is to take place", formalDefinition="The primary location that this appointment is to take place." ) protected Reference location; @@ -729,14 +729,14 @@ public class Appointment extends DomainResource { /** * Additional comments about the appointment. */ - @Child(name="comment", type={StringType.class}, order=9, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." ) protected StringType comment; /** * An Order that lead to the creation of this appointment. */ - @Child(name="order", type={Order.class}, order=10, min=0, max=1) + @Child(name="order", type={Order.class}, order=11, min=0, max=1) @Description(shortDefinition="An Order that lead to the creation of this appointment", formalDefinition="An Order that lead to the creation of this appointment." ) protected Reference order; @@ -748,14 +748,14 @@ public class Appointment extends DomainResource { /** * List of participants involved in the appointment. */ - @Child(name="participant", type={}, order=11, min=1, max=Child.MAX_UNLIMITED) + @Child(name="participant", type={}, order=12, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of participants involved in the appointment", formalDefinition="List of participants involved in the appointment." ) protected List participant; /** * Who recorded the appointment. */ - @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=12, min=0, max=1) + @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=1) @Description(shortDefinition="Who recorded the appointment", formalDefinition="Who recorded the appointment." ) protected Reference lastModifiedBy; @@ -767,7 +767,7 @@ public class Appointment extends DomainResource { /** * Date when the appointment was recorded. */ - @Child(name="lastModified", type={DateTimeType.class}, order=13, min=0, max=1) + @Child(name="lastModified", type={DateTimeType.class}, order=14, min=0, max=1) @Description(shortDefinition="Date when the appointment was recorded", formalDefinition="Date when the appointment was recorded." ) protected DateTimeType lastModified; @@ -1494,16 +1494,16 @@ public class Appointment extends DomainResource { return ResourceType.Appointment; } + @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" ) + public static final String SP_ACTOR = "actor"; @SearchParamDefinition(name="partstatus", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment", type="token" ) public static final String SP_PARTSTATUS = "partstatus"; @SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token" ) public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" ) - public static final String SP_ACTOR = "actor"; - @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" ) - public static final String SP_DATE = "date"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java index ebe2a33d74a..49ffec5ac3e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -176,14 +176,14 @@ public class AppointmentResponse extends DomainResource { /** * This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Parent appointment that this response is replying to. */ - @Child(name="appointment", type={Appointment.class}, order=0, min=1, max=1) + @Child(name="appointment", type={Appointment.class}, order=1, min=1, max=1) @Description(shortDefinition="Parent appointment that this response is replying to", formalDefinition="Parent appointment that this response is replying to." ) protected Reference appointment; @@ -195,14 +195,14 @@ public class AppointmentResponse extends DomainResource { /** * Role of participant in the appointment. */ - @Child(name="participantType", type={CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="participantType", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) protected List participantType; /** * A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device. */ - @Child(name="individual", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="individual", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device", formalDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device." ) protected List individual; /** @@ -214,35 +214,35 @@ public class AppointmentResponse extends DomainResource { /** * Participation status of the Patient. */ - @Child(name="participantStatus", type={CodeType.class}, order=3, min=1, max=1) + @Child(name="participantStatus", type={CodeType.class}, order=4, min=1, max=1) @Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the Patient." ) protected Enumeration participantStatus; /** * Additional comments about the appointment. */ - @Child(name="comment", type={StringType.class}, order=4, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." ) protected StringType comment; /** * Date/Time that the appointment is to take place. */ - @Child(name="start", type={InstantType.class}, order=5, min=0, max=1) + @Child(name="start", type={InstantType.class}, order=6, min=0, max=1) @Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) protected InstantType start; /** * Date/Time that the appointment is to conclude. */ - @Child(name="end", type={InstantType.class}, order=6, min=0, max=1) + @Child(name="end", type={InstantType.class}, order=7, min=0, max=1) @Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) protected InstantType end; /** * Who recorded the appointment response. */ - @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=7, min=0, max=1) + @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=8, min=0, max=1) @Description(shortDefinition="Who recorded the appointment response", formalDefinition="Who recorded the appointment response." ) protected Reference lastModifiedBy; @@ -254,7 +254,7 @@ public class AppointmentResponse extends DomainResource { /** * Date when the response was recorded or last updated. */ - @Child(name="lastModified", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="lastModified", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date when the response was recorded or last updated", formalDefinition="Date when the response was recorded or last updated." ) protected DateTimeType lastModified; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java index eff47739c16..493c048e6a9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -41,54 +41,54 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * For referring to data content defined in other formats. */ @DatatypeDef(name="Attachment") -public class Attachment extends Type implements ICompositeType { +public class Attachment extends Type implements ICompositeType { /** * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. */ - @Child(name="contentType", type={CodeType.class}, order=-1, min=0, max=1) + @Child(name="contentType", type={CodeType.class}, order=0, min=0, max=1) @Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." ) protected CodeType contentType; /** * The human language of the content. The value can be any valid value according to BCP 47. */ - @Child(name="language", type={CodeType.class}, order=0, min=0, max=1) + @Child(name="language", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="Human language of the content (BCP-47)", formalDefinition="The human language of the content. The value can be any valid value according to BCP 47." ) protected CodeType language; /** * The actual data of the attachment - a sequence of bytes. In XML, represented using base64. */ - @Child(name="data", type={Base64BinaryType.class}, order=1, min=0, max=1) + @Child(name="data", type={Base64BinaryType.class}, order=2, min=0, max=1) @Description(shortDefinition="Data inline, base64ed", formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." ) protected Base64BinaryType data; /** * An alternative location where the data can be accessed. */ - @Child(name="url", type={UriType.class}, order=2, min=0, max=1) + @Child(name="url", type={UriType.class}, order=3, min=0, max=1) @Description(shortDefinition="Uri where the data can be found", formalDefinition="An alternative location where the data can be accessed." ) protected UriType url; /** * The number of bytes of data that make up this attachment. */ - @Child(name="size", type={IntegerType.class}, order=3, min=0, max=1) + @Child(name="size", type={IntegerType.class}, order=4, min=0, max=1) @Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." ) protected IntegerType size; /** * The calculated hash of the data using SHA-1. Represented using base64. */ - @Child(name="hash", type={Base64BinaryType.class}, order=4, min=0, max=1) + @Child(name="hash", type={Base64BinaryType.class}, order=5, min=0, max=1) @Description(shortDefinition="Hash of the data (sha-1, base64ed )", formalDefinition="The calculated hash of the data using SHA-1. Represented using base64." ) protected Base64BinaryType hash; /** * A label or set of text to display in place of the data. */ - @Child(name="title", type={StringType.class}, order=5, min=0, max=1) + @Child(name="title", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." ) protected StringType title; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java index 8696e9c6c5f..7c1cbede262 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -46,7 +46,7 @@ public abstract class BackboneElement extends Element implements IBackboneElemen /** * May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. */ - @Child(name="modifierExtension", type={Extension.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="modifierExtension", type={Extension.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) protected List modifierExtension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java index f1c8d9a0718..ff748c0b33f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,21 +47,21 @@ public class Basic extends DomainResource { /** * Identifier assigned to the resource for business purposes, outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) protected List identifier; /** * Identifies the 'type' of resource - equivalent to the resource name for other resources. */ - @Child(name="code", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1) @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) protected CodeableConcept code; /** * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce. */ - @Child(name="subject", type={}, order=1, min=0, max=1) + @Child(name="subject", type={}, order=2, min=0, max=1) @Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." ) protected Reference subject; @@ -73,7 +73,7 @@ public class Basic extends DomainResource { /** * Indicates who was responsible for creating the resource instance. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1) + @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) protected Reference author; @@ -85,7 +85,7 @@ public class Basic extends DomainResource { /** * Identifies when the resource was first created. */ - @Child(name="created", type={DateType.class}, order=3, min=0, max=1) + @Child(name="created", type={DateType.class}, order=4, min=0, max=1) @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) protected DateType created; @@ -341,14 +341,14 @@ public class Basic extends DomainResource { return ResourceType.Basic; } - @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" ) - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the", type="reference" ) - public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" ) public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java index 273b111b829..96beb3cd92d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,14 +48,14 @@ public class Binary extends Resource { /** * MimeType of the binary content represented as a standard MimeType (BCP 13). */ - @Child(name="contentType", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="contentType", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." ) protected CodeType contentType; /** * The actual content, base64 encoded. */ - @Child(name="content", type={Base64BinaryType.class}, order=0, min=1, max=1) + @Child(name="content", type={Base64BinaryType.class}, order=1, min=1, max=1) @Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." ) protected Base64BinaryType content; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java index 2df8d736a54..8ef8942ce7e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -393,35 +393,35 @@ public class BodySite extends DomainResource { /** * Identifier for this instance of the anatomical location. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Bodysite identifier", formalDefinition="Identifier for this instance of the anatomical location." ) protected List identifier; /** * The Specific and identified anatomical location. */ - @Child(name="specificLocation", type={}, order=0, min=0, max=1) + @Child(name="specificLocation", type={}, order=1, min=0, max=1) @Description(shortDefinition="Specific anatomical location", formalDefinition="The Specific and identified anatomical location." ) protected BodySiteSpecificLocationComponent specificLocation; /** * Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference. */ - @Child(name="relativeLocation", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="relativeLocation", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Relative anatomical location(s)", formalDefinition="Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference." ) protected List relativeLocation; /** * Description of anatomical location. */ - @Child(name="description", type={StringType.class}, order=2, min=0, max=1) + @Child(name="description", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="The Description of anatomical location", formalDefinition="Description of anatomical location." ) protected StringType description; /** * Image or images used to identify a location. */ - @Child(name="image", type={Attachment.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="image", type={Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." ) protected List image; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java index e66717dd6c1..3cce37099d8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java @@ -29,19 +29,18 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; +import java.util.*; +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.annotations.ResourceDef; +import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.api.IBaseBundle; -import org.hl7.fhir.utilities.Utilities; /** * A container for a group of resources. */ @@ -948,9 +947,9 @@ public class Bundle extends Resource implements IBaseBundle { /** * Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention". */ - @Child(name="ifModifiedSince", type={StringType.class}, order=5, min=0, max=1) + @Child(name="ifModifiedSince", type={InstantType.class}, order=5, min=0, max=1) @Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'." ) - protected StringType ifModifiedSince; + protected InstantType ifModifiedSince; /** * Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". @@ -959,7 +958,7 @@ public class Bundle extends Resource implements IBaseBundle { @Description(shortDefinition="For conditional creates", formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information, see 'Conditional Create'." ) protected StringType ifNoneExist; - private static final long serialVersionUID = 1494764694L; + private static final long serialVersionUID = -769185862L; public BundleEntryTransactionComponent() { super(); @@ -1162,12 +1161,12 @@ public class Bundle extends Resource implements IBaseBundle { /** * @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value */ - public StringType getIfModifiedSinceElement() { + public InstantType getIfModifiedSinceElement() { if (this.ifModifiedSince == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryTransactionComponent.ifModifiedSince"); else if (Configuration.doAutoCreate()) - this.ifModifiedSince = new StringType(); // bb + this.ifModifiedSince = new InstantType(); // bb return this.ifModifiedSince; } @@ -1182,7 +1181,7 @@ public class Bundle extends Resource implements IBaseBundle { /** * @param value {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value */ - public BundleEntryTransactionComponent setIfModifiedSinceElement(StringType value) { + public BundleEntryTransactionComponent setIfModifiedSinceElement(InstantType value) { this.ifModifiedSince = value; return this; } @@ -1190,19 +1189,19 @@ public class Bundle extends Resource implements IBaseBundle { /** * @return Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention". */ - public String getIfModifiedSince() { + public Date getIfModifiedSince() { return this.ifModifiedSince == null ? null : this.ifModifiedSince.getValue(); } /** * @param value Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention". */ - public BundleEntryTransactionComponent setIfModifiedSince(String value) { - if (Utilities.noString(value)) + public BundleEntryTransactionComponent setIfModifiedSince(Date value) { + if (value == null) this.ifModifiedSince = null; else { if (this.ifModifiedSince == null) - this.ifModifiedSince = new StringType(); + this.ifModifiedSince = new InstantType(); this.ifModifiedSince.setValue(value); } return this; @@ -1263,7 +1262,7 @@ public class Bundle extends Resource implements IBaseBundle { childrenList.add(new Property("url", "uri", "A search URL for this resource that specifies how the resource is matched to an existing resource when processing a transaction (see transaction documentation).", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch)); childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifMatch)); - childrenList.add(new Property("ifModifiedSince", "string", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); + childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see 'Conditional Create'.", 0, java.lang.Integer.MAX_VALUE, ifNoneExist)); } @@ -1331,11 +1330,18 @@ public class Bundle extends Resource implements IBaseBundle { /** * The etag for the resource, it the operation for the entry produced a versioned resource. */ - @Child(name="etag", type={StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="etag", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="The etag for the resource (if relevant)", formalDefinition="The etag for the resource, it the operation for the entry produced a versioned resource." ) - protected List etag; + protected StringType etag; - private static final long serialVersionUID = -1512370306L; + /** + * The date/time that the resource was modified on the server. + */ + @Child(name="lastModified", type={InstantType.class}, order=4, min=0, max=1) + @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." ) + protected InstantType lastModified; + + private static final long serialVersionUID = -1526413234L; public BundleEntryTransactionResponseComponent() { super(); @@ -1441,57 +1447,101 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.) + * @return {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value */ - public List getEtag() { + public StringType getEtagElement() { if (this.etag == null) - this.etag = new ArrayList(); + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.etag"); + else if (Configuration.doAutoCreate()) + this.etag = new StringType(); // bb return this.etag; } + public boolean hasEtagElement() { + return this.etag != null && !this.etag.isEmpty(); + } + public boolean hasEtag() { - if (this.etag == null) - return false; - for (StringType item : this.etag) - if (!item.isEmpty()) - return true; - return false; + return this.etag != null && !this.etag.isEmpty(); } /** - * @return {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.) + * @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value */ - // syntactic sugar - public StringType addEtagElement() {//2 - StringType t = new StringType(); - if (this.etag == null) - this.etag = new ArrayList(); - this.etag.add(t); - return t; - } - - /** - * @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.) - */ - public BundleEntryTransactionResponseComponent addEtag(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.etag == null) - this.etag = new ArrayList(); - this.etag.add(t); + public BundleEntryTransactionResponseComponent setEtagElement(StringType value) { + this.etag = value; return this; } /** - * @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.) + * @return The etag for the resource, it the operation for the entry produced a versioned resource. */ - public boolean hasEtag(String value) { - if (this.etag == null) - return false; - for (StringType v : this.etag) - if (v.equals(value)) // string - return true; - return false; + public String getEtag() { + return this.etag == null ? null : this.etag.getValue(); + } + + /** + * @param value The etag for the resource, it the operation for the entry produced a versioned resource. + */ + public BundleEntryTransactionResponseComponent setEtag(String value) { + if (Utilities.noString(value)) + this.etag = null; + else { + if (this.etag == null) + this.etag = new StringType(); + this.etag.setValue(value); + } + return this; + } + + /** + * @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public InstantType getLastModifiedElement() { + if (this.lastModified == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.lastModified"); + else if (Configuration.doAutoCreate()) + this.lastModified = new InstantType(); // bb + return this.lastModified; + } + + public boolean hasLastModifiedElement() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + public boolean hasLastModified() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + /** + * @param value {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public BundleEntryTransactionResponseComponent setLastModifiedElement(InstantType value) { + this.lastModified = value; + return this; + } + + /** + * @return The date/time that the resource was modified on the server. + */ + public Date getLastModified() { + return this.lastModified == null ? null : this.lastModified.getValue(); + } + + /** + * @param value The date/time that the resource was modified on the server. + */ + public BundleEntryTransactionResponseComponent setLastModified(Date value) { + if (value == null) + this.lastModified = null; + else { + if (this.lastModified == null) + this.lastModified = new InstantType(); + this.lastModified.setValue(value); + } + return this; } protected void listChildren(List childrenList) { @@ -1499,6 +1549,7 @@ public class Bundle extends Resource implements IBaseBundle { childrenList.add(new Property("status", "string", "The status code returned by processing this entry.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("location", "uri", "The location header created by processing this operation.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("etag", "string", "The etag for the resource, it the operation for the entry produced a versioned resource.", 0, java.lang.Integer.MAX_VALUE, etag)); + childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); } public BundleEntryTransactionResponseComponent copy() { @@ -1506,11 +1557,8 @@ public class Bundle extends Resource implements IBaseBundle { copyValues(dst); dst.status = status == null ? null : status.copy(); dst.location = location == null ? null : location.copy(); - if (etag != null) { - dst.etag = new ArrayList(); - for (StringType i : etag) - dst.etag.add(i.copy()); - }; + dst.etag = etag == null ? null : etag.copy(); + dst.lastModified = lastModified == null ? null : lastModified.copy(); return dst; } @@ -1522,7 +1570,7 @@ public class Bundle extends Resource implements IBaseBundle { return false; BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other; return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true) - ; + && compareDeep(lastModified, o.lastModified, true); } @Override @@ -1533,12 +1581,12 @@ public class Bundle extends Resource implements IBaseBundle { return false; BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other; return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true) - ; + && compareValues(lastModified, o.lastModified, true); } public boolean isEmpty() { return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty()) - && (etag == null || etag.isEmpty()); + && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty()); } } @@ -1546,42 +1594,42 @@ public class Bundle extends Resource implements IBaseBundle { /** * Indicates the purpose of this bundle- how it was intended to be used. */ - @Child(name="type", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="document | message | transaction | transaction-response | history | searchset | collection", formalDefinition="Indicates the purpose of this bundle- how it was intended to be used." ) protected Enumeration type; /** * The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base). */ - @Child(name="base", type={UriType.class}, order=0, min=0, max=1) + @Child(name="base", type={UriType.class}, order=1, min=0, max=1) @Description(shortDefinition="Stated Base URL", formalDefinition="The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base)." ) protected UriType base; /** * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). */ - @Child(name="total", type={IntegerType.class}, order=1, min=0, max=1) + @Child(name="total", type={IntegerType.class}, order=2, min=0, max=1) @Description(shortDefinition="If search, the total number of matches", formalDefinition="If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)." ) protected IntegerType total; /** * A series of links that provide context to this bundle. */ - @Child(name="link", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="link", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." ) protected List link; /** * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only). */ - @Child(name="entry", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="entry", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Entry in the bundle - will have a resource, or information", formalDefinition="An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)." ) protected List entry; /** * XML Digital Signature - base64 encoded. */ - @Child(name="signature", type={Base64BinaryType.class}, order=4, min=0, max=1) + @Child(name="signature", type={Base64BinaryType.class}, order=5, min=0, max=1) @Description(shortDefinition="XML Digital Signature (base64 encoded)", formalDefinition="XML Digital Signature - base64 encoded." ) protected Base64BinaryType signature; @@ -1912,12 +1960,12 @@ public class Bundle extends Resource implements IBaseBundle { return ResourceType.Bundle; } - @SearchParamDefinition(name="message", path="", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type="reference" ) - public static final String SP_MESSAGE = "message"; @SearchParamDefinition(name="composition", path="", description="The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches it's contents", type="reference" ) public static final String SP_COMPOSITION = "composition"; @SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | history | searchset | collection", type="token" ) public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="message", path="", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type="reference" ) + public static final String SP_MESSAGE = "message"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java index 22e9abd87dc..9e0c4a4d794 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1855,14 +1855,14 @@ public class CarePlan extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -1874,28 +1874,28 @@ public class CarePlan extends DomainResource { /** * Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." ) protected Enumeration status; /** * Indicates when the plan did (or is intended to) come into effect and end. */ - @Child(name="period", type={Period.class}, order=2, min=0, max=1) + @Child(name="period", type={Period.class}, order=3, min=0, max=1) @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) protected Period period; /** * Identifies the most recent date on which the plan has been revised. */ - @Child(name="modified", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) protected DateTimeType modified; /** * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. */ - @Child(name="concern", type={Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) protected List concern; /** @@ -1907,28 +1907,28 @@ public class CarePlan extends DomainResource { /** * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. */ - @Child(name="participant", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) protected List participant; /** * Describes the intended objective(s) of carrying out the Care Plan. */ - @Child(name="goal", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="goal", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." ) protected List goal; /** * Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. */ - @Child(name="activity", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="activity", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Action to occur as part of plan", formalDefinition="Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) protected List activity; /** * General notes about the care plan not covered elsewhere. */ - @Child(name="notes", type={StringType.class}, order=8, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=9, min=0, max=1) @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) protected StringType notes; @@ -2416,20 +2416,20 @@ public class CarePlan extends DomainResource { return ResourceType.CarePlan; } - @SearchParamDefinition(name="activitycode", path="CarePlan.activity.simple.code", description="Detail type of activity", type="token" ) - public static final String SP_ACTIVITYCODE = "activitycode"; - @SearchParamDefinition(name="patient", path="CarePlan.patient", description="Who care plan is for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="condition", path="CarePlan.concern", description="Health issues this plan addresses", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="activitydetail", path="CarePlan.activity.detail", description="Activity details defined in specific resource", type="reference" ) - public static final String SP_ACTIVITYDETAIL = "activitydetail"; - @SearchParamDefinition(name="activitydate", path="CarePlan.activity.simple.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" ) - public static final String SP_ACTIVITYDATE = "activitydate"; - @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" ) - public static final String SP_PARTICIPANT = "participant"; @SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date" ) public static final String SP_DATE = "date"; + @SearchParamDefinition(name="activitycode", path="CarePlan.activity.simple.code", description="Detail type of activity", type="token" ) + public static final String SP_ACTIVITYCODE = "activitycode"; + @SearchParamDefinition(name="activitydate", path="CarePlan.activity.simple.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" ) + public static final String SP_ACTIVITYDATE = "activitydate"; + @SearchParamDefinition(name="activitydetail", path="CarePlan.activity.detail", description="Activity details defined in specific resource", type="reference" ) + public static final String SP_ACTIVITYDETAIL = "activitydetail"; + @SearchParamDefinition(name="condition", path="CarePlan.concern", description="Health issues this plan addresses", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="patient", path="CarePlan.patient", description="Who care plan is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" ) + public static final String SP_PARTICIPANT = "participant"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java index f7e1770dffd..2f67449bc2d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -270,14 +270,14 @@ public class CarePlan2 extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -289,28 +289,28 @@ public class CarePlan2 extends DomainResource { /** * Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." ) protected Enumeration status; /** * Indicates when the plan did (or is intended to) come into effect and end. */ - @Child(name="period", type={Period.class}, order=2, min=0, max=1) + @Child(name="period", type={Period.class}, order=3, min=0, max=1) @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) protected Period period; /** * Identifies the most recent date on which the plan has been revised. */ - @Child(name="modified", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) protected DateTimeType modified; /** * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. */ - @Child(name="concern", type={Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) protected List concern; /** @@ -322,21 +322,21 @@ public class CarePlan2 extends DomainResource { /** * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. */ - @Child(name="participant", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) protected List participant; /** * General notes about the care plan not covered elsewhere. */ - @Child(name="notes", type={StringType.class}, order=6, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) protected StringType notes; /** * Describes the intended objective(s) of carrying out the Care Plan. */ - @Child(name="goal", type={Goal.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="goal", type={Goal.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="CarePlan Goal", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." ) protected List goal; /** @@ -348,7 +348,7 @@ public class CarePlan2 extends DomainResource { /** * Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. */ - @Child(name="activity", type={ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="activity", type={ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="CarePlan Activity", formalDefinition="Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) protected List activity; /** @@ -871,14 +871,14 @@ public class CarePlan2 extends DomainResource { return ResourceType.CarePlan2; } - @SearchParamDefinition(name="patient", path="CarePlan2.patient", description="Who care plan is for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="condition", path="CarePlan2.concern", description="Health issues this plan addresses", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="participant", path="CarePlan2.participant.member", description="Who is involved", type="reference" ) - public static final String SP_PARTICIPANT = "participant"; @SearchParamDefinition(name="date", path="CarePlan2.period", description="Time period plan covers", type="date" ) public static final String SP_DATE = "date"; + @SearchParamDefinition(name="condition", path="CarePlan2.concern", description="Health issues this plan addresses", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="patient", path="CarePlan2.patient", description="Who care plan is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="participant", path="CarePlan2.participant.member", description="Who is involved", type="reference" ) + public static final String SP_PARTICIPANT = "participant"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java index da536744aa4..9c83c26786f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2536,14 +2536,14 @@ public class ClaimResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Response number", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource referrence. */ - @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order=0, min=0, max=1) + @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order=1, min=0, max=1) @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) protected Reference request; @@ -2555,28 +2555,28 @@ public class ClaimResponse extends DomainResource { /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=3, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=4, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -2588,7 +2588,7 @@ public class ClaimResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -2600,7 +2600,7 @@ public class ClaimResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -2612,119 +2612,119 @@ public class ClaimResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="outcome", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=8, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=9, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * Party to be reimbursed: Subscriber, provider, other. */ - @Child(name="payeeType", type={Coding.class}, order=9, min=0, max=1) + @Child(name="payeeType", type={Coding.class}, order=10, min=0, max=1) @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) protected Coding payeeType; /** * The first tier service adjudications for submitted services. */ - @Child(name="item", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Line items", formalDefinition="The first tier service adjudications for submitted services." ) protected List item; /** * The first tier service adjudications for payor added services. */ - @Child(name="additem", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additem", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." ) protected List additem; /** * Mutually exclusive with Services Provided (Item). */ - @Child(name="error", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="error", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) protected List error; /** * The total cost of the services reported. */ - @Child(name="totalCost", type={Money.class}, order=13, min=0, max=1) + @Child(name="totalCost", type={Money.class}, order=14, min=0, max=1) @Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." ) protected Money totalCost; /** * The amount of deductable applied which was not allocated to any particular service line. */ - @Child(name="unallocDeductable", type={Money.class}, order=14, min=0, max=1) + @Child(name="unallocDeductable", type={Money.class}, order=15, min=0, max=1) @Description(shortDefinition="Unallocated deductable", formalDefinition="The amount of deductable applied which was not allocated to any particular service line." ) protected Money unallocDeductable; /** * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable). */ - @Child(name="totalBenefit", type={Money.class}, order=15, min=0, max=1) + @Child(name="totalBenefit", type={Money.class}, order=16, min=0, max=1) @Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable)." ) protected Money totalBenefit; /** * Adjustment to the payment of this transaction which is not related to adjudication of this transaction. */ - @Child(name="paymentAdjustment", type={Money.class}, order=16, min=0, max=1) + @Child(name="paymentAdjustment", type={Money.class}, order=17, min=0, max=1) @Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." ) protected Money paymentAdjustment; /** * Reason for the payment adjustment. */ - @Child(name="paymentAdjustmentReason", type={Coding.class}, order=17, min=0, max=1) + @Child(name="paymentAdjustmentReason", type={Coding.class}, order=18, min=0, max=1) @Description(shortDefinition="Reason for Payment adjustment", formalDefinition="Reason for the payment adjustment." ) protected Coding paymentAdjustmentReason; /** * Estimated payment data. */ - @Child(name="paymentDate", type={DateType.class}, order=18, min=0, max=1) + @Child(name="paymentDate", type={DateType.class}, order=19, min=0, max=1) @Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." ) protected DateType paymentDate; /** * Payable less any payment adjustment. */ - @Child(name="paymentAmount", type={Money.class}, order=19, min=0, max=1) + @Child(name="paymentAmount", type={Money.class}, order=20, min=0, max=1) @Description(shortDefinition="Payment amount", formalDefinition="Payable less any payment adjustment." ) protected Money paymentAmount; /** * Payment identifer. */ - @Child(name="paymentRef", type={Identifier.class}, order=20, min=0, max=1) + @Child(name="paymentRef", type={Identifier.class}, order=21, min=0, max=1) @Description(shortDefinition="Payment identifier", formalDefinition="Payment identifer." ) protected Identifier paymentRef; /** * Status of funds reservation (For provider, for Patient, None). */ - @Child(name="reserved", type={Coding.class}, order=21, min=0, max=1) + @Child(name="reserved", type={Coding.class}, order=22, min=0, max=1) @Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." ) protected Coding reserved; /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=22, min=0, max=1) + @Child(name="form", type={Coding.class}, order=23, min=0, max=1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Note text. */ - @Child(name="note", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="note", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Processing notes", formalDefinition="Note text." ) protected List note; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java index b7f8a897038..2ccfc334015 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -470,7 +470,7 @@ public class ClinicalAssessment extends DomainResource { /** * The patient being asssesed. */ - @Child(name="patient", type={Patient.class}, order=-1, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) @Description(shortDefinition="The patient being asssesed", formalDefinition="The patient being asssesed." ) protected Reference patient; @@ -482,7 +482,7 @@ public class ClinicalAssessment extends DomainResource { /** * The clinicial performing the assessment. */ - @Child(name="assessor", type={Practitioner.class}, order=0, min=1, max=1) + @Child(name="assessor", type={Practitioner.class}, order=1, min=1, max=1) @Description(shortDefinition="The clinicial performing the assessment", formalDefinition="The clinicial performing the assessment." ) protected Reference assessor; @@ -494,21 +494,21 @@ public class ClinicalAssessment extends DomainResource { /** * The point in time at which the assessment was concluded (not when it was recorded). */ - @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1) + @Child(name="date", type={DateTimeType.class}, order=2, min=1, max=1) @Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." ) protected DateTimeType date; /** * A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. */ - @Child(name="description", type={StringType.class}, order=2, min=0, max=1) + @Child(name="description", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." ) protected StringType description; /** * A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes. */ - @Child(name="previous", type={ClinicalAssessment.class}, order=3, min=0, max=1) + @Child(name="previous", type={ClinicalAssessment.class}, order=4, min=0, max=1) @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." ) protected Reference previous; @@ -520,7 +520,7 @@ public class ClinicalAssessment extends DomainResource { /** * This a list of the general problems/conditions for a patient. */ - @Child(name="problem", type={Condition.class, AllergyIntolerance.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="problem", type={Condition.class, AllergyIntolerance.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." ) protected List problem; /** @@ -532,7 +532,7 @@ public class ClinicalAssessment extends DomainResource { /** * A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment. */ - @Child(name="careplan", type={CarePlan.class}, order=5, min=0, max=1) + @Child(name="careplan", type={CarePlan.class}, order=6, min=0, max=1) @Description(shortDefinition="A specific careplan that prompted this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment." ) protected Reference careplan; @@ -544,7 +544,7 @@ public class ClinicalAssessment extends DomainResource { /** * A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment. */ - @Child(name="referral", type={ReferralRequest.class}, order=6, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=7, min=0, max=1) @Description(shortDefinition="A specific referral that lead to this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment." ) protected Reference referral; @@ -556,56 +556,56 @@ public class ClinicalAssessment extends DomainResource { /** * One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes. */ - @Child(name="investigations", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="investigations", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="One or more sets of investigations (signs, symptions, etc)", formalDefinition="One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." ) protected List investigations; /** * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. */ - @Child(name="protocol", type={UriType.class}, order=8, min=0, max=1) + @Child(name="protocol", type={UriType.class}, order=9, min=0, max=1) @Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." ) protected UriType protocol; /** * A text summary of the investigations and the diagnosis. */ - @Child(name="summary", type={StringType.class}, order=9, min=0, max=1) + @Child(name="summary", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." ) protected StringType summary; /** * An specific diagnosis that was considered likely or relevant to ongoing treatment. */ - @Child(name="diagnosis", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Possible or likely diagnosis", formalDefinition="An specific diagnosis that was considered likely or relevant to ongoing treatment." ) protected List diagnosis; /** * Diagnoses/conditions resolved since the last assessment. */ - @Child(name="resolved", type={CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="resolved", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosies/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." ) protected List resolved; /** * Diagnosis considered not possible. */ - @Child(name="ruledOut", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="ruledOut", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." ) protected List ruledOut; /** * Estimate of likely outcome. */ - @Child(name="prognosis", type={StringType.class}, order=13, min=0, max=1) + @Child(name="prognosis", type={StringType.class}, order=14, min=0, max=1) @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." ) protected StringType prognosis; /** * Plan of action after assessment. */ - @Child(name="plan", type={CarePlan.class}, order=14, min=0, max=1) + @Child(name="plan", type={CarePlan.class}, order=15, min=0, max=1) @Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." ) protected Reference plan; @@ -617,7 +617,7 @@ public class ClinicalAssessment extends DomainResource { /** * Actions taken during assessment. */ - @Child(name="action", type={ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="action", type={ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." ) protected List action; /** @@ -1455,32 +1455,32 @@ public class ClinicalAssessment extends DomainResource { return ResourceType.ClinicalAssessment; } - @SearchParamDefinition(name="previous", path="ClinicalAssessment.previous", description="Reference to last assessment", type="reference" ) - public static final String SP_PREVIOUS = "previous"; - @SearchParamDefinition(name="referral", path="ClinicalAssessment.referral", description="A specific referral that lead to this assessment", type="reference" ) - public static final String SP_REFERRAL = "referral"; - @SearchParamDefinition(name="diagnosis", path="ClinicalAssessment.diagnosis.item", description="Specific text or code for diagnosis", type="token" ) - public static final String SP_DIAGNOSIS = "diagnosis"; - @SearchParamDefinition(name="problem", path="ClinicalAssessment.problem", description="General assessment of patient state", type="reference" ) - public static final String SP_PROBLEM = "problem"; @SearchParamDefinition(name="date", path="ClinicalAssessment.date", description="When the assessment occurred", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="careplan", path="ClinicalAssessment.careplan", description="A specific careplan that prompted this assessment", type="reference" ) - public static final String SP_CAREPLAN = "careplan"; - @SearchParamDefinition(name="ruledout", path="ClinicalAssessment.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) - public static final String SP_RULEDOUT = "ruledout"; + @SearchParamDefinition(name="previous", path="ClinicalAssessment.previous", description="Reference to last assessment", type="reference" ) + public static final String SP_PREVIOUS = "previous"; @SearchParamDefinition(name="assessor", path="ClinicalAssessment.assessor", description="The clinicial performing the assessment", type="reference" ) public static final String SP_ASSESSOR = "assessor"; + @SearchParamDefinition(name="careplan", path="ClinicalAssessment.careplan", description="A specific careplan that prompted this assessment", type="reference" ) + public static final String SP_CAREPLAN = "careplan"; + @SearchParamDefinition(name="diagnosis", path="ClinicalAssessment.diagnosis.item", description="Specific text or code for diagnosis", type="token" ) + public static final String SP_DIAGNOSIS = "diagnosis"; + @SearchParamDefinition(name="ruledout", path="ClinicalAssessment.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) + public static final String SP_RULEDOUT = "ruledout"; + @SearchParamDefinition(name="problem", path="ClinicalAssessment.problem", description="General assessment of patient state", type="reference" ) + public static final String SP_PROBLEM = "problem"; + @SearchParamDefinition(name="referral", path="ClinicalAssessment.referral", description="A specific referral that lead to this assessment", type="reference" ) + public static final String SP_REFERRAL = "referral"; @SearchParamDefinition(name="patient", path="ClinicalAssessment.patient", description="The patient being asssesed", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="resolved", path="ClinicalAssessment.resolved", description="Diagnosies/conditions resolved since previous assessment", type="token" ) - public static final String SP_RESOLVED = "resolved"; - @SearchParamDefinition(name="plan", path="ClinicalAssessment.plan", description="Plan of action after assessment", type="reference" ) - public static final String SP_PLAN = "plan"; - @SearchParamDefinition(name="action", path="ClinicalAssessment.action", description="Actions taken during assessment", type="reference" ) - public static final String SP_ACTION = "action"; @SearchParamDefinition(name="investigation", path="ClinicalAssessment.investigations.item", description="Record of a specific investigation", type="reference" ) public static final String SP_INVESTIGATION = "investigation"; + @SearchParamDefinition(name="action", path="ClinicalAssessment.action", description="Actions taken during assessment", type="reference" ) + public static final String SP_ACTION = "action"; + @SearchParamDefinition(name="plan", path="ClinicalAssessment.plan", description="Plan of action after assessment", type="reference" ) + public static final String SP_PLAN = "plan"; + @SearchParamDefinition(name="resolved", path="ClinicalAssessment.resolved", description="Diagnosies/conditions resolved since previous assessment", type="token" ) + public static final String SP_RESOLVED = "resolved"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java index 35b934a792b..3e11dcd1144 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java @@ -35,7 +35,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** * Primitive type "code" in FHIR, when not bound to an enumerated list of codes */ -@DatatypeDef(name="Code") +@DatatypeDef(name="code") public class CodeType extends PrimitiveType implements Comparable { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java index 8348cc4e7f8..4a205bf6450 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -41,19 +41,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. */ @DatatypeDef(name="CodeableConcept") -public class CodeableConcept extends Type implements ICompositeType { +public class CodeableConcept extends Type implements ICompositeType { /** * A reference to a code defined by a terminology system. */ - @Child(name="coding", type={Coding.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coding", type={Coding.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Code defined by a terminology system", formalDefinition="A reference to a code defined by a terminology system." ) protected List coding; /** * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. */ - @Child(name="text", type={StringType.class}, order=0, min=0, max=1) + @Child(name="text", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Plain text representation of the concept", formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." ) protected StringType text; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java index b1be31af2ed..6361030272a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,42 +47,42 @@ public class Coding extends Type implements ICoding, ICompositeType { /** * The identification of the code system that defines the meaning of the symbol in the code. */ - @Child(name="system", type={UriType.class}, order=-1, min=0, max=1) + @Child(name="system", type={UriType.class}, order=0, min=0, max=1) @Description(shortDefinition="Identity of the terminology system", formalDefinition="The identification of the code system that defines the meaning of the symbol in the code." ) protected UriType system; /** * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Version of the system - if relevant", formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." ) protected StringType version; /** * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). */ - @Child(name="code", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="code", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="Symbol in syntax defined by the system", formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." ) protected CodeType code; /** * A representation of the meaning of the code in the system, following the rules of the system. */ - @Child(name="display", type={StringType.class}, order=2, min=0, max=1) + @Child(name="display", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Representation defined by the system", formalDefinition="A representation of the meaning of the code in the system, following the rules of the system." ) protected StringType display; /** * Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays). */ - @Child(name="primary", type={BooleanType.class}, order=3, min=0, max=1) + @Child(name="primary", type={BooleanType.class}, order=4, min=0, max=1) @Description(shortDefinition="If this code was chosen directly by the user", formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." ) protected BooleanType primary; /** * The set of possible coded values this coding was chosen from or constrained by. */ - @Child(name="valueSet", type={ValueSet.class}, order=4, min=0, max=1) + @Child(name="valueSet", type={ValueSet.class}, order=5, min=0, max=1) @Description(shortDefinition="Set this coding was chosen from", formalDefinition="The set of possible coded values this coding was chosen from or constrained by." ) protected Reference valueSet; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java index 076dcc402d8..98017f6b27f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -266,21 +266,21 @@ public class Communication extends DomainResource { /** * Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifier", formalDefinition="Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The type of message such as alert, notification, reminder, instruction, etc. */ - @Child(name="category", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." ) protected CodeableConcept category; /** * The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication. */ - @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=1, min=0, max=1) + @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1) @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." ) protected Reference sender; @@ -292,7 +292,7 @@ public class Communication extends DomainResource { /** * The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication. */ - @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication." ) protected List recipient; /** @@ -304,28 +304,28 @@ public class Communication extends DomainResource { /** * Text, attachment(s), or resource(s) to be communicated to the recipient. */ - @Child(name="payload", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) protected List payload; /** * The communication medium, e.g., email, fax. */ - @Child(name="medium", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." ) protected List medium; /** * The status of the transmission. */ - @Child(name="status", type={CodeType.class}, order=5, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) @Description(shortDefinition="in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the transmission." ) protected Enumeration status; /** * The encounter within which the communication was sent. */ - @Child(name="encounter", type={Encounter.class}, order=6, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication was sent." ) protected Reference encounter; @@ -337,28 +337,28 @@ public class Communication extends DomainResource { /** * The time when this communication was sent. */ - @Child(name="sent", type={DateTimeType.class}, order=7, min=0, max=1) + @Child(name="sent", type={DateTimeType.class}, order=8, min=0, max=1) @Description(shortDefinition="When sent", formalDefinition="The time when this communication was sent." ) protected DateTimeType sent; /** * The time when this communication arrived at the destination. */ - @Child(name="received", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="received", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="When received", formalDefinition="The time when this communication arrived at the destination." ) protected DateTimeType received; /** * The reason or justification for the communication. */ - @Child(name="reason", type={CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication." ) protected List reason; /** * The patient who is the focus of this communication. */ - @Child(name="subject", type={Patient.class}, order=10, min=0, max=1) + @Child(name="subject", type={Patient.class}, order=11, min=0, max=1) @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication." ) protected Reference subject; @@ -926,28 +926,28 @@ public class Communication extends DomainResource { return ResourceType.Communication; } - @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" ) - public static final String SP_SENDER = "sender"; - @SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" ) - public static final String SP_SENT = "sent"; - @SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" ) - public static final String SP_RECEIVED = "received"; - @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="medium", path="Communication.medium", description="Communication medium", type="token" ) - public static final String SP_MEDIUM = "medium"; + @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" ) + public static final String SP_SENDER = "sender"; + @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference" ) public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" ) + public static final String SP_RECEIVED = "received"; + @SearchParamDefinition(name="medium", path="Communication.medium", description="Communication medium", type="token" ) + public static final String SP_MEDIUM = "medium"; + @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" ) + public static final String SP_SENT = "sent"; + @SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java index b14bd7bfbc2..1cc6f06f053 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -336,21 +336,21 @@ public class CommunicationRequest extends DomainResource { /** * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifier", formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system." ) protected List identifier; /** * The type of message such as alert, notification, reminder, instruction, etc. */ - @Child(name="category", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." ) protected CodeableConcept category; /** * The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication. */ - @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=1, min=0, max=1) + @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1) @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." ) protected Reference sender; @@ -362,7 +362,7 @@ public class CommunicationRequest extends DomainResource { /** * The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication. */ - @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication." ) protected List recipient; /** @@ -374,21 +374,21 @@ public class CommunicationRequest extends DomainResource { /** * Text, attachment(s), or resource(s) to be communicated to the recipient. */ - @Child(name="payload", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) protected List payload; /** * The communication medium, e.g., email, fax. */ - @Child(name="medium", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." ) protected List medium; /** * The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application. */ - @Child(name="requester", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=1) + @Child(name="requester", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1) @Description(shortDefinition="Requester of communication", formalDefinition="The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application." ) protected Reference requester; @@ -400,14 +400,14 @@ public class CommunicationRequest extends DomainResource { /** * The status of the proposal or order. */ - @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the proposal or order." ) protected Enumeration status; /** * The encounter within which the communication request was created. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication request was created." ) protected Reference encounter; @@ -419,28 +419,28 @@ public class CommunicationRequest extends DomainResource { /** * The time when this communication is to occur. */ - @Child(name="scheduledTime", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="scheduledTime", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." ) protected DateTimeType scheduledTime; /** * The reason or justification for the communication request. */ - @Child(name="reason", type={CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication request." ) protected List reason; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name="orderedOn", type={DateTimeType.class}, order=11, min=0, max=1) @Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The patient who is the focus of this communication request. */ - @Child(name="subject", type={Patient.class}, order=11, min=0, max=1) + @Child(name="subject", type={Patient.class}, order=12, min=0, max=1) @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication request." ) protected Reference subject; @@ -452,7 +452,7 @@ public class CommunicationRequest extends DomainResource { /** * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. */ - @Child(name="priority", type={CodeableConcept.class}, order=12, min=0, max=1) + @Child(name="priority", type={CodeableConcept.class}, order=13, min=0, max=1) @Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." ) protected CodeableConcept priority; @@ -1083,32 +1083,32 @@ public class CommunicationRequest extends DomainResource { return ResourceType.CommunicationRequest; } - @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" ) - public static final String SP_SENDER = "sender"; - @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledTime", description="When scheduled", type="date" ) - public static final String SP_TIME = "time"; @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="Requester of communication", type="reference" ) public static final String SP_REQUESTER = "requester"; - @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) - public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="ordered", path="CommunicationRequest.orderedOn", description="When ordered or proposed", type="date" ) - public static final String SP_ORDERED = "ordered"; - @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="ordered", path="CommunicationRequest.orderedOn", description="When ordered or proposed", type="date" ) + public static final String SP_ORDERED = "ordered"; + @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="Communication medium", type="token" ) public static final String SP_MEDIUM = "medium"; + @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) + public static final String SP_PRIORITY = "priority"; + @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" ) + public static final String SP_SENDER = "sender"; + @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" ) public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledTime", description="When scheduled", type="date" ) + public static final String SP_TIME = "time"; + @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java index 1ad3801d4ff..8460ee13cfb 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -898,56 +898,56 @@ public class Composition extends DomainResource { /** * Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical identifier of composition (version-independent)", formalDefinition="Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time." ) protected Identifier identifier; /** * The composition editing time, when the composition was last logically changed by the author. */ - @Child(name="date", type={DateTimeType.class}, order=0, min=1, max=1) + @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1) @Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." ) protected DateTimeType date; /** * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) @Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." ) protected CodeableConcept type; /** * A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type. */ - @Child(name="class_", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="class_", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type." ) protected CodeableConcept class_; /** * Official human-readable label for the composition. */ - @Child(name="title", type={StringType.class}, order=3, min=0, max=1) + @Child(name="title", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." ) protected StringType title; /** * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. */ - @Child(name="status", type={CodeType.class}, order=4, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=5, min=1, max=1) @Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." ) protected Enumeration status; /** * The code specifying the level of confidentiality of the Composition. */ - @Child(name="confidentiality", type={Coding.class}, order=5, min=1, max=1) + @Child(name="confidentiality", type={Coding.class}, order=6, min=1, max=1) @Description(shortDefinition="As defined by affinity domain", formalDefinition="The code specifying the level of confidentiality of the Composition." ) protected Coding confidentiality; /** * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order=6, min=1, max=1) + @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order=7, min=1, max=1) @Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." ) protected Reference subject; @@ -959,7 +959,7 @@ public class Composition extends DomainResource { /** * Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.). */ - @Child(name="author", type={Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=7, min=1, max=Child.MAX_UNLIMITED) + @Child(name="author", type={Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=8, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.)." ) protected List author; /** @@ -971,14 +971,14 @@ public class Composition extends DomainResource { /** * A participant who has attested to the accuracy of the composition/document. */ - @Child(name="attester", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="attester", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." ) protected List attester; /** * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information. */ - @Child(name="custodian", type={Organization.class}, order=9, min=0, max=1) + @Child(name="custodian", type={Organization.class}, order=10, min=0, max=1) @Description(shortDefinition="Org which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." ) protected Reference custodian; @@ -990,14 +990,14 @@ public class Composition extends DomainResource { /** * The clinical service, such as a colonoscopy or an appendectomy, being documented. */ - @Child(name="event", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." ) protected List event; /** * Describes the clinical encounter or type of care this documentation is associated with. */ - @Child(name="encounter", type={Encounter.class}, order=11, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=12, min=0, max=1) @Description(shortDefinition="Context of the conposition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." ) protected Reference encounter; @@ -1009,7 +1009,7 @@ public class Composition extends DomainResource { /** * The root of the sections that make up the composition. */ - @Child(name="section", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="section", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." ) protected List section; @@ -1617,36 +1617,36 @@ public class Composition extends DomainResource { return ResourceType.Composition; } - @SearchParamDefinition(name="section-code", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) - public static final String SP_SECTIONCODE = "section-code"; - @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | appended | amended | entered-in-error", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) - public static final String SP_CLASS = "class"; - @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) - public static final String SP_PERIOD = "period"; - @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="section", path="Composition.section.content", description="The Content of the section", type="reference" ) - public static final String SP_SECTION = "section"; - @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) - public static final String SP_TITLE = "title"; - @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" ) - public static final String SP_ATTESTER = "attester"; - @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) - public static final String SP_CONFIDENTIALITY = "confidentiality"; - @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) - public static final String SP_CONTEXT = "context"; @SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) + public static final String SP_CONFIDENTIALITY = "confidentiality"; + @SearchParamDefinition(name="section-code", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) + public static final String SP_SECTIONCODE = "section-code"; + @SearchParamDefinition(name="section", path="Composition.section.content", description="The Content of the section", type="reference" ) + public static final String SP_SECTION = "section"; + @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" ) + public static final String SP_ATTESTER = "attester"; + @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | appended | amended | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java index c49a18194ba..99ab342b186 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1092,91 +1092,91 @@ public class ConceptMap extends DomainResource { /** * The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={StringType.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical id to reference this concept map", formalDefinition="The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected StringType identifier; /** * The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the concept map", formalDefinition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name describing the concept map. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name="name", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." ) protected StringType name; /** * The name of the individual or organization that published the concept map. */ - @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." ) protected StringType publisher; /** * Contacts of the publisher to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. */ - @Child(name="description", type={StringType.class}, order=4, min=0, max=1) + @Child(name="description", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." ) protected StringType description; /** * A copyright statement relating to the concept map and/or its contents. */ - @Child(name="copyright", type={StringType.class}, order=5, min=0, max=1) + @Child(name="copyright", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="About the concept map or its content", formalDefinition="A copyright statement relating to the concept map and/or its contents." ) protected StringType copyright; /** * The status of the concept map. */ - @Child(name="status", type={CodeType.class}, order=6, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." ) protected Enumeration status; /** * This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that the concept map status was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date for given status", formalDefinition="The date that the concept map status was last changed." ) protected DateTimeType date; /** * The source value set that specifies the concepts that are being mapped. */ - @Child(name="source", type={UriType.class, ValueSet.class, Profile.class}, order=9, min=1, max=1) + @Child(name="source", type={UriType.class, ValueSet.class, Profile.class}, order=10, min=1, max=1) @Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." ) protected Type source; /** * The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made. */ - @Child(name="target", type={UriType.class, ValueSet.class, Profile.class}, order=10, min=1, max=1) + @Child(name="target", type={UriType.class, ValueSet.class, Profile.class}, order=11, min=1, max=1) @Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." ) protected Type target; /** * Mappings for an individual concept in the source to one or more concepts in the target. */ - @Child(name="element", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="element", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." ) protected List element; @@ -1849,30 +1849,30 @@ public class ConceptMap extends DomainResource { return ResourceType.ConceptMap; } - @SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="token" ) - public static final String SP_PRODUCT = "product"; - @SearchParamDefinition(name="dependson", path="ConceptMap.element.dependsOn.element", description="Reference to element/field/valueset mapping depends on", type="token" ) - public static final String SP_DEPENDSON = "dependson"; - @SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="token" ) - public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" ) - public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) - public static final String SP_TARGET = "target"; @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="The identifier of the concept map", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="token" ) + public static final String SP_PRODUCT = "product"; + @SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="token" ) + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="dependson", path="ConceptMap.element.dependsOn.element", description="Reference to element/field/valueset mapping depends on", type="token" ) + public static final String SP_DEPENDSON = "dependson"; + @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" ) + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" ) public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) + public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java index ea8c34d3be4..6d6ab86331e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -818,14 +818,14 @@ public class Condition extends DomainResource { /** * This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this condition", formalDefinition="This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Indicates the patient who the condition record is associated with. */ - @Child(name="subject", type={Patient.class}, order=0, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Who has the condition?", formalDefinition="Indicates the patient who the condition record is associated with." ) protected Reference subject; @@ -837,7 +837,7 @@ public class Condition extends DomainResource { /** * Encounter during which the condition was first asserted. */ - @Child(name="encounter", type={Encounter.class}, order=1, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1) @Description(shortDefinition="Encounter when condition first asserted", formalDefinition="Encounter during which the condition was first asserted." ) protected Reference encounter; @@ -849,7 +849,7 @@ public class Condition extends DomainResource { /** * Person who takes responsibility for asserting the existence of the condition as part of the electronic record. */ - @Child(name="asserter", type={Practitioner.class, Patient.class}, order=2, min=0, max=1) + @Child(name="asserter", type={Practitioner.class, Patient.class}, order=3, min=0, max=1) @Description(shortDefinition="Person who asserts this condition", formalDefinition="Person who takes responsibility for asserting the existence of the condition as part of the electronic record." ) protected Reference asserter; @@ -861,98 +861,98 @@ public class Condition extends DomainResource { /** * Estimated or actual date the condition/problem/diagnosis was first detected/suspected. */ - @Child(name="dateAsserted", type={DateType.class}, order=3, min=0, max=1) + @Child(name="dateAsserted", type={DateType.class}, order=4, min=0, max=1) @Description(shortDefinition="When first detected/suspected/entered", formalDefinition="Estimated or actual date the condition/problem/diagnosis was first detected/suspected." ) protected DateType dateAsserted; /** * Identification of the condition, problem or diagnosis. */ - @Child(name="code", type={CodeableConcept.class}, order=4, min=1, max=1) + @Child(name="code", type={CodeableConcept.class}, order=5, min=1, max=1) @Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." ) protected CodeableConcept code; /** * A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis. */ - @Child(name="category", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="E.g. complaint | symptom | finding | diagnosis", formalDefinition="A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis." ) protected CodeableConcept category; /** * The clinical status of the condition. */ - @Child(name="status", type={CodeType.class}, order=6, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) @Description(shortDefinition="provisional | working | confirmed | refuted", formalDefinition="The clinical status of the condition." ) protected Enumeration status; /** * The degree of confidence that this condition is correct. */ - @Child(name="certainty", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name="certainty", type={CodeableConcept.class}, order=8, min=0, max=1) @Description(shortDefinition="Degree of confidence", formalDefinition="The degree of confidence that this condition is correct." ) protected CodeableConcept certainty; /** * A subjective assessment of the severity of the condition as evaluated by the clinician. */ - @Child(name="severity", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name="severity", type={CodeableConcept.class}, order=9, min=0, max=1) @Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." ) protected CodeableConcept severity; /** * Estimated or actual date or date-time the condition began, in the opinion of the clinician. */ - @Child(name="onset", type={DateTimeType.class, Age.class}, order=9, min=0, max=1) + @Child(name="onset", type={DateTimeType.class, Age.class}, order=10, min=0, max=1) @Description(shortDefinition="Estimated or actual date, date-time, or age", formalDefinition="Estimated or actual date or date-time the condition began, in the opinion of the clinician." ) protected Type onset; /** * The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate. */ - @Child(name="abatement", type={DateType.class, Age.class, BooleanType.class}, order=10, min=0, max=1) + @Child(name="abatement", type={DateType.class, Age.class, BooleanType.class}, order=11, min=0, max=1) @Description(shortDefinition="If/when in resolution/remission", formalDefinition="The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate." ) protected Type abatement; /** * Clinical stage or grade of a condition. May include formal severity assessments. */ - @Child(name="stage", type={}, order=11, min=0, max=1) + @Child(name="stage", type={}, order=12, min=0, max=1) @Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." ) protected ConditionStageComponent stage; /** * Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed. */ - @Child(name="evidence", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="evidence", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Supporting evidence", formalDefinition="Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed." ) protected List evidence; /** * The anatomical location where this condition manifests itself. */ - @Child(name="location", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="location", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." ) protected List location; /** * Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition. */ - @Child(name="dueTo", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dueTo", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Causes for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition." ) protected List dueTo; /** * Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition. */ - @Child(name="occurredFollowing", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="occurredFollowing", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Precedent for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition." ) protected List occurredFollowing; /** * Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. */ - @Child(name="notes", type={StringType.class}, order=16, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=17, min=0, max=1) @Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." ) protected StringType notes; @@ -1705,40 +1705,40 @@ public class Condition extends DomainResource { return ResourceType.Condition; } - @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" ) - public static final String SP_ASSERTER = "asserter"; - @SearchParamDefinition(name="following-code", path="Condition.occurredFollowing.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) - public static final String SP_FOLLOWINGCODE = "following-code"; - @SearchParamDefinition(name="dueto-code", path="Condition.dueTo.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) - public static final String SP_DUETOCODE = "dueto-code"; - @SearchParamDefinition(name="status", path="Condition.status", description="The status of the condition", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="location", path="Condition.location.code", description="Location - may include laterality", type="token" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="subject", path="Condition.subject", description="Who has the condition?", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="When the Condition started (if started on a date)", type="date" ) - public static final String SP_ONSET = "onset"; - @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" ) - public static final String SP_EVIDENCE = "evidence"; - @SearchParamDefinition(name="following-item", path="Condition.occurredFollowing.target", description="Relationship target resource", type="reference" ) - public static final String SP_FOLLOWINGITEM = "following-item"; @SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token" ) public static final String SP_SEVERITY = "severity"; @SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" ) + public static final String SP_EVIDENCE = "evidence"; @SearchParamDefinition(name="date-asserted", path="Condition.dateAsserted", description="When first detected/suspected/entered", type="date" ) public static final String SP_DATEASSERTED = "date-asserted"; - @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" ) - public static final String SP_STAGE = "stage"; - @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="patient", path="Condition.subject", description="Who has the condition?", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="subject", path="Condition.subject", description="Who has the condition?", type="reference" ) + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="dueto-item", path="Condition.dueTo.target", description="Relationship target resource", type="reference" ) public static final String SP_DUETOITEM = "dueto-item"; + @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="When the Condition started (if started on a date)", type="date" ) + public static final String SP_ONSET = "onset"; + @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" ) + public static final String SP_ASSERTER = "asserter"; + @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" ) + public static final String SP_STAGE = "stage"; + @SearchParamDefinition(name="following-item", path="Condition.occurredFollowing.target", description="Relationship target resource", type="reference" ) + public static final String SP_FOLLOWINGITEM = "following-item"; + @SearchParamDefinition(name="patient", path="Condition.subject", description="Who has the condition?", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="dueto-code", path="Condition.dueTo.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) + public static final String SP_DUETOCODE = "dueto-code"; + @SearchParamDefinition(name="location", path="Condition.location.code", description="Location - may include laterality", type="token" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="following-code", path="Condition.occurredFollowing.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) + public static final String SP_FOLLOWINGCODE = "following-code"; + @SearchParamDefinition(name="status", path="Condition.status", description="The status of the condition", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java index 0f3f1912a9a..9f857e107e8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -133,11 +133,11 @@ public class Conformance extends DomainResource { public enum RestfulConformanceMode { /** - * The application acts as a server for this resource. + * The application acts as a client for this resource. */ CLIENT, /** - * The application acts as a client for this resource. + * The application acts as a server for this resource. */ SERVER, /** @@ -169,15 +169,15 @@ public class Conformance extends DomainResource { } public String getDefinition() { switch (this) { - case CLIENT: return "The application acts as a server for this resource."; - case SERVER: return "The application acts as a client for this resource."; + case CLIENT: return "The application acts as a client for this resource."; + case SERVER: return "The application acts as a server for this resource."; default: return "?"; } } public String getDisplay() { switch (this) { - case CLIENT: return "client"; - case SERVER: return "server"; + case CLIENT: return "Client"; + case SERVER: return "Server"; default: return "?"; } } @@ -4621,105 +4621,105 @@ public class Conformance extends DomainResource { /** * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={StringType.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical id to reference this statement", formalDefinition="The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected StringType identifier; /** * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the conformance statement. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name="name", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." ) protected StringType name; /** * Name of Organization publishing this conformance statement. */ - @Child(name="publisher", type={StringType.class}, order=2, min=1, max=1) + @Child(name="publisher", type={StringType.class}, order=3, min=1, max=1) @Description(shortDefinition="Publishing Organization", formalDefinition="Name of Organization publishing this conformance statement." ) protected StringType publisher; /** * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contacts for Organization", formalDefinition="Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc." ) protected List telecom; /** * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. */ - @Child(name="description", type={StringType.class}, order=4, min=0, max=1) + @Child(name="description", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) protected StringType description; /** * The status of this conformance statement. */ - @Child(name="status", type={CodeType.class}, order=5, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) protected Enumeration status; /** * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=6, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=7, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date (and optionally time) when the conformance statement was published. */ - @Child(name="date", type={DateTimeType.class}, order=7, min=1, max=1) + @Child(name="date", type={DateTimeType.class}, order=8, min=1, max=1) @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published." ) protected DateTimeType date; /** * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. */ - @Child(name="software", type={}, order=8, min=0, max=1) + @Child(name="software", type={}, order=9, min=0, max=1) @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation." ) protected ConformanceSoftwareComponent software; /** * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. */ - @Child(name="implementation", type={}, order=9, min=0, max=1) + @Child(name="implementation", type={}, order=10, min=0, max=1) @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) protected ConformanceImplementationComponent implementation; /** * The version of the FHIR specification on which this conformance statement is based. */ - @Child(name="fhirVersion", type={IdType.class}, order=10, min=1, max=1) + @Child(name="fhirVersion", type={IdType.class}, order=11, min=1, max=1) @Description(shortDefinition="FHIR Version", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) protected IdType fhirVersion; /** * A flag that indicates whether the application accepts unknown elements as part of a resource. */ - @Child(name="acceptUnknown", type={BooleanType.class}, order=11, min=1, max=1) + @Child(name="acceptUnknown", type={BooleanType.class}, order=12, min=1, max=1) @Description(shortDefinition="True if application accepts unknown elements", formalDefinition="A flag that indicates whether the application accepts unknown elements as part of a resource." ) protected BooleanType acceptUnknown; /** * A list of the formats supported by this implementation. */ - @Child(name="format", type={CodeType.class}, order=12, min=1, max=Child.MAX_UNLIMITED) + @Child(name="format", type={CodeType.class}, order=13, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation." ) protected List format; /** * A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. */ - @Child(name="profile", type={Profile.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="profile", type={Profile.class}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Profiles supported by the system", formalDefinition="A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile." ) protected List profile; /** @@ -4731,21 +4731,21 @@ public class Conformance extends DomainResource { /** * A definition of the restful capabilities of the solution, if any. */ - @Child(name="rest", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="rest", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) protected List rest; /** * A description of the messaging capabilities of the solution. */ - @Child(name="messaging", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="messaging", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) protected List messaging; /** * A document definition. */ - @Child(name="document", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="document", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) protected List document; @@ -5625,38 +5625,38 @@ public class Conformance extends DomainResource { return ResourceType.Conformance; } - @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) - public static final String SP_RESOURCE = "resource"; - @SearchParamDefinition(name="security", path="Conformance.rest.security", description="Information about security of implementation", type="token" ) - public static final String SP_SECURITY = "security"; - @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) - public static final String SP_FORMAT = "format"; @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) - public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) - public static final String SP_MODE = "mode"; - @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) - public static final String SP_SOFTWARE = "software"; - @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) - public static final String SP_EVENT = "event"; - @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles supported by the system", type="reference" ) - public static final String SP_SUPPORTEDPROFILE = "supported-profile"; - @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) - public static final String SP_FHIRVERSION = "fhirversion"; @SearchParamDefinition(name="identifier", path="Conformance.identifier", description="The identifier of the conformance statement", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) + public static final String SP_SOFTWARE = "software"; + @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) + public static final String SP_RESOURCE = "resource"; @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" ) public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) + public static final String SP_FORMAT = "format"; + @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) + public static final String SP_FHIRVERSION = "fhirversion"; + @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles supported by the system", type="reference" ) + public static final String SP_SUPPORTEDPROFILE = "supported-profile"; + @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) + public static final String SP_MODE = "mode"; + @SearchParamDefinition(name="security", path="Conformance.rest.security", description="Information about security of implementation", type="token" ) + public static final String SP_SECURITY = "security"; + @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java index c3d6a02ff0a..b99b1af2756 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java @@ -29,12 +29,12 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 public class Constants { public final static String VERSION = "0.4.0"; - public final static String REVISION = "4077"; - public final static String DATE = "Sat Feb 14 16:12:47 EST 2015"; + public final static String REVISION = "4117"; + public final static String DATE = "Wed Feb 18 12:09:23 EST 2015"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java index c52675f73d9..91571b84f9c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc. */ @DatatypeDef(name="ContactPoint") -public class ContactPoint extends Type implements ICompositeType { +public class ContactPoint extends Type implements ICompositeType { public enum ContactPointSystem { /** @@ -260,28 +260,28 @@ public class ContactPoint extends Type implements ICompositeType { /** * Telecommunications form for contact point - what communications system is required to make use of the contact. */ - @Child(name="system", type={CodeType.class}, order=-1, min=0, max=1) + @Child(name="system", type={CodeType.class}, order=0, min=0, max=1) @Description(shortDefinition="phone | fax | email | url", formalDefinition="Telecommunications form for contact point - what communications system is required to make use of the contact." ) protected Enumeration system; /** * The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). */ - @Child(name="value", type={StringType.class}, order=0, min=0, max=1) + @Child(name="value", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="The actual contact point details", formalDefinition="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." ) protected StringType value; /** * Identifies the purpose for the contact point. */ - @Child(name="use", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="home | work | temp | old | mobile - purpose of this contact point", formalDefinition="Identifies the purpose for the contact point." ) protected Enumeration use; /** * Time period when the contact point was/is in use. */ - @Child(name="period", type={Period.class}, order=2, min=0, max=1) + @Child(name="period", type={Period.class}, order=3, min=0, max=1) @Description(shortDefinition="Time period when the contact point was/is in use", formalDefinition="Time period when the contact point was/is in use." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java index 7108c3b5c64..9a666f4160b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -765,14 +765,14 @@ public class Contract extends DomainResource { /** * Unique Id for this contract. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contract identifier", formalDefinition="Unique Id for this contract." ) protected List identifier; /** * Who and/or what this is about: typically Patient, Organization, property. */ - @Child(name="subject", type={}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="subject", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Subject", formalDefinition="Who and/or what this is about: typically Patient, Organization, property." ) protected List subject; /** @@ -784,7 +784,7 @@ public class Contract extends DomainResource { /** * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. */ - @Child(name="authority", type={Organization.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="authority", type={Organization.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Authority", formalDefinition="A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc." ) protected List authority; /** @@ -796,7 +796,7 @@ public class Contract extends DomainResource { /** * A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations. */ - @Child(name="domain", type={Location.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="domain", type={Location.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Domain", formalDefinition="A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations." ) protected List domain; /** @@ -808,70 +808,70 @@ public class Contract extends DomainResource { /** * Type of contract (Privacy-Security, Agreement, Insurance). */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="Type of contract", formalDefinition="Type of contract (Privacy-Security, Agreement, Insurance)." ) protected CodeableConcept type; /** * More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat). */ - @Child(name="subtype", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="subtype", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Subtype of contract", formalDefinition="More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat)." ) protected List subtype; /** * When this was issued. */ - @Child(name="issued", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="issued", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="When this was issued", formalDefinition="When this was issued." ) protected DateTimeType issued; /** * Relevant time/time-period when applicable. */ - @Child(name="applies", type={Period.class}, order=6, min=0, max=1) + @Child(name="applies", type={Period.class}, order=7, min=0, max=1) @Description(shortDefinition="Effective time", formalDefinition="Relevant time/time-period when applicable." ) protected Period applies; /** * The number of repetitions of a service or product. */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) + @Child(name="quantity", type={Quantity.class}, order=8, min=0, max=1) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected Quantity quantity; /** * The unit price product. */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) + @Child(name="unitPrice", type={Money.class}, order=9, min=0, max=1) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The unit price product." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) + @Child(name="factor", type={DecimalType.class}, order=10, min=0, max=1) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) + @Child(name="points", type={DecimalType.class}, order=11, min=0, max=1) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) + @Child(name="net", type={Money.class}, order=12, min=0, max=1) @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * Contract author or responsible party. */ - @Child(name="author", type={Practitioner.class, RelatedPerson.class, Organization.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="author", type={Practitioner.class, RelatedPerson.class, Organization.class}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contract author or responsible party", formalDefinition="Contract author or responsible party." ) protected List author; /** @@ -883,7 +883,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="grantor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="grantor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="First Party or delegator", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List grantor; /** @@ -895,7 +895,7 @@ public class Contract extends DomainResource { /** * The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated. */ - @Child(name="grantee", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="grantee", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Second Party or delegatee", formalDefinition="The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated." ) protected List grantee; /** @@ -907,7 +907,7 @@ public class Contract extends DomainResource { /** * Who witnesses the contract. */ - @Child(name="witness", type={Practitioner.class, RelatedPerson.class, Patient.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="witness", type={Practitioner.class, RelatedPerson.class, Patient.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Witness to the contract", formalDefinition="Who witnesses the contract." ) protected List witness; /** @@ -919,7 +919,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="executor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="executor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Trustee", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List executor; /** @@ -931,7 +931,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="notary", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notary", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Notary Public", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List notary; /** @@ -943,70 +943,70 @@ public class Contract extends DomainResource { /** * List or contract signatures. */ - @Child(name="signer", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name="signer", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Signer", formalDefinition="List or contract signatures." ) protected List signer; /** * The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time. */ - @Child(name="term", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name="term", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The terms of the Contract", formalDefinition="The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time." ) protected List term; /** * Legally binding contract. */ - @Child(name="binding", type={Attachment.class}, order=20, min=0, max=1) + @Child(name="binding", type={Attachment.class}, order=21, min=0, max=1) @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding contract." ) protected Attachment binding; /** * Relevant time/time-period when applicable. */ - @Child(name="bindingDateTime", type={DateTimeType.class}, order=21, min=0, max=1) + @Child(name="bindingDateTime", type={DateTimeType.class}, order=22, min=0, max=1) @Description(shortDefinition="Binding Contract effective time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType bindingDateTime; /** * Friendly Human readable form (might be a reference to the UI used to capture the contract). */ - @Child(name="friendly", type={Attachment.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="friendly", type={Attachment.class}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Human readable contract text", formalDefinition="Friendly Human readable form (might be a reference to the UI used to capture the contract)." ) protected List friendly; /** * Relevant time/time-period when applicable. */ - @Child(name="friendlyDateTime", type={DateTimeType.class}, order=23, min=0, max=1) + @Child(name="friendlyDateTime", type={DateTimeType.class}, order=24, min=0, max=1) @Description(shortDefinition="Human readable contract text effective time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType friendlyDateTime; /** * Legal text in Human readable form. */ - @Child(name="legal", type={Attachment.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name="legal", type={Attachment.class}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Legal contract text", formalDefinition="Legal text in Human readable form." ) protected List legal; /** * Relevant time/time-period when applicable. */ - @Child(name="legalDateTime", type={DateTimeType.class}, order=25, min=0, max=1) + @Child(name="legalDateTime", type={DateTimeType.class}, order=26, min=0, max=1) @Description(shortDefinition="Legal contract text date time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType legalDateTime; /** * Computable Policy rules (e.g. XACML, DKAL, SecPal). */ - @Child(name="rule", type={Attachment.class}, order=26, min=0, max=Child.MAX_UNLIMITED) + @Child(name="rule", type={Attachment.class}, order=27, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Computable contract text", formalDefinition="Computable Policy rules (e.g. XACML, DKAL, SecPal)." ) protected List rule; /** * Relevant time/time-period when applicable. */ - @Child(name="ruleDateTime", type={DateTimeType.class}, order=27, min=0, max=1) + @Child(name="ruleDateTime", type={DateTimeType.class}, order=28, min=0, max=1) @Description(shortDefinition="Computable contract text effect time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType ruleDateTime; @@ -2277,10 +2277,10 @@ public class Contract extends DomainResource { return ResourceType.Contract; } - @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java index 2acda164777..dab774fee1b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -248,7 +248,7 @@ public class Contraindication extends DomainResource { /** * Indicates the patient whose record the contraindication is associated with. */ - @Child(name="patient", type={Patient.class}, order=-1, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) @Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the contraindication is associated with." ) protected Reference patient; @@ -260,21 +260,21 @@ public class Contraindication extends DomainResource { /** * Identifies the general type of issue identified. */ - @Child(name="category", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="E.g. Drug-drug, duplicate therapy, etc.", formalDefinition="Identifies the general type of issue identified." ) protected CodeableConcept category; /** * Indicates the degree of importance associated with the identified issue based on the potential impact on the patient. */ - @Child(name="severity", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="severity", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="high | medium | low", formalDefinition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." ) protected CodeType severity; /** * Indicates the resource representing the current activity or proposed activity that. */ - @Child(name="implicated", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="implicated", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that." ) protected List implicated; /** @@ -286,21 +286,21 @@ public class Contraindication extends DomainResource { /** * A textual explanation of the contraindication. */ - @Child(name="detail", type={StringType.class}, order=3, min=0, max=1) + @Child(name="detail", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the contraindication." ) protected StringType detail; /** * The date or date-time when the contraindication was initially identified. */ - @Child(name="date", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="When identified", formalDefinition="The date or date-time when the contraindication was initially identified." ) protected DateTimeType date; /** * Identifies the provider or software that identified the. */ - @Child(name="author", type={Practitioner.class, Device.class}, order=5, min=0, max=1) + @Child(name="author", type={Practitioner.class, Device.class}, order=6, min=0, max=1) @Description(shortDefinition="Who found issue?", formalDefinition="Identifies the provider or software that identified the." ) protected Reference author; @@ -312,21 +312,21 @@ public class Contraindication extends DomainResource { /** * Business identifier associated with the contraindication record. */ - @Child(name="identifier", type={Identifier.class}, order=6, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=7, min=0, max=1) @Description(shortDefinition="Unique id for the contraindication", formalDefinition="Business identifier associated with the contraindication record." ) protected Identifier identifier; /** * The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified. */ - @Child(name="reference", type={UriType.class}, order=7, min=0, max=1) + @Child(name="reference", type={UriType.class}, order=8, min=0, max=1) @Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified." ) protected UriType reference; /** * Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action. */ - @Child(name="mitigation", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mitigation", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." ) protected List mitigation; @@ -811,16 +811,16 @@ public class Contraindication extends DomainResource { return ResourceType.Contraindication; } - @SearchParamDefinition(name="category", path="Contraindication.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="implicated", path="Contraindication.implicated", description="Problem resource", type="reference" ) - public static final String SP_IMPLICATED = "implicated"; - @SearchParamDefinition(name="patient", path="Contraindication.patient", description="Associated patient", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="date", path="Contraindication.date", description="When identified", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Contraindication.identifier", description="Unique id for the contraindication", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="Contraindication.patient", description="Associated patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="implicated", path="Contraindication.implicated", description="Problem resource", type="reference" ) + public static final String SP_IMPLICATED = "implicated"; + @SearchParamDefinition(name="category", path="Contraindication.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" ) + public static final String SP_CATEGORY = "category"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Count.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Count.java index d101b70032b..eb061973c98 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Count.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Count.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java index 0421be61aa4..e4b428ffe38 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,7 +48,7 @@ public class Coverage extends DomainResource { /** * The program or plan underwriter or payor. */ - @Child(name="issuer", type={Organization.class}, order=-1, min=0, max=1) + @Child(name="issuer", type={Organization.class}, order=0, min=0, max=1) @Description(shortDefinition="An identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." ) protected Reference issuer; @@ -60,63 +60,63 @@ public class Coverage extends DomainResource { /** * Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. */ - @Child(name="period", type={Period.class}, order=0, min=0, max=1) + @Child(name="period", type={Period.class}, order=1, min=0, max=1) @Description(shortDefinition="Coverage start and end dates", formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." ) protected Period period; /** * The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health. */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) + @Child(name="type", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Type of coverage", formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health." ) protected Coding type; /** * The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID. */ - @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The primary coverage ID", formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID." ) protected List identifier; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name="group", type={StringType.class}, order=3, min=0, max=1) + @Child(name="group", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="An identifier for the group", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType group; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name="plan", type={StringType.class}, order=4, min=0, max=1) + @Child(name="plan", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="An identifier for the plan", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType plan; /** * Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. */ - @Child(name="subplan", type={StringType.class}, order=5, min=0, max=1) + @Child(name="subplan", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="An identifier for the subsection of the plan", formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID." ) protected StringType subplan; /** * A unique identifier for a dependent under the coverage. */ - @Child(name="dependent", type={IntegerType.class}, order=6, min=0, max=1) + @Child(name="dependent", type={IntegerType.class}, order=7, min=0, max=1) @Description(shortDefinition="The dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) protected IntegerType dependent; /** * An optional counter for a particular instance of the identified coverage which increments upon each renewal. */ - @Child(name="sequence", type={IntegerType.class}, order=7, min=0, max=1) + @Child(name="sequence", type={IntegerType.class}, order=8, min=0, max=1) @Description(shortDefinition="The plan instance or sequence counter", formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal." ) protected IntegerType sequence; /** * The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due. */ - @Child(name="subscriber", type={Patient.class}, order=8, min=0, max=1) + @Child(name="subscriber", type={Patient.class}, order=9, min=0, max=1) @Description(shortDefinition="Plan holder information", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." ) protected Reference subscriber; @@ -128,14 +128,14 @@ public class Coverage extends DomainResource { /** * The identifier for a community of providers. */ - @Child(name="network", type={Identifier.class}, order=9, min=0, max=1) + @Child(name="network", type={Identifier.class}, order=10, min=0, max=1) @Description(shortDefinition="Insurer network", formalDefinition="The identifier for a community of providers." ) protected Identifier network; /** * The policy(s) which constitute this insurance coverage. */ - @Child(name="contract", type={Contract.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contract", type={Contract.class}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." ) protected List contract; /** @@ -712,22 +712,22 @@ public class Coverage extends DomainResource { return ResourceType.Coverage; } - @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" ) - public static final String SP_PLAN = "plan"; - @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" ) - public static final String SP_ISSUER = "issuer"; - @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) - public static final String SP_SEQUENCE = "sequence"; - @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" ) - public static final String SP_DEPENDENT = "dependent"; - @SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" ) - public static final String SP_GROUP = "group"; - @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) + public static final String SP_SEQUENCE = "sequence"; @SearchParamDefinition(name="subplan", path="Coverage.subplan", description="Sub-plan identifier", type="token" ) public static final String SP_SUBPLAN = "subplan"; + @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" ) + public static final String SP_PLAN = "plan"; + @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" ) + public static final String SP_DEPENDENT = "dependent"; + @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" ) + public static final String SP_ISSUER = "issuer"; + @SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" ) + public static final String SP_GROUP = "group"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java index 3712c11ee25..8f299c5b446 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -964,154 +964,154 @@ public class DataElement extends DomainResource { /** * The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical id to reference this data element", formalDefinition="The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance." ) protected Identifier identifier; /** * The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the data element", formalDefinition="The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually." ) protected StringType version; /** * Details of the individual or organization who accepts responsibility for publishing the data element. */ - @Child(name="publisher", type={StringType.class}, order=1, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the data element." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * The status of the data element. */ - @Child(name="status", type={CodeType.class}, order=3, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=4, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." ) protected Enumeration status; /** * The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired). */ - @Child(name="date", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="Date for this version of the data element", formalDefinition="The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired)." ) protected DateTimeType date; /** * The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. */ - @Child(name="name", type={StringType.class}, order=5, min=0, max=1) + @Child(name="name", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." ) protected StringType name; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions. */ - @Child(name="category", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="category", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions." ) protected List category; /** * Identifies how precise the data element is in its definition. */ - @Child(name="granularity", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="granularity", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." ) protected Enumeration granularity; /** * A code that provides the meaning for a data element according to a particular terminology. */ - @Child(name="code", type={Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="code", type={Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifying concept", formalDefinition="A code that provides the meaning for a data element according to a particular terminology." ) protected List code; /** * The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey). */ - @Child(name="question", type={StringType.class}, order=9, min=0, max=1) + @Child(name="question", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Prompt for element phrased as question", formalDefinition="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)." ) protected StringType question; /** * The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. */ - @Child(name="label", type={StringType.class}, order=10, min=0, max=1) + @Child(name="label", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." ) protected StringType label; /** * Provides a complete explanation of the meaning of the data element for human readability. */ - @Child(name="definition", type={StringType.class}, order=11, min=0, max=1) + @Child(name="definition", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="Definition/description as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability." ) protected StringType definition; /** * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc. */ - @Child(name="comments", type={StringType.class}, order=12, min=0, max=1) + @Child(name="comments", type={StringType.class}, order=13, min=0, max=1) @Description(shortDefinition="Comments about the use of this element", formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc." ) protected StringType comments; /** * Explains why this element is needed and why it's been constrained as it has. */ - @Child(name="requirements", type={StringType.class}, order=13, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=14, min=0, max=1) @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this element is needed and why it's been constrained as it has." ) protected StringType requirements; /** * Identifies additional names by which this element might also be known. */ - @Child(name="synonym", type={StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="synonym", type={StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) protected List synonym; /** * The FHIR data type that is the type for data that corresponds to this data element. */ - @Child(name="type", type={CodeType.class}, order=15, min=0, max=1) + @Child(name="type", type={CodeType.class}, order=16, min=0, max=1) @Description(shortDefinition="Name of Data type", formalDefinition="The FHIR data type that is the type for data that corresponds to this data element." ) protected CodeType type; /** * A sample value for this element demonstrating the type of information that would typically be captured. */ - @Child(name="example", type={}, order=16, min=0, max=1) + @Child(name="example", type={}, order=17, min=0, max=1) @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="A sample value for this element demonstrating the type of information that would typically be captured." ) protected org.hl7.fhir.instance.model.Type example; /** * Indicates the shortest length that SHALL be supported by conformant instances without truncation. */ - @Child(name="maxLength", type={IntegerType.class}, order=17, min=0, max=1) + @Child(name="maxLength", type={IntegerType.class}, order=18, min=0, max=1) @Description(shortDefinition="Length for strings", formalDefinition="Indicates the shortest length that SHALL be supported by conformant instances without truncation." ) protected IntegerType maxLength; /** * Identifies the units of measure in which the data element should be captured or expressed. */ - @Child(name="units", type={CodeableConcept.class, ValueSet.class}, order=18, min=0, max=1) + @Child(name="units", type={CodeableConcept.class, ValueSet.class}, order=19, min=0, max=1) @Description(shortDefinition="Units to use for measured value", formalDefinition="Identifies the units of measure in which the data element should be captured or expressed." ) protected Type units; /** * Binds to a value set if this element is coded (code, Coding, CodeableConcept). */ - @Child(name="binding", type={}, order=19, min=0, max=1) + @Child(name="binding", type={}, order=20, min=0, max=1) @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)." ) protected DataElementBindingComponent binding; /** * Identifies a concept from an external specification that roughly corresponds to this element. */ - @Child(name="mapping", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mapping", type={}, order=21, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) protected List mapping; @@ -2159,24 +2159,24 @@ public class DataElement extends DomainResource { return ResourceType.DataElement; } - @SearchParamDefinition(name="category", path="DataElement.category", description="A category assigned to the data element (server may choose to do subsumption)", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="DataElement.definition", description="Text search in the description of the data element", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="code", path="DataElement.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) - public static final String SP_CODE = "code"; @SearchParamDefinition(name="date", path="DataElement.date", description="The data element publication date", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="DataElement.identifier", description="The identifier of the data element", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="DataElement.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="DataElement.definition", description="Text search in the description of the data element", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="category", path="DataElement.category", description="A category assigned to the data element (server may choose to do subsumption)", type="token" ) + public static final String SP_CATEGORY = "category"; @SearchParamDefinition(name="version", path="DataElement.version", description="The version identifier of the data element", type="string" ) public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java index 33c4ba7225d..9e563e658ff 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,63 +48,63 @@ public class Device extends DomainResource { /** * Unique instance identifiers assigned to a device by organizations like manufacturers, owners or regulatory agencies. If the identifier identifies the type of device, Device.type should be used. An example is the FDA Mandated Unique Device Identifier (UDI) which identifies an instance of a device uniquely if the serial number is present, . - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Instance id from manufacturer, owner, regulatory agencies and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers, owners or regulatory agencies. If the identifier identifies the type of device, Device.type should be used. An example is the FDA Mandated Unique Device Identifier (UDI) which identifies an instance of a device uniquely if the serial number is present, . - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) protected List identifier; /** * Code or identifier to identify a kind of device An example is the FDA Mandated Unique Device Identifier (UDI) which identifies a type of a device when the serial number is absent, otherwise it uniquely identifies the device instance and Device.identifier should be used instead of Device.type. - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device An example is the FDA Mandated Unique Device Identifier (UDI) which identifies a type of a device when the serial number is absent, otherwise it uniquely identifies the device instance and Device.identifier should be used instead of Device.type. - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) protected CodeableConcept type; /** * A name of the manufacturer. */ - @Child(name="manufacturer", type={StringType.class}, order=1, min=0, max=1) + @Child(name="manufacturer", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) protected StringType manufacturer; /** * The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. */ - @Child(name="model", type={StringType.class}, order=2, min=0, max=1) + @Child(name="model", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The 'model' - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) protected StringType model; /** * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. */ - @Child(name="version", type={StringType.class}, order=3, min=0, max=1) + @Child(name="version", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) protected StringType version; /** * The Date and time when the device was manufactured. */ - @Child(name="manufactureDate", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="manufactureDate", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="Manufacture date", formalDefinition="The Date and time when the device was manufactured." ) protected DateTimeType manufactureDate; /** * The date and time beyond which this device is no longer valid or should not be used (if applicable). */ - @Child(name="expiry", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="expiry", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." ) protected DateTimeType expiry; /** * Lot number assigned by the manufacturer. */ - @Child(name="lotNumber", type={StringType.class}, order=6, min=0, max=1) + @Child(name="lotNumber", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) protected StringType lotNumber; /** * An organization that is responsible for the provision and ongoing maintenance of the device. */ - @Child(name="owner", type={Organization.class}, order=7, min=0, max=1) + @Child(name="owner", type={Organization.class}, order=8, min=0, max=1) @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) protected Reference owner; @@ -116,7 +116,7 @@ public class Device extends DomainResource { /** * The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. "in/with the patient"), or a coded location. */ - @Child(name="location", type={Location.class}, order=8, min=0, max=1) + @Child(name="location", type={Location.class}, order=9, min=0, max=1) @Description(shortDefinition="Where the resource is found", formalDefinition="The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. 'in/with the patient'), or a coded location." ) protected Reference location; @@ -128,7 +128,7 @@ public class Device extends DomainResource { /** * Patient information, if the resource is affixed to a person. */ - @Child(name="patient", type={Patient.class}, order=9, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=10, min=0, max=1) @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." ) protected Reference patient; @@ -140,14 +140,14 @@ public class Device extends DomainResource { /** * Contact details for an organization or a particular human that is responsible for the device. */ - @Child(name="contact", type={ContactPoint.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contact", type={ContactPoint.class}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) protected List contact; /** * A network address on which the device may be contacted directly. */ - @Child(name="url", type={UriType.class}, order=11, min=0, max=1) + @Child(name="url", type={UriType.class}, order=12, min=0, max=1) @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) protected UriType url; @@ -809,20 +809,20 @@ public class Device extends DomainResource { return ResourceType.Device; } + @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, regulatory agencies and others", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" ) public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" ) public static final String SP_MODEL = "model"; - @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference" ) public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) - public static final String SP_MANUFACTURER = "manufacturer"; @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, regulatory agencies and others", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) + public static final String SP_MANUFACTURER = "manufacturer"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java index bf6dad3f6fb..3b9c740fe3f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -416,28 +416,28 @@ public class DeviceComponent extends DomainResource { /** * Describes the specific component type as defined in the object-oriented or metric nomenclature partition. */ - @Child(name="type", type={CodeableConcept.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) @Description(shortDefinition="What kind of component it is", formalDefinition="Describes the specific component type as defined in the object-oriented or metric nomenclature partition." ) protected CodeableConcept type; /** * Describes the local assigned unique identification by the software. For example: handle ID. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=1, max=1) + @Child(name="identifier", type={Identifier.class}, order=1, min=1, max=1) @Description(shortDefinition="Instance id assigned by the software stack", formalDefinition="Describes the local assigned unique identification by the software. For example: handle ID." ) protected Identifier identifier; /** * Describes the timestamp for the most recent system change which includes device configuration or setting change. */ - @Child(name="lastSystemChange", type={InstantType.class}, order=1, min=1, max=1) + @Child(name="lastSystemChange", type={InstantType.class}, order=2, min=1, max=1) @Description(shortDefinition="Recent system change timestamp", formalDefinition="Describes the timestamp for the most recent system change which includes device configuration or setting change." ) protected InstantType lastSystemChange; /** * Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc. */ - @Child(name="source", type={Device.class}, order=2, min=0, max=1) + @Child(name="source", type={Device.class}, order=3, min=0, max=1) @Description(shortDefinition="A source device of this component", formalDefinition="Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc." ) protected Reference source; @@ -449,7 +449,7 @@ public class DeviceComponent extends DomainResource { /** * Describes the link to the parent resource. For example: Channel is linked to its VMD parent. */ - @Child(name="parent", type={DeviceComponent.class}, order=3, min=0, max=1) + @Child(name="parent", type={DeviceComponent.class}, order=4, min=0, max=1) @Description(shortDefinition="Parent resource link", formalDefinition="Describes the link to the parent resource. For example: Channel is linked to its VMD parent." ) protected Reference parent; @@ -461,35 +461,35 @@ public class DeviceComponent extends DomainResource { /** * Indicates current operational status of the device. For example: On, Off, Standby, etc. */ - @Child(name="operationalStatus", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="operationalStatus", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Component operational status", formalDefinition="Indicates current operational status of the device. For example: On, Off, Standby, etc." ) protected List operationalStatus; /** * Describes the parameter group supported by the current device component that is based on some nomenclature, e.g., cardiovascular. */ - @Child(name="parameterGroup", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name="parameterGroup", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="Current supported parameter group", formalDefinition="Describes the parameter group supported by the current device component that is based on some nomenclature, e.g., cardiovascular." ) protected CodeableConcept parameterGroup; /** * Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. */ - @Child(name="measurementPrinciple", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="measurementPrinciple", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="other | chemical | electrical | impedance | nuclear | optical | thermal | biological | mechanical | acoustical | manual+", formalDefinition="Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) protected Enumeration measurementPrinciple; /** * Describes the production specification such as component revision, serial number, etc. */ - @Child(name="productionSpecification", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="productionSpecification", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Production specification of the component", formalDefinition="Describes the production specification such as component revision, serial number, etc." ) protected List productionSpecification; /** * Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US. */ - @Child(name="languageCode", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name="languageCode", type={CodeableConcept.class}, order=9, min=0, max=1) @Description(shortDefinition="Language code for the human-readable text strings produced by the device", formalDefinition="Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US." ) protected CodeableConcept languageCode; @@ -925,10 +925,10 @@ public class DeviceComponent extends DomainResource { return ResourceType.DeviceComponent; } - @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference" ) - public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference" ) public static final String SP_PARENT = "parent"; + @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference" ) + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java index 040a6fefb9f..e85ecdc128a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -655,7 +655,7 @@ public class DeviceMetric extends Resource { /** * Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. */ - @Child(name="type", type={CodeableConcept.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) @Description(shortDefinition="Type of metric", formalDefinition="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." ) protected CodeableConcept type; @@ -663,21 +663,21 @@ public class DeviceMetric extends Resource { * Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=1, max=1) + @Child(name="identifier", type={Identifier.class}, order=1, min=1, max=1) @Description(shortDefinition="Unique identifier of this DeviceMetric", formalDefinition="Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. \nIt should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device." ) protected Identifier identifier; /** * Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc. */ - @Child(name="unit", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name="unit", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="Unit of metric", formalDefinition="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." ) protected CodeableConcept unit; /** * Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc. */ - @Child(name="source", type={Device.class}, order=2, min=0, max=1) + @Child(name="source", type={Device.class}, order=3, min=0, max=1) @Description(shortDefinition="Describes the link to the source Device", formalDefinition="Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc." ) protected Reference source; @@ -690,7 +690,7 @@ It should be noted that in order to make the identifier unique, the system eleme * Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location. */ - @Child(name="parent", type={DeviceComponent.class}, order=3, min=0, max=1) + @Child(name="parent", type={DeviceComponent.class}, order=4, min=0, max=1) @Description(shortDefinition="Describes the link to the parent DeviceComponent", formalDefinition="Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device.\nAn example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location." ) protected Reference parent; @@ -703,28 +703,28 @@ An example would be a DeviceComponent that represents a Channel. This reference /** * Indicates current operational state of the device. For example: On, Off, Standby, etc. */ - @Child(name="operationalState", type={CodeType.class}, order=4, min=0, max=1) + @Child(name="operationalState", type={CodeType.class}, order=5, min=0, max=1) @Description(shortDefinition="on | off | standby", formalDefinition="Indicates current operational state of the device. For example: On, Off, Standby, etc." ) protected Enumeration operationalState; /** * Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. */ - @Child(name="measurementMode", type={Identifier.class}, order=5, min=0, max=1) + @Child(name="measurementMode", type={Identifier.class}, order=6, min=0, max=1) @Description(shortDefinition="Describes the physical principle of the measurement", formalDefinition="Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) protected Identifier measurementMode; /** * Describes the typical color of the representation of observations that have been generated for this DeviceMetric. */ - @Child(name="color", type={Identifier.class}, order=6, min=0, max=1) + @Child(name="color", type={Identifier.class}, order=7, min=0, max=1) @Description(shortDefinition="Describes the typical color of representation", formalDefinition="Describes the typical color of the representation of observations that have been generated for this DeviceMetric." ) protected Identifier color; /** * Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation. */ - @Child(name="category", type={CodeType.class}, order=7, min=1, max=1) + @Child(name="category", type={CodeType.class}, order=8, min=1, max=1) @Description(shortDefinition="measurement | setting | calculation | unspecified", formalDefinition="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." ) protected Enumeration category; @@ -733,14 +733,14 @@ An example would be a DeviceComponent that represents a Channel. This reference necessarily the same as the update period. */ - @Child(name="measurementPeriod", type={Timing.class}, order=8, min=0, max=1) + @Child(name="measurementPeriod", type={Timing.class}, order=9, min=0, max=1) @Description(shortDefinition="Describes the measurement repetition time", formalDefinition="Describes the measurement repetition time. This is not\nnecessarily the same as the update\nperiod." ) protected Timing measurementPeriod; /** * Describes the calibrations that have been performed or that are required to be performed. */ - @Child(name="calibrationInfo", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="calibrationInfo", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Describes the calibrations that have been performed or that are required to be performed", formalDefinition="Describes the calibrations that have been performed or that are required to be performed." ) protected List calibrationInfo; @@ -1201,16 +1201,16 @@ period.) return ResourceType.DeviceMetric; } - @SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference" ) - public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="parent", path="DeviceMetric.parent", description="The parent DeviceMetric resource", type="reference" ) public static final String SP_PARENT = "parent"; - @SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" ) + public static final String SP_CATEGORY = "category"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java index 1f0687a1758..f5a16a29c74 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -332,21 +332,21 @@ public class DeviceUseRequest extends DomainResource { /** * Body site where the device is to be used. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="bodySite", type={CodeableConcept.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Target body site", formalDefinition="Body site where the device is to be used." ) protected List bodySite; /** * The status of the request. */ - @Child(name="status", type={CodeType.class}, order=0, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the request." ) protected Enumeration status; /** * The details of the device to be used. */ - @Child(name="device", type={Device.class}, order=1, min=1, max=1) + @Child(name="device", type={Device.class}, order=2, min=1, max=1) @Description(shortDefinition="Device requested", formalDefinition="The details of the device to be used." ) protected Reference device; @@ -358,7 +358,7 @@ public class DeviceUseRequest extends DomainResource { /** * An encounter that provides additional context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) @Description(shortDefinition="Encounter motivating request", formalDefinition="An encounter that provides additional context in which this request is made." ) protected Reference encounter; @@ -370,49 +370,49 @@ public class DeviceUseRequest extends DomainResource { /** * Identifiers assigned to this order by the orderer or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Request identifier", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) protected List identifier; /** * Reason or justification for the use of this device. */ - @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="indication", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason for request", formalDefinition="Reason or justification for the use of this device." ) protected List indication; /** * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. */ - @Child(name="notes", type={StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notes", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Notes or comments", formalDefinition="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) protected List notes; /** * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%. */ - @Child(name="prnReason", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="prnReason", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="PRN", formalDefinition="The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%." ) protected List prnReason; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=7, min=0, max=1) + @Child(name="orderedOn", type={DateTimeType.class}, order=8, min=0, max=1) @Description(shortDefinition="When ordered", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The time at which the request was made/recorded. */ - @Child(name="recordedOn", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="recordedOn", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="When recorded", formalDefinition="The time at which the request was made/recorded." ) protected DateTimeType recordedOn; /** * The patient who will use the device. */ - @Child(name="subject", type={Patient.class}, order=9, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=10, min=1, max=1) @Description(shortDefinition="Focus of request", formalDefinition="The patient who will use the device." ) protected Reference subject; @@ -424,14 +424,14 @@ public class DeviceUseRequest extends DomainResource { /** * The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". */ - @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=10, min=0, max=1) + @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=11, min=0, max=1) @Description(shortDefinition="Schedule for use", formalDefinition="The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'." ) protected Type timing; /** * Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. */ - @Child(name="priority", type={CodeType.class}, order=11, min=0, max=1) + @Child(name="priority", type={CodeType.class}, order=12, min=0, max=1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine." ) protected Enumeration priority; @@ -1094,10 +1094,10 @@ public class DeviceUseRequest extends DomainResource { return ResourceType.DeviceUseRequest; } - @SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java index d907cccc79a..1a9b2bb2469 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,21 +48,21 @@ public class DeviceUseStatement extends DomainResource { /** * Body site where the device was used. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="bodySite", type={CodeableConcept.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Body site where the device was used." ) protected List bodySite; /** * The time period over which the device was used. */ - @Child(name="whenUsed", type={Period.class}, order=0, min=0, max=1) + @Child(name="whenUsed", type={Period.class}, order=1, min=0, max=1) @Description(shortDefinition="", formalDefinition="The time period over which the device was used." ) protected Period whenUsed; /** * The details of the device used. */ - @Child(name="device", type={Device.class}, order=1, min=1, max=1) + @Child(name="device", type={Device.class}, order=2, min=1, max=1) @Description(shortDefinition="", formalDefinition="The details of the device used." ) protected Reference device; @@ -74,35 +74,35 @@ public class DeviceUseStatement extends DomainResource { /** * An external identifier for this statement such as an IRI. */ - @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="An external identifier for this statement such as an IRI." ) protected List identifier; /** * Reason or justification for the use of the device. */ - @Child(name="indication", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Reason or justification for the use of the device." ) protected List indication; /** * Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. */ - @Child(name="notes", type={StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notes", type={StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) protected List notes; /** * The time at which the statement was made/recorded. */ - @Child(name="recordedOn", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="recordedOn", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="", formalDefinition="The time at which the statement was made/recorded." ) protected DateTimeType recordedOn; /** * The patient who used the device. */ - @Child(name="subject", type={Patient.class}, order=6, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=7, min=1, max=1) @Description(shortDefinition="", formalDefinition="The patient who used the device." ) protected Reference subject; @@ -114,7 +114,7 @@ public class DeviceUseStatement extends DomainResource { /** * How often the device was used. */ - @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=7, min=0, max=1) + @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=8, min=0, max=1) @Description(shortDefinition="", formalDefinition="How often the device was used." ) protected Type timing; @@ -564,10 +564,10 @@ public class DeviceUseStatement extends DomainResource { return ResourceType.DeviceUseStatement; } - @SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java index be7431273fa..5fcc1ceb900 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -40,12 +40,20 @@ import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; /** - * A request for a diagnostic investigation service to be performed. + * A record of a request for a diagnostic investigation service to be performed. */ @ResourceDef(name="DiagnosticOrder", profile="http://hl7.org/fhir/Profile/DiagnosticOrder") public class DiagnosticOrder extends DomainResource { public enum DiagnosticOrderStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request has been planned. + */ + PLANNED, /** * The request has been placed. */ @@ -89,6 +97,10 @@ public class DiagnosticOrder extends DomainResource { public static DiagnosticOrderStatus fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; if ("requested".equals(codeString)) return REQUESTED; if ("received".equals(codeString)) @@ -111,6 +123,8 @@ public class DiagnosticOrder extends DomainResource { } public String toCode() { switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; case REQUESTED: return "requested"; case RECEIVED: return "received"; case ACCEPTED: return "accepted"; @@ -125,6 +139,8 @@ public class DiagnosticOrder extends DomainResource { } public String getSystem() { switch (this) { + case PROPOSED: return ""; + case PLANNED: return ""; case REQUESTED: return ""; case RECEIVED: return ""; case ACCEPTED: return ""; @@ -139,6 +155,8 @@ public class DiagnosticOrder extends DomainResource { } public String getDefinition() { switch (this) { + case PROPOSED: return "The request has been proposed."; + case PLANNED: return "The request has been planned."; case REQUESTED: return "The request has been placed."; case RECEIVED: return "The receiving system has received the order, but not yet decided whether it will be performed."; case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced."; @@ -153,6 +171,8 @@ public class DiagnosticOrder extends DomainResource { } public String getDisplay() { switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; case REQUESTED: return "requested"; case RECEIVED: return "received"; case ACCEPTED: return "accepted"; @@ -172,6 +192,10 @@ public class DiagnosticOrder extends DomainResource { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; + if ("proposed".equals(codeString)) + return DiagnosticOrderStatus.PROPOSED; + if ("planned".equals(codeString)) + return DiagnosticOrderStatus.PLANNED; if ("requested".equals(codeString)) return DiagnosticOrderStatus.REQUESTED; if ("received".equals(codeString)) @@ -193,6 +217,10 @@ public class DiagnosticOrder extends DomainResource { throw new IllegalArgumentException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); } public String toCode(DiagnosticOrderStatus code) { + if (code == DiagnosticOrderStatus.PROPOSED) + return "proposed"; + if (code == DiagnosticOrderStatus.PLANNED) + return "planned"; if (code == DiagnosticOrderStatus.REQUESTED) return "requested"; if (code == DiagnosticOrderStatus.RECEIVED) @@ -321,7 +349,7 @@ public class DiagnosticOrder extends DomainResource { * The status for the event. */ @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) - @Description(shortDefinition="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status for the event." ) + @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status for the event." ) protected Enumeration status; /** @@ -593,7 +621,7 @@ public class DiagnosticOrder extends DomainResource { * The status of this individual item within the order. */ @Child(name="status", type={CodeType.class}, order=4, min=0, max=1) - @Description(shortDefinition="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of this individual item within the order." ) + @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of this individual item within the order." ) protected Enumeration status; /** @@ -865,7 +893,7 @@ public class DiagnosticOrder extends DomainResource { /** * Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). */ - @Child(name="subject", type={Patient.class, Group.class, Location.class, Device.class}, order=-1, min=1, max=1) + @Child(name="subject", type={Patient.class, Group.class, Location.class, Device.class}, order=0, min=1, max=1) @Description(shortDefinition="Who and/or what test is about", formalDefinition="Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) protected Reference subject; @@ -877,7 +905,7 @@ public class DiagnosticOrder extends DomainResource { /** * The practitioner that holds legal responsibility for ordering the investigation. */ - @Child(name="orderer", type={Practitioner.class}, order=0, min=0, max=1) + @Child(name="orderer", type={Practitioner.class}, order=1, min=0, max=1) @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) protected Reference orderer; @@ -889,14 +917,14 @@ public class DiagnosticOrder extends DomainResource { /** * Identifiers assigned to this order by the order or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order or by the receiver." ) protected List identifier; /** * An encounter that provides additional information about the healthcare context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) @Description(shortDefinition="The encounter that this diagnostic order is associated with", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) protected Reference encounter; @@ -908,15 +936,15 @@ public class DiagnosticOrder extends DomainResource { /** * An explanation or justification for why this diagnostic investigation is being requested. */ - @Child(name="clinicalNotes", type={StringType.class}, order=3, min=0, max=1) + @Child(name="clinicalNotes", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested." ) protected StringType clinicalNotes; /** * Additional clinical information about the patient or specimen that may influence test interpretations. */ - @Child(name="supportingInformation", type={Observation.class, Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Supporting observations or conditions for this request", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations." ) + @Child(name="supportingInformation", type={Observation.class, Condition.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations." ) protected List supportingInformation; /** * The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations.) @@ -927,7 +955,7 @@ public class DiagnosticOrder extends DomainResource { /** * One or more specimens that the diagnostic investigation is about. */ - @Child(name="specimen", type={Specimen.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="specimen", type={Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="If the whole order relates to specific specimens", formalDefinition="One or more specimens that the diagnostic investigation is about." ) protected List specimen; /** @@ -939,28 +967,28 @@ public class DiagnosticOrder extends DomainResource { /** * The status of the order. */ - @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) - @Description(shortDefinition="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of the order." ) + @Child(name="status", type={CodeType.class}, order=7, min=0, max=1) + @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of the order." ) protected Enumeration status; /** * The clinical priority associated with this order. */ - @Child(name="priority", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="priority", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) protected Enumeration priority; /** * A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed. */ - @Child(name="event", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="event", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed." ) protected List event; /** * The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested. */ - @Child(name="item", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The items the orderer requested", formalDefinition="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested." ) protected List item; @@ -1436,7 +1464,7 @@ public class DiagnosticOrder extends DomainResource { childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order or by the receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); childrenList.add(new Property("clinicalNotes", "string", "An explanation or justification for why this diagnostic investigation is being requested.", 0, java.lang.Integer.MAX_VALUE, clinicalNotes)); - childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition)", "Additional clinical information about the patient or specimen that may influence test interpretations.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen)); childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); @@ -1523,40 +1551,40 @@ public class DiagnosticOrder extends DomainResource { return ResourceType.DiagnosticOrder; } - @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) - public static final String SP_ORDERER = "orderer"; - @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_ITEMSTATUS = "item-status"; - @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_EVENTSTATUS = "event-status"; - @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor|DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) - public static final String SP_ACTOR = "actor"; - @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) + @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) public static final String SP_ITEMPASTSTATUS = "item-past-status"; - @SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite[x]", description="Location of requested test (if applicable)", type="token" ) - public static final String SP_BODYSITE = "bodysite"; - @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) - public static final String SP_ITEMDATE = "item-date"; - @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen|DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) - public static final String SP_SPECIMEN = "specimen"; - @SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite" ) - public static final String SP_EVENTSTATUSDATE = "event-status-date"; - @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) - public static final String SP_EVENTDATE = "event-date"; @SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite[x]", description="Location of requested test (if applicable)", type="token" ) + public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) + public static final String SP_EVENTDATE = "event-date"; + @SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite" ) + public static final String SP_EVENTSTATUSDATE = "event-status-date"; + @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor|DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) + public static final String SP_ITEMDATE = "item-date"; @SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite" ) public static final String SP_ITEMSTATUSDATE = "item-status-date"; + @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) + public static final String SP_EVENTSTATUS = "event-status"; + @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) + public static final String SP_ITEMSTATUS = "item-status"; + @SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) + public static final String SP_ORDERER = "orderer"; + @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen|DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) + public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java index 7a78e8d324b..4d694d1f338 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -370,28 +370,28 @@ public class DiagnosticReport extends DomainResource { /** * A code or name that describes this diagnostic report. */ - @Child(name="name", type={CodeableConcept.class}, order=-1, min=1, max=1) + @Child(name="name", type={CodeableConcept.class}, order=0, min=1, max=1) @Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." ) protected CodeableConcept name; /** * The status of the diagnostic report as a whole. */ - @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="registered | partial | final | corrected +", formalDefinition="The status of the diagnostic report as a whole." ) protected Enumeration status; /** * The date and/or time that this version of the report was released from the source diagnostic service. */ - @Child(name="issued", type={DateTimeType.class}, order=1, min=1, max=1) + @Child(name="issued", type={DateTimeType.class}, order=2, min=1, max=1) @Description(shortDefinition="Date this version was released", formalDefinition="The date and/or time that this version of the report was released from the source diagnostic service." ) protected DateTimeType issued; /** * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=2, min=1, max=1) + @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=3, min=1, max=1) @Description(shortDefinition="The subject of the report, usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources." ) protected Reference subject; @@ -403,7 +403,7 @@ public class DiagnosticReport extends DomainResource { /** * The diagnostic service that is responsible for issuing the report. */ - @Child(name="performer", type={Practitioner.class, Organization.class}, order=3, min=1, max=1) + @Child(name="performer", type={Practitioner.class, Organization.class}, order=4, min=1, max=1) @Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." ) protected Reference performer; @@ -415,7 +415,7 @@ public class DiagnosticReport extends DomainResource { /** * The link to the health care event (encounter) when the order was made. */ - @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=5, min=0, max=1) @Description(shortDefinition="Health care event when test ordered", formalDefinition="The link to the health care event (encounter) when the order was made." ) protected Reference encounter; @@ -427,14 +427,14 @@ public class DiagnosticReport extends DomainResource { /** * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider. */ - @Child(name="identifier", type={Identifier.class}, order=5, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=6, min=0, max=1) @Description(shortDefinition="Id for external references to this report", formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider." ) protected Identifier identifier; /** * Details concerning a test requested. */ - @Child(name="requestDetail", type={DiagnosticOrder.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="requestDetail", type={DiagnosticOrder.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="What was requested", formalDefinition="Details concerning a test requested." ) protected List requestDetail; /** @@ -446,21 +446,21 @@ public class DiagnosticReport extends DomainResource { /** * The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI. */ - @Child(name="serviceCategory", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name="serviceCategory", type={CodeableConcept.class}, order=8, min=0, max=1) @Description(shortDefinition="Biochemistry, Hematology etc.", formalDefinition="The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI." ) protected CodeableConcept serviceCategory; /** * The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself. */ - @Child(name="diagnostic", type={DateTimeType.class, Period.class}, order=8, min=1, max=1) + @Child(name="diagnostic", type={DateTimeType.class, Period.class}, order=9, min=1, max=1) @Description(shortDefinition="Physiologically Relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." ) protected Type diagnostic; /** * Details about the specimens on which this diagnostic report is based. */ - @Child(name="specimen", type={Specimen.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="specimen", type={Specimen.class}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Specimens this report is based on", formalDefinition="Details about the specimens on which this diagnostic report is based." ) protected List specimen; /** @@ -472,7 +472,7 @@ public class DiagnosticReport extends DomainResource { /** * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels"). */ - @Child(name="result", type={Observation.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="result", type={Observation.class}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Observations - simple, or complex nested groups", formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels')." ) protected List result; /** @@ -484,7 +484,7 @@ public class DiagnosticReport extends DomainResource { /** * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. */ - @Child(name="imagingStudy", type={ImagingStudy.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="imagingStudy", type={ImagingStudy.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reference to full details of imaging associated with the diagnostic report", formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images." ) protected List imagingStudy; /** @@ -496,28 +496,28 @@ public class DiagnosticReport extends DomainResource { /** * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest). */ - @Child(name="image", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="image", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Key images associated with this report", formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." ) protected List image; /** * Concise and clinically contextualized narrative interpretation of the diagnostic report. */ - @Child(name="conclusion", type={StringType.class}, order=13, min=0, max=1) + @Child(name="conclusion", type={StringType.class}, order=14, min=0, max=1) @Description(shortDefinition="Clinical Interpretation of test results", formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report." ) protected StringType conclusion; /** * Codes for the conclusion. */ - @Child(name="codedDiagnosis", type={CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="codedDiagnosis", type={CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Codes for the conclusion", formalDefinition="Codes for the conclusion." ) protected List codedDiagnosis; /** * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent. */ - @Child(name="presentedForm", type={Attachment.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="presentedForm", type={Attachment.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Entire Report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." ) protected List presentedForm; @@ -1320,36 +1320,36 @@ public class DiagnosticReport extends DomainResource { return ResourceType.DiagnosticReport; } - @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" ) - public static final String SP_RESULT = "result"; - @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) - public static final String SP_ISSUED = "issued"; - @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token" ) - public static final String SP_DIAGNOSIS = "diagnosis"; - @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="Reference to the image source", type="reference" ) - public static final String SP_IMAGE = "image"; - @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="date", path="DiagnosticReport.diagnostic[x]", description="The clinically relevant time of the report", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="Reference to the image source", type="reference" ) + public static final String SP_IMAGE = "image"; @SearchParamDefinition(name="request", path="DiagnosticReport.requestDetail", description="What was requested", type="reference" ) public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token" ) + public static final String SP_DIAGNOSIS = "diagnosis"; + @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" ) + public static final String SP_RESULT = "result"; + @SearchParamDefinition(name="service", path="DiagnosticReport.serviceCategory", description="Which diagnostic discipline/department created the report", type="token" ) + public static final String SP_SERVICE = "service"; + @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference" ) public static final String SP_SPECIMEN = "specimen"; @SearchParamDefinition(name="name", path="DiagnosticReport.name", description="The name of the report (e.g. the code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result)", type="token" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="service", path="DiagnosticReport.serviceCategory", description="Which diagnostic discipline/department created the report", type="token" ) - public static final String SP_SERVICE = "service"; - @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" ) - public static final String SP_PERFORMER = "performer"; - @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) + public static final String SP_ISSUED = "issued"; + @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Distance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Distance.java index fab94b7bb90..885bfdf69b8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Distance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Distance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java index 2f62ac3bc2e..2272212044e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -134,21 +134,21 @@ public class DocumentManifest extends DomainResource { /** * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts. */ - @Child(name="masterIdentifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="masterIdentifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Unique Identifier for the set of documents", formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." ) protected Identifier masterIdentifier; /** * Other identifiers associated with the document, including version independent, source record and workflow related identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document, including version independent, source record and workflow related identifiers." ) protected List identifier; /** * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=1, min=0, max=1) + @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1) @Description(shortDefinition="The subject of the set of documents", formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." ) protected Reference subject; @@ -160,7 +160,7 @@ public class DocumentManifest extends DomainResource { /** * A patient, practitioner, or organization for which this set of documents is intended. */ - @Child(name="recipient", type={Patient.class, Practitioner.class, Organization.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="recipient", type={Patient.class, Practitioner.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." ) protected List recipient; /** @@ -172,14 +172,14 @@ public class DocumentManifest extends DomainResource { /** * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider. */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="What kind of document set this is", formalDefinition="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider." ) protected CodeableConcept type; /** * Identifies who is responsible for adding the information to the document. */ - @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) protected List author; /** @@ -191,28 +191,28 @@ public class DocumentManifest extends DomainResource { /** * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc). */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc)." ) protected DateTimeType created; /** * Identifies the source system, application, or software that produced the document manifest. */ - @Child(name="source", type={UriType.class}, order=6, min=0, max=1) + @Child(name="source", type={UriType.class}, order=7, min=0, max=1) @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." ) protected UriType source; /** * The status of this document manifest. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) @Description(shortDefinition="current | superceded | entered-in-error", formalDefinition="The status of this document manifest." ) protected Enumeration status; /** * Whether this document manifest replaces another. */ - @Child(name="supercedes", type={DocumentManifest.class}, order=8, min=0, max=1) + @Child(name="supercedes", type={DocumentManifest.class}, order=9, min=0, max=1) @Description(shortDefinition="If this document manifest replaces another", formalDefinition="Whether this document manifest replaces another." ) protected Reference supercedes; @@ -224,21 +224,21 @@ public class DocumentManifest extends DomainResource { /** * Human-readable description of the source document. This is sometimes known as the "title". */ - @Child(name="description", type={StringType.class}, order=9, min=0, max=1) + @Child(name="description", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the 'title'." ) protected StringType description; /** * A code specifying the level of confidentiality of this set of Documents. */ - @Child(name="confidentiality", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name="confidentiality", type={CodeableConcept.class}, order=11, min=0, max=1) @Description(shortDefinition="Sensitivity of set of documents", formalDefinition="A code specifying the level of confidentiality of this set of Documents." ) protected CodeableConcept confidentiality; /** * The list of resources that describe the parts of this document reference. Usually, these would be document references, but direct references to binary attachments and images are also allowed. */ - @Child(name="content", type={DocumentReference.class, Binary.class, Media.class}, order=11, min=1, max=Child.MAX_UNLIMITED) + @Child(name="content", type={DocumentReference.class, Binary.class, Media.class}, order=12, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of resources that describe the parts of this document reference. Usually, these would be document references, but direct references to binary attachments and images are also allowed." ) protected List content; /** @@ -848,32 +848,32 @@ public class DocumentManifest extends DomainResource { return ResourceType.DocumentManifest; } - @SearchParamDefinition(name="supersedes", path="DocumentManifest.supercedes", description="If this document manifest replaces another", type="reference" ) - public static final String SP_SUPERSEDES = "supersedes"; - @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superceded | entered-in-error", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="type", path="DocumentManifest.type", description="What kind of document set this is", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" ) - public static final String SP_RECIPIENT = "recipient"; - @SearchParamDefinition(name="content", path="DocumentManifest.content", description="Contents of this set of documents", type="reference" ) - public static final String SP_CONTENT = "content"; - @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the document", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="string" ) - public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" ) - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="confidentiality", path="DocumentManifest.confidentiality", description="Sensitivity of set of documents", type="token" ) - public static final String SP_CONFIDENTIALITY = "confidentiality"; @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier|DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the document", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="confidentiality", path="DocumentManifest.confidentiality", description="Sensitivity of set of documents", type="token" ) + public static final String SP_CONFIDENTIALITY = "confidentiality"; + @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="string" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="DocumentManifest.type", description="What kind of document set this is", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="content", path="DocumentManifest.content", description="Contents of this set of documents", type="reference" ) + public static final String SP_CONTENT = "content"; + @SearchParamDefinition(name="supersedes", path="DocumentManifest.supercedes", description="If this document manifest replaces another", type="reference" ) + public static final String SP_SUPERSEDES = "supersedes"; + @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" ) + public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superceded | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java index 30bcf7e62c5..c5e1791e4b3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -552,21 +552,21 @@ public class DocumentReference extends DomainResource { /** * Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document. */ - @Child(name="masterIdentifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="masterIdentifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Master Version Specific Identifier", formalDefinition="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document." ) protected Identifier masterIdentifier; /** * Other identifiers associated with the document, including version independent, source record and workflow related identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the document", formalDefinition="Other identifiers associated with the document, including version independent, source record and workflow related identifiers." ) protected List identifier; /** * Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=1, min=0, max=1) + @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1) @Description(shortDefinition="Who|what is the subject of the document", formalDefinition="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)." ) protected Reference subject; @@ -578,28 +578,28 @@ public class DocumentReference extends DomainResource { /** * The type code specifies the precise type of document from the user perspective. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.). */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=3, min=1, max=1) @Description(shortDefinition="Precice type of document", formalDefinition="The type code specifies the precise type of document from the user perspective. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.)." ) protected CodeableConcept type; /** * The class code specifying the high-level use classification of the document type (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow). */ - @Child(name="class_", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="class_", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="High-level classification of document", formalDefinition="The class code specifying the high-level use classification of the document type (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow)." ) protected CodeableConcept class_; /** * An identifier that identifies the the document encoding, structure and template that the document conforms to beyond the base format indicated in the mimeType. */ - @Child(name="format", type={UriType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="format", type={UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Format/content rules for the document", formalDefinition="An identifier that identifies the the document encoding, structure and template that the document conforms to beyond the base format indicated in the mimeType." ) protected List format; /** * Identifies who is responsible for adding the information to the document. */ - @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=1, max=Child.MAX_UNLIMITED) + @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=6, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) protected List author; /** @@ -611,7 +611,7 @@ public class DocumentReference extends DomainResource { /** * Identifies the organization or group who is responsible for ongoing maintenance of and access to the document. */ - @Child(name="custodian", type={Organization.class}, order=6, min=0, max=1) + @Child(name="custodian", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Org which maintains the document", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." ) protected Reference custodian; @@ -623,14 +623,14 @@ public class DocumentReference extends DomainResource { /** * A reference to a domain or server that manages policies under which the document is accessed and/or made available. */ - @Child(name="policyManager", type={UriType.class}, order=7, min=0, max=1) + @Child(name="policyManager", type={UriType.class}, order=8, min=0, max=1) @Description(shortDefinition="Manages access policies for the document", formalDefinition="A reference to a domain or server that manages policies under which the document is accessed and/or made available." ) protected UriType policyManager; /** * Which person or organization authenticates that this document is valid. */ - @Child(name="authenticator", type={Practitioner.class, Organization.class}, order=8, min=0, max=1) + @Child(name="authenticator", type={Practitioner.class, Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Who/What authenticated the document", formalDefinition="Which person or organization authenticates that this document is valid." ) protected Reference authenticator; @@ -642,63 +642,63 @@ public class DocumentReference extends DomainResource { /** * When the document was created. */ - @Child(name="created", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=10, min=0, max=1) @Description(shortDefinition="Document creation time", formalDefinition="When the document was created." ) protected DateTimeType created; /** * When the document reference was created. */ - @Child(name="indexed", type={InstantType.class}, order=10, min=1, max=1) + @Child(name="indexed", type={InstantType.class}, order=11, min=1, max=1) @Description(shortDefinition="When this document reference created", formalDefinition="When the document reference was created." ) protected InstantType indexed; /** * The status of this document reference. */ - @Child(name="status", type={CodeType.class}, order=11, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=12, min=1, max=1) @Description(shortDefinition="current | superceded | entered-in-error", formalDefinition="The status of this document reference." ) protected Enumeration status; /** * The status of the underlying document. */ - @Child(name="docStatus", type={CodeableConcept.class}, order=12, min=0, max=1) + @Child(name="docStatus", type={CodeableConcept.class}, order=13, min=0, max=1) @Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The status of the underlying document." ) protected CodeableConcept docStatus; /** * Relationships that this document has with other document references that already exist. */ - @Child(name="relatesTo", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="relatesTo", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Relationships to other documents", formalDefinition="Relationships that this document has with other document references that already exist." ) protected List relatesTo; /** * Human-readable description of the source document. This is sometimes known as the "title". */ - @Child(name="description", type={StringType.class}, order=14, min=0, max=1) + @Child(name="description", type={StringType.class}, order=15, min=0, max=1) @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the 'title'." ) protected StringType description; /** * A set of Security-Tag codes specifying the level of privacy/security of the Document. */ - @Child(name="confidentiality", type={CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="confidentiality", type={CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Sensitivity of source document", formalDefinition="A set of Security-Tag codes specifying the level of privacy/security of the Document." ) protected List confidentiality; /** * The document or url to the document along with critical metadata to prove content has integrity. */ - @Child(name="content", type={Attachment.class}, order=16, min=1, max=Child.MAX_UNLIMITED) + @Child(name="content", type={Attachment.class}, order=17, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Where to access the document", formalDefinition="The document or url to the document along with critical metadata to prove content has integrity." ) protected List content; /** * The clinical context in which the document was prepared. */ - @Child(name="context", type={}, order=17, min=0, max=1) + @Child(name="context", type={}, order=18, min=0, max=1) @Description(shortDefinition="Clinical context of document", formalDefinition="The clinical context in which the document was prepared." ) protected DocumentReferenceContextComponent context; @@ -1528,50 +1528,50 @@ public class DocumentReference extends DomainResource { return ResourceType.DocumentReference; } - @SearchParamDefinition(name="location", path="DocumentReference.content.url", description="Uri where the data can be found", type="string" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" ) - public static final String SP_INDEXED = "indexed"; - @SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superceded | entered-in-error", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" ) - public static final String SP_RELATESTO = "relatesto"; - @SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" ) - public static final String SP_RELATION = "relation"; - @SearchParamDefinition(name="class", path="DocumentReference.class", description="High-level classification of document", type="token" ) - public static final String SP_CLASS = "class"; - @SearchParamDefinition(name="format", path="DocumentReference.format", description="Format/content rules for the document", type="token" ) - public static final String SP_FORMAT = "format"; + @SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier|DocumentReference.identifier", description="Master Version Specific Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date" ) public static final String SP_PERIOD = "period"; - @SearchParamDefinition(name="type", path="DocumentReference.type", description="Precice type of document", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/What authenticated the document", type="reference" ) - public static final String SP_AUTHENTICATOR = "authenticator"; - @SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite" ) - public static final String SP_RELATIONSHIP = "relationship"; - @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Org which maintains the document", type="reference" ) public static final String SP_CUSTODIAN = "custodian"; - @SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token" ) - public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" ) + public static final String SP_INDEXED = "indexed"; + @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference" ) + public static final String SP_AUTHOR = "author"; @SearchParamDefinition(name="created", path="DocumentReference.created", description="Document creation time", type="date" ) public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token" ) - public static final String SP_EVENT = "event"; @SearchParamDefinition(name="confidentiality", path="DocumentReference.confidentiality", description="Sensitivity of source document", type="token" ) public static final String SP_CONFIDENTIALITY = "confidentiality"; + @SearchParamDefinition(name="format", path="DocumentReference.format", description="Format/content rules for the document", type="token" ) + public static final String SP_FORMAT = "format"; @SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string" ) public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="language", path="DocumentReference.content.language", description="Human language of the content (BCP-47)", type="token" ) public static final String SP_LANGUAGE = "language"; - @SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier|DocumentReference.identifier", description="Master Version Specific Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="type", path="DocumentReference.type", description="Precice type of document", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" ) + public static final String SP_RELATION = "relation"; + @SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="location", path="DocumentReference.content.url", description="Uri where the data can be found", type="string" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" ) + public static final String SP_RELATESTO = "relatesto"; + @SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite" ) + public static final String SP_RELATIONSHIP = "relationship"; + @SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="class", path="DocumentReference.class", description="High-level classification of document", type="token" ) + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/What authenticated the document", type="reference" ) + public static final String SP_AUTHENTICATOR = "authenticator"; + @SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token" ) + public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superceded | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java index a42fd6c2dc2..74fa55b4636 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java @@ -29,46 +29,46 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.util.ArrayList; -import java.util.List; +import java.util.*; +import org.hl7.fhir.instance.model.annotations.ResourceDef; +import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; +import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.api.IDomainResource; /** * A resource that includes narrative, extensions, and contained resources. */ @ResourceDef(name="DomainResource", profile="http://hl7.org/fhir/Profile/DomainResource") -public abstract class DomainResource extends Resource implements IDomainResource { +public abstract class DomainResource extends Resource { /** * A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. */ - @Child(name="text", type={Narrative.class}, order=-1, min=0, max=1) + @Child(name="text", type={Narrative.class}, order=0, min=0, max=1) @Description(shortDefinition="Text summary of the resource, for human interpretation", formalDefinition="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ) protected Narrative text; /** * These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. */ - @Child(name="contained", type={Resource.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contained", type={Resource.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contained, inline Resources", formalDefinition="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ) protected List contained; /** * May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. */ - @Child(name="extension", type={Extension.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="extension", type={Extension.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) protected List extension; /** * May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. */ - @Child(name="modifierExtension", type={Extension.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="modifierExtension", type={Extension.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) protected List modifierExtension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Duration.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Duration.java index 08bfcd03eab..380a056b5d3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Duration.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Duration.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java index b429777ab3b..b6841533751 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java @@ -29,31 +29,30 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.util.ArrayList; -import java.util.List; +import java.util.*; +import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; -import org.hl7.fhir.instance.model.api.IBaseElement; -import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** * Base definition for all elements in a resource. */ -public abstract class Element extends Base implements IBaseElement { +public abstract class Element extends Base { /** * unique id for the element within a resource (for internal references). */ - @Child(name="id", type={IdType.class}, order=-1, min=0, max=1) + @Child(name="id", type={IdType.class}, order=0, min=0, max=1) @Description(shortDefinition="xml:id (or equivalent in JSON)", formalDefinition="unique id for the element within a resource (for internal references)." ) protected IdType id; /** * May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. */ - @Child(name="extension", type={Extension.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="extension", type={Extension.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) protected List extension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java index c320a24b0fe..a2aafe8766c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -38,12 +38,11 @@ import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.annotations.DatatypeDef; -import org.hl7.fhir.instance.model.api.IDatatypeElement; /** * Captures constraints on each element within the resource, profile, or extension. */ @DatatypeDef(name="ElementDefinition") -public class ElementDefinition extends Type implements ICompositeType { +public class ElementDefinition extends Type implements ICompositeType { public enum PropertyRepresentation { /** @@ -434,7 +433,7 @@ public class ElementDefinition extends Type implements ICompositeType { } @Block - public static class ElementDefinitionSlicingComponent extends Element implements IDatatypeElement { + public static class ElementDefinitionSlicingComponent extends BackboneElement { /** * 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. */ @@ -717,9 +716,9 @@ public class ElementDefinition extends Type implements ICompositeType { } } - + @Block - public static class TypeRefComponent extends Element implements IDatatypeElement { + public static class TypeRefComponent extends BackboneElement { /** * Name of Data type or Resource that is a(or the) type used for this element. */ @@ -950,7 +949,7 @@ public class ElementDefinition extends Type implements ICompositeType { } @Block - public static class ElementDefinitionConstraintComponent extends Element implements IDatatypeElement { + public static class ElementDefinitionConstraintComponent extends BackboneElement { /** * Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. */ @@ -1280,7 +1279,7 @@ public class ElementDefinition extends Type implements ICompositeType { } @Block - public static class ElementDefinitionBindingComponent extends Element implements IDatatypeElement { + public static class ElementDefinitionBindingComponent extends BackboneElement { /** * A descriptive name for this - can be useful for generating implementation artifacts. */ @@ -1604,7 +1603,7 @@ public class ElementDefinition extends Type implements ICompositeType { } @Block - public static class ElementDefinitionMappingComponent extends Element implements IDatatypeElement { + public static class ElementDefinitionMappingComponent extends BackboneElement { /** * An internal reference to the definition of a mapping. */ @@ -1765,182 +1764,182 @@ public class ElementDefinition extends Type implements ICompositeType { /** * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */ - @Child(name="path", type={StringType.class}, order=-1, min=1, max=1) + @Child(name="path", type={StringType.class}, order=0, min=1, max=1) @Description(shortDefinition="The path of the element (see the Detailed Descriptions)", formalDefinition="The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension." ) protected StringType path; /** * Codes that define how this element is represented in instances, when the deviation varies from the normal case. */ - @Child(name="representation", type={CodeType.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="representation", type={CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="How this element is represented in instances", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) protected List> representation; /** * The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name="name", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Name for this particular element definition (reference target)", formalDefinition="The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element." ) protected StringType name; /** * Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set). */ - @Child(name="slicing", type={}, order=2, min=0, max=1) + @Child(name="slicing", type={}, order=3, min=0, max=1) @Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." ) protected ElementDefinitionSlicingComponent slicing; /** * A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification). */ - @Child(name="short_", type={StringType.class}, order=3, min=0, max=1) + @Child(name="short_", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Concise definition for xml presentation", formalDefinition="A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification)." ) protected StringType short_; /** * The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. */ - @Child(name="formal", type={StringType.class}, order=4, min=0, max=1) + @Child(name="formal", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Full formal definition in human language", formalDefinition="The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource." ) protected StringType formal; /** * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc. */ - @Child(name="comments", type={StringType.class}, order=5, min=0, max=1) + @Child(name="comments", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Comments about the use of this element", formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc." ) protected StringType comments; /** * Explains why this element is needed and why it's been constrained as it has. */ - @Child(name="requirements", type={StringType.class}, order=6, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this element is needed and why it's been constrained as it has." ) protected StringType requirements; /** * Identifies additional names by which this element might also be known. */ - @Child(name="synonym", type={StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="synonym", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) protected List synonym; /** * The minimum number of times this element SHALL appear in the instance. */ - @Child(name="min", type={IntegerType.class}, order=8, min=0, max=1) + @Child(name="min", type={IntegerType.class}, order=9, min=0, max=1) @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." ) protected IntegerType min; /** * The maximum number of times this element is permitted to appear in the instance. */ - @Child(name="max", type={StringType.class}, order=9, min=0, max=1) + @Child(name="max", type={StringType.class}, order=10, min=0, max=1) @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." ) protected StringType max; /** * The data type or resource that the value of this element is permitted to be. */ - @Child(name="type", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="type", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." ) protected List type; /** * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. */ - @Child(name="nameReference", type={StringType.class}, order=11, min=0, max=1) + @Child(name="nameReference", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="To another element constraint (by element.name)", formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element." ) protected StringType nameReference; /** * The value that should be used if there is no value stated in the instance. */ - @Child(name="defaultValue", type={}, order=12, min=0, max=1) + @Child(name="defaultValue", type={}, order=13, min=0, max=1) @Description(shortDefinition="Specified value it missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance." ) protected org.hl7.fhir.instance.model.Type defaultValue; /** * The Implicit meaning that is to be understood when this element is missing. */ - @Child(name="meaningWhenMissing", type={StringType.class}, order=13, min=0, max=1) + @Child(name="meaningWhenMissing", type={StringType.class}, order=14, min=0, max=1) @Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing." ) protected StringType meaningWhenMissing; /** * Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing. */ - @Child(name="fixed", type={}, order=14, min=0, max=1) + @Child(name="fixed", type={}, order=15, min=0, max=1) @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing." ) protected org.hl7.fhir.instance.model.Type fixed; /** * Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.). */ - @Child(name="pattern", type={}, order=15, min=0, max=1) + @Child(name="pattern", type={}, order=16, min=0, max=1) @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.)." ) protected org.hl7.fhir.instance.model.Type pattern; /** * An example value for this element. */ - @Child(name="example", type={}, order=16, min=0, max=1) + @Child(name="example", type={}, order=17, min=0, max=1) @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="An example value for this element." ) protected org.hl7.fhir.instance.model.Type example; /** * Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. */ - @Child(name="maxLength", type={IntegerType.class}, order=17, min=0, max=1) + @Child(name="maxLength", type={IntegerType.class}, order=18, min=0, max=1) @Description(shortDefinition="Max length for strings", formalDefinition="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element." ) protected IntegerType maxLength; /** * A reference to an invariant that may make additional statements about the cardinality or value in the instance. */ - @Child(name="condition", type={IdType.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={IdType.class}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reference to invariant about presence", formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance." ) protected List condition; /** * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance. */ - @Child(name="constraint", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name="constraint", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Condition that must evaluate to true", formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." ) protected List constraint; /** * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported. */ - @Child(name="mustSupport", type={BooleanType.class}, order=20, min=0, max=1) + @Child(name="mustSupport", type={BooleanType.class}, order=21, min=0, max=1) @Description(shortDefinition="If the element must supported", formalDefinition="If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported." ) protected BooleanType mustSupport; /** * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. */ - @Child(name="isModifier", type={BooleanType.class}, order=21, min=0, max=1) + @Child(name="isModifier", type={BooleanType.class}, order=22, min=0, max=1) @Description(shortDefinition="If this modifies the meaning of other elements", formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system." ) protected BooleanType isModifier; /** * Whether the element should be included if a client requests a search with the parameter _summary=true. */ - @Child(name="isSummary", type={BooleanType.class}, order=22, min=0, max=1) + @Child(name="isSummary", type={BooleanType.class}, order=23, min=0, max=1) @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." ) protected BooleanType isSummary; /** * Binds to a value set if this element is coded (code, Coding, CodeableConcept). */ - @Child(name="binding", type={}, order=23, min=0, max=1) + @Child(name="binding", type={}, order=24, min=0, max=1) @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)." ) protected ElementDefinitionBindingComponent binding; /** * Identifies a concept from an external specification that roughly corresponds to this element. */ - @Child(name="mapping", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mapping", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) protected List mapping; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java index 537b8d535ac..4b1bc43673d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,35 +47,35 @@ public class EligibilityRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class EligibilityRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class EligibilityRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java index 549496ca247..6de6e8c0d16 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -120,14 +120,14 @@ public class EligibilityResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={EligibilityRequest.class}, order=0, min=0, max=1) + @Child(name="request", type={EligibilityRequest.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class EligibilityResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=2, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class EligibilityResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class EligibilityResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=8, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java index c76410db1c7..d6c35cdb26b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1439,42 +1439,42 @@ public class Encounter extends DomainResource { /** * Identifier(s) by which this encounter is known. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) by which this encounter is known", formalDefinition="Identifier(s) by which this encounter is known." ) protected List identifier; /** * planned | arrived | in-progress | onleave | finished | cancelled. */ - @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="planned | arrived | in-progress | onleave | finished | cancelled", formalDefinition="planned | arrived | in-progress | onleave | finished | cancelled." ) protected Enumeration status; /** * The current status is always found in the current version of the resource. This status history permits the encounter resource to contain the status history without the needing to read through the historical versions of the resource, or even have the server store them. */ - @Child(name="statusHistory", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="statusHistory", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of Encounter statuses", formalDefinition="The current status is always found in the current version of the resource. This status history permits the encounter resource to contain the status history without the needing to read through the historical versions of the resource, or even have the server store them." ) protected List statusHistory; /** * inpatient | outpatient | ambulatory | emergency +. */ - @Child(name="class_", type={CodeType.class}, order=2, min=1, max=1) + @Child(name="class_", type={CodeType.class}, order=3, min=1, max=1) @Description(shortDefinition="inpatient | outpatient | ambulatory | emergency +", formalDefinition="inpatient | outpatient | ambulatory | emergency +." ) protected Enumeration class_; /** * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Specific type of encounter", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." ) protected List type; /** * The patient present at the encounter. */ - @Child(name="patient", type={Patient.class}, order=4, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=5, min=0, max=1) @Description(shortDefinition="The patient present at the encounter", formalDefinition="The patient present at the encounter." ) protected Reference patient; @@ -1486,7 +1486,7 @@ public class Encounter extends DomainResource { /** * Where a specific encounter should be classified as a part of a specific episode of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, or issue tracking. */ - @Child(name="episodeOfCare", type={EpisodeOfCare.class}, order=5, min=0, max=1) + @Child(name="episodeOfCare", type={EpisodeOfCare.class}, order=6, min=0, max=1) @Description(shortDefinition="An episode of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, or issue tracking." ) protected Reference episodeOfCare; @@ -1498,14 +1498,14 @@ public class Encounter extends DomainResource { /** * The main practitioner responsible for providing the service. */ - @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="participant", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The main practitioner responsible for providing the service." ) protected List participant; /** * The appointment that scheduled this encounter. */ - @Child(name="fulfills", type={Appointment.class}, order=7, min=0, max=1) + @Child(name="fulfills", type={Appointment.class}, order=8, min=0, max=1) @Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." ) protected Reference fulfills; @@ -1517,28 +1517,28 @@ public class Encounter extends DomainResource { /** * The start and end time of the encounter. */ - @Child(name="period", type={Period.class}, order=8, min=0, max=1) + @Child(name="period", type={Period.class}, order=9, min=0, max=1) @Description(shortDefinition="The start and end time of the encounter", formalDefinition="The start and end time of the encounter." ) protected Period period; /** * Quantity of time the encounter lasted. This excludes the time during leaves of absence. */ - @Child(name="length", type={Duration.class}, order=9, min=0, max=1) + @Child(name="length", type={Duration.class}, order=10, min=0, max=1) @Description(shortDefinition="Quantity of time the encounter lasted", formalDefinition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." ) protected Duration length; /** * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis. */ - @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=11, min=0, max=1) @Description(shortDefinition="Reason the encounter takes place (code)", formalDefinition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." ) protected CodeableConcept reason; /** * Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. */ - @Child(name="indication", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="indication", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason the encounter takes place (resource)", formalDefinition="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis." ) protected List indication; /** @@ -1550,28 +1550,28 @@ public class Encounter extends DomainResource { /** * Indicates the urgency of the encounter. */ - @Child(name="priority", type={CodeableConcept.class}, order=12, min=0, max=1) + @Child(name="priority", type={CodeableConcept.class}, order=13, min=0, max=1) @Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." ) protected CodeableConcept priority; /** * Details about an admission to a clinic. */ - @Child(name="hospitalization", type={}, order=13, min=0, max=1) + @Child(name="hospitalization", type={}, order=14, min=0, max=1) @Description(shortDefinition="Details about an admission to a clinic", formalDefinition="Details about an admission to a clinic." ) protected EncounterHospitalizationComponent hospitalization; /** * List of locations at which the patient has been. */ - @Child(name="location", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="location", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of locations the patient has been at", formalDefinition="List of locations at which the patient has been." ) protected List location; /** * Department or team providing care. */ - @Child(name="serviceProvider", type={Organization.class}, order=15, min=0, max=1) + @Child(name="serviceProvider", type={Organization.class}, order=16, min=0, max=1) @Description(shortDefinition="Department or team providing care", formalDefinition="Department or team providing care." ) protected Reference serviceProvider; @@ -1583,7 +1583,7 @@ public class Encounter extends DomainResource { /** * Another Encounter of which this encounter is a part of (administratively or in time). */ - @Child(name="partOf", type={Encounter.class}, order=16, min=0, max=1) + @Child(name="partOf", type={Encounter.class}, order=17, min=0, max=1) @Description(shortDefinition="Another Encounter this encounter is part of", formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." ) protected Reference partOf; @@ -2341,32 +2341,32 @@ public class Encounter extends DomainResource { return ResourceType.Encounter; } - @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) - public static final String SP_PARTICIPANTTYPE = "participant-type"; - @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="An episode of care that this encounter should be recorded against", type="reference" ) - public static final String SP_EPISODEOFCARE = "episodeofcare"; - @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) - public static final String SP_INDICATION = "indication"; - @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) - public static final String SP_LENGTH = "length"; - @SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc", type="token" ) - public static final String SP_SPECIALARRANGEMENT = "special-arrangement"; @SearchParamDefinition(name="identifier", path="Encounter.identifier", description="Identifier(s) by which this encounter is known", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="An episode of care that this encounter should be recorded against", type="reference" ) + public static final String SP_EPISODEOFCARE = "episodeofcare"; + @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) + public static final String SP_PARTICIPANTTYPE = "participant-type"; + @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) + public static final String SP_LENGTH = "length"; @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference" ) public static final String SP_PARTOF = "part-of"; + @SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date" ) public static final String SP_LOCATIONPERIOD = "location-period"; + @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) + public static final String SP_INDICATION = "indication"; + @SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc", type="token" ) + public static final String SP_SPECIALARRANGEMENT = "special-arrangement"; + @SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java index 144efdd5f61..269458a67c4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,35 +47,35 @@ public class EnrollmentRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class EnrollmentRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class EnrollmentRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class EnrollmentRequest extends DomainResource { /** * Patient Resource. */ - @Child(name="subject", type={Patient.class}, order=6, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=7, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference subject; @@ -123,7 +123,7 @@ public class EnrollmentRequest extends DomainResource { /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name="coverage", type={Coverage.class}, order=7, min=1, max=1) + @Child(name="coverage", type={Coverage.class}, order=8, min=1, max=1) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) protected Reference coverage; @@ -135,7 +135,7 @@ public class EnrollmentRequest extends DomainResource { /** * The relationship of the patient to the subscriber. */ - @Child(name="relationship", type={Coding.class}, order=8, min=1, max=1) + @Child(name="relationship", type={Coding.class}, order=9, min=1, max=1) @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) protected Coding relationship; @@ -597,12 +597,12 @@ public class EnrollmentRequest extends DomainResource { return ResourceType.EnrollmentRequest; } - @SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) - public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="identifier", path="EnrollmentRequest.identifier", description="The business identifier of the Enrollment", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java index 1663d0e8405..ee73b0d4a43 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -120,14 +120,14 @@ public class EnrollmentResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={EnrollmentRequest.class}, order=0, min=0, max=1) + @Child(name="request", type={EnrollmentRequest.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class EnrollmentResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=2, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class EnrollmentResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class EnrollmentResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=8, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java index 334385d1114..09ce86dd4f9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -494,35 +494,35 @@ public class EpisodeOfCare extends DomainResource { /** * Identifier(s) by which this EpisodeOfCare is known. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) by which this EpisodeOfCare is known", formalDefinition="Identifier(s) by which this EpisodeOfCare is known." ) protected List identifier; /** * planned | active | onhold | finished | withdrawn | other. */ - @Child(name="currentStatus", type={CodeType.class}, order=0, min=1, max=1) + @Child(name="currentStatus", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="planned | active | onhold | finished | withdrawn | other", formalDefinition="planned | active | onhold | finished | withdrawn | other." ) protected Enumeration currentStatus; /** * The status history for the EpisodeOfCare. */ - @Child(name="statusHistory", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="statusHistory", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The status history for the EpisodeOfCare", formalDefinition="The status history for the EpisodeOfCare." ) protected List statusHistory; /** * The type can be very important in processing as this could be used in determining if the episodeofcare is relevant to specific government reporting, or other types of classifications. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Specific type of EpisodeOfcare", formalDefinition="The type can be very important in processing as this could be used in determining if the episodeofcare is relevant to specific government reporting, or other types of classifications." ) protected List type; /** * The patient that this episodeofcare applies to. */ - @Child(name="patient", type={Patient.class}, order=3, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=4, min=1, max=1) @Description(shortDefinition="The patient that this episodeofcare applies to", formalDefinition="The patient that this episodeofcare applies to." ) protected Reference patient; @@ -534,7 +534,7 @@ public class EpisodeOfCare extends DomainResource { /** * The organization that has assumed the specific responsibilities for the specified duration. */ - @Child(name="managingOrganization", type={Organization.class}, order=4, min=0, max=1) + @Child(name="managingOrganization", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="The organization that has assumed the specific responsibilities for the specified duration", formalDefinition="The organization that has assumed the specific responsibilities for the specified duration." ) protected Reference managingOrganization; @@ -546,14 +546,14 @@ public class EpisodeOfCare extends DomainResource { /** * The interval during which the managing organization assumes the defined responsibility. */ - @Child(name="period", type={Period.class}, order=5, min=0, max=1) + @Child(name="period", type={Period.class}, order=6, min=0, max=1) @Description(shortDefinition="The interval during which the managing organization assumes the defined responsibility", formalDefinition="The interval during which the managing organization assumes the defined responsibility." ) protected Period period; /** * A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for. */ - @Child(name="condition", type={Condition.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Condition.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", formalDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." ) protected List condition; /** @@ -565,7 +565,7 @@ public class EpisodeOfCare extends DomainResource { /** * A Referral Request that this EpisodeOfCare manages activities within. */ - @Child(name="referralRequest", type={ReferralRequest.class}, order=7, min=0, max=1) + @Child(name="referralRequest", type={ReferralRequest.class}, order=8, min=0, max=1) @Description(shortDefinition="A Referral Request that this EpisodeOfCare manages activities within", formalDefinition="A Referral Request that this EpisodeOfCare manages activities within." ) protected Reference referralRequest; @@ -577,7 +577,7 @@ public class EpisodeOfCare extends DomainResource { /** * The practitioner that is the care manager/care co-ordinator for this patient. */ - @Child(name="careManager", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name="careManager", type={Practitioner.class}, order=9, min=0, max=1) @Description(shortDefinition="The practitioner that is the care manager/care co-ordinator for this patient", formalDefinition="The practitioner that is the care manager/care co-ordinator for this patient." ) protected Reference careManager; @@ -589,7 +589,7 @@ public class EpisodeOfCare extends DomainResource { /** * The list of practitioners that may be facilitating this episode of care for specific purposes. */ - @Child(name="careTeam", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="careTeam", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." ) protected List careTeam; @@ -1115,24 +1115,24 @@ public class EpisodeOfCare extends DomainResource { return ResourceType.EpisodeOfCare; } - @SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities for the specified duration", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="The patient that this episodeofcare applies to", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="status", path="EpisodeOfCare.currentStatus", description="planned | active | onhold | finished | withdrawn | other", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="referral", path="EpisodeOfCare.referralRequest", description="A Referral Request that this EpisodeOfCare manages activities within", type="reference" ) - public static final String SP_REFERRAL = "referral"; - @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="The practitioner that is the care manager/care co-ordinator for this patient", type="reference" ) - public static final String SP_CAREMANAGER = "care-manager"; - @SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Specific type of EpisodeOfcare", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="EpisodeOfCare.period", description="The interval during which the managing organization assumes the defined responsibility", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="EpisodeOfCare.identifier", description="Identifier(s) by which this EpisodeOfCare is known", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="referral", path="EpisodeOfCare.referralRequest", description="A Referral Request that this EpisodeOfCare manages activities within", type="reference" ) + public static final String SP_REFERRAL = "referral"; + @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="The patient that this episodeofcare applies to", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities for the specified duration", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Specific type of EpisodeOfcare", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="The practitioner that is the care manager/care co-ordinator for this patient", type="reference" ) + public static final String SP_CAREMANAGER = "care-manager"; + @SearchParamDefinition(name="status", path="EpisodeOfCare.currentStatus", description="planned | active | onhold | finished | withdrawn | other", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java index b5a4a7fb882..c7aa90e86b4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -120,14 +120,14 @@ public class ExplanationOfBenefit extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={OralHealthClaim.class}, order=0, min=0, max=1) + @Child(name="request", type={OralHealthClaim.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class ExplanationOfBenefit extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=2, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=8, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java index 11c53730418..22d10a27fc3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java @@ -29,32 +29,31 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.util.*; +import java.util.List; -import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.annotations.DatatypeDef; +import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.api.IBaseExtension; /** * Optional Extensions Element - found in all resources. */ @DatatypeDef(name="Extension") -public class Extension extends Element implements IBaseExtension { +public class Extension extends Element implements IBaseExtension { /** * Source of the definition for the extension code - a logical name or a URL. */ - @Child(name="url", type={UriType.class}, order=-1, min=1, max=1) + @Child(name="url", type={UriType.class}, order=0, min=1, max=1) @Description(shortDefinition="identifies the meaning of the extension", formalDefinition="Source of the definition for the extension code - a logical name or a URL." ) protected UriType url; /** * Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list). */ - @Child(name="value", type={}, order=0, min=0, max=1) + @Child(name="value", type={}, order=1, min=0, max=1) @Description(shortDefinition="Value of extension", formalDefinition="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)." ) protected org.hl7.fhir.instance.model.Type value; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java index 6a1940a4b7f..6834b6fa3cb 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -514,112 +514,112 @@ public class ExtensionDefinition extends DomainResource { /** * The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=-1, min=1, max=1) + @Child(name="url", type={UriType.class}, order=0, min=1, max=1) @Description(shortDefinition="Literal URL used to reference this extension", formalDefinition="The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the extension", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * A free text natural language name identifying the extension. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name="name", type={StringType.class}, order=2, min=1, max=1) @Description(shortDefinition="Descriptional name for this profile", formalDefinition="A free text natural language name identifying the extension." ) protected StringType name; /** * Defined so that applications can use this name when displaying the value of the extension to the user. */ - @Child(name="display", type={StringType.class}, order=2, min=0, max=1) + @Child(name="display", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) protected StringType display; /** * Details of the individual or organization who accepts responsibility for publishing the extension definition. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the extension definition." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the extension and its use. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name="description", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Natural language description of the extension", formalDefinition="A free text natural language description of the extension and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions. */ - @Child(name="code", type={Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="code", type={Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions." ) protected List code; /** * The status of the extension. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the extension." ) protected Enumeration status; /** * This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the extension was published. */ - @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) @Description(shortDefinition="Date for this version of the extension", formalDefinition="The date that this version of the extension was published." ) protected DateTimeType date; /** * The Scope and Usage that this extension was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=10, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="Scope and Usage this extesion is for", formalDefinition="The Scope and Usage that this extension was created to meet." ) protected StringType requirements; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mapping", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * Identifies the type of context to which the extension applies. */ - @Child(name="contextType", type={CodeType.class}, order=12, min=1, max=1) + @Child(name="contextType", type={CodeType.class}, order=13, min=1, max=1) @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name="context", type={StringType.class}, order=13, min=1, max=Child.MAX_UNLIMITED) + @Child(name="context", type={StringType.class}, order=14, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** * Definition of the elements that are defined to be in the extension. */ - @Child(name="element", type={ElementDefinition.class}, order=14, min=1, max=Child.MAX_UNLIMITED) + @Child(name="element", type={ElementDefinition.class}, order=15, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Definition of the elements in the extension", formalDefinition="Definition of the elements that are defined to be in the extension." ) protected List element; @@ -1424,24 +1424,24 @@ public class ExtensionDefinition extends DomainResource { return ResourceType.ExtensionDefinition; } - @SearchParamDefinition(name="valueset", path="ExtensionDefinition.element.binding.reference[x]", description="Source of value set", type="reference" ) - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="status", path="ExtensionDefinition.status", description="draft | active | retired", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="ExtensionDefinition.description", description="Natural language description of the extension", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="ExtensionDefinition.name", description="Descriptional name for this profile", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="code", path="ExtensionDefinition.code", description="Assist with indexing and finding", type="token" ) - public static final String SP_CODE = "code"; @SearchParamDefinition(name="date", path="ExtensionDefinition.date", description="Date for this version of the extension", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="ExtensionDefinition.identifier", description="Other identifiers for the extension", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="url", path="ExtensionDefinition.url", description="Literal URL used to reference this extension", type="token" ) - public static final String SP_URL = "url"; + @SearchParamDefinition(name="code", path="ExtensionDefinition.code", description="Assist with indexing and finding", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="valueset", path="ExtensionDefinition.element.binding.reference[x]", description="Source of value set", type="reference" ) + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name="name", path="ExtensionDefinition.name", description="Descriptional name for this profile", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ExtensionDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="ExtensionDefinition.description", description="Natural language description of the extension", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="url", path="ExtensionDefinition.url", description="Literal URL used to reference this extension", type="token" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="ExtensionDefinition.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java index b6a55c8ba18..cad11df65d8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -706,14 +706,14 @@ public class FamilyHistory extends DomainResource { /** * This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The person who this history concerns. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) protected Reference patient; @@ -725,21 +725,21 @@ public class FamilyHistory extends DomainResource { /** * The date (and possibly time) when the family history was taken. */ - @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=2, min=0, max=1) @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family history was taken." ) protected DateTimeType date; /** * Conveys information about family history not specific to individual relations. */ - @Child(name="note", type={StringType.class}, order=2, min=0, max=1) + @Child(name="note", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Additional details not covered elsewhere", formalDefinition="Conveys information about family history not specific to individual relations." ) protected StringType note; /** * The related person. Each FamilyHistory resource contains the entire family history for a single person. */ - @Child(name="relation", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="relation", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Relative described by history", formalDefinition="The related person. Each FamilyHistory resource contains the entire family history for a single person." ) protected List relation; @@ -1020,10 +1020,10 @@ public class FamilyHistory extends DomainResource { return ResourceType.FamilyHistory; } - @SearchParamDefinition(name="patient", path="FamilyHistory.patient", description="The identity of a subject to list family history items for", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="date", path="FamilyHistory.date", description="When history was captured/updated", type="date" ) public static final String SP_DATE = "date"; + @SearchParamDefinition(name="patient", path="FamilyHistory.patient", description="The identity of a subject to list family history items for", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java index c57db35c752..4fd99bba4ab 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -204,14 +204,14 @@ public class Goal extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this goal", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) @Description(shortDefinition="The patient for whom this goal is intended for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -223,28 +223,28 @@ public class Goal extends DomainResource { /** * Human-readable description of a specific desired objective of care. */ - @Child(name="description", type={StringType.class}, order=1, min=1, max=1) + @Child(name="description", type={StringType.class}, order=2, min=1, max=1) @Description(shortDefinition="What's the desired outcome?", formalDefinition="Human-readable description of a specific desired objective of care." ) protected StringType description; /** * Indicates whether the goal has been reached and is still considered relevant. */ - @Child(name="status", type={CodeType.class}, order=2, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=3, min=0, max=1) @Description(shortDefinition="proposed | planned | in-progress | achieved | sustaining | cancelled | accepted | rejected", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." ) protected Enumeration status; /** * Any comments related to the goal. */ - @Child(name="notes", type={StringType.class}, order=3, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." ) protected StringType notes; /** * The identified conditions that this goal relates to - the condition that caused it to be created, or that it is intended to address. */ - @Child(name="concern", type={Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this goal addresses", formalDefinition="The identified conditions that this goal relates to - the condition that caused it to be created, or that it is intended to address." ) protected List concern; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java index a9cb590a99d..00ab29b4521 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -380,56 +380,56 @@ public class Group extends DomainResource { /** * A unique business identifier for this group. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Unique id", formalDefinition="A unique business identifier for this group." ) protected Identifier identifier; /** * Identifies the broad classification of the kind of resources the group includes. */ - @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="person | animal | practitioner | device | medication | substance", formalDefinition="Identifies the broad classification of the kind of resources the group includes." ) protected Enumeration type; /** * If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. */ - @Child(name="actual", type={BooleanType.class}, order=1, min=1, max=1) + @Child(name="actual", type={BooleanType.class}, order=2, min=1, max=1) @Description(shortDefinition="Descriptive or actual", formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals." ) protected BooleanType actual; /** * Provides a specific type of resource the group includes. E.g. "cow", "syringe", etc. */ - @Child(name="code", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="code", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="Kind of Group members", formalDefinition="Provides a specific type of resource the group includes. E.g. 'cow', 'syringe', etc." ) protected CodeableConcept code; /** * A label assigned to the group for human identification and communication. */ - @Child(name="name", type={StringType.class}, order=3, min=0, max=1) + @Child(name="name", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Label for Group", formalDefinition="A label assigned to the group for human identification and communication." ) protected StringType name; /** * A count of the number of resource instances that are part of the group. */ - @Child(name="quantity", type={IntegerType.class}, order=4, min=0, max=1) + @Child(name="quantity", type={IntegerType.class}, order=5, min=0, max=1) @Description(shortDefinition="Number of members", formalDefinition="A count of the number of resource instances that are part of the group." ) protected IntegerType quantity; /** * Identifies the traits shared by members of the group. */ - @Child(name="characteristic", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="characteristic", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Trait of group members", formalDefinition="Identifies the traits shared by members of the group." ) protected List characteristic; /** * Identifies the resource instances that are members of the group. */ - @Child(name="member", type={Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="member", type={Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who is in group", formalDefinition="Identifies the resource instances that are members of the group." ) protected List member; /** @@ -824,24 +824,24 @@ public class Group extends DomainResource { return ResourceType.Group; } - @SearchParamDefinition(name="member", path="Group.member", description="Who is in group", type="reference" ) - public static final String SP_MEMBER = "member"; - @SearchParamDefinition(name="characteristic-value", path="", description="A composite of both characteristic and value", type="composite" ) - public static final String SP_CHARACTERISTICVALUE = "characteristic-value"; - @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="Value held by characteristic", type="token" ) - public static final String SP_VALUE = "value"; @SearchParamDefinition(name="actual", path="Group.actual", description="Descriptive or actual", type="token" ) public static final String SP_ACTUAL = "actual"; - @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" ) - public static final String SP_EXCLUDE = "exclude"; - @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" ) - public static final String SP_CHARACTERISTIC = "characteristic"; - @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="Group.identifier", description="Unique id", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="characteristic-value", path="", description="A composite of both characteristic and value", type="composite" ) + public static final String SP_CHARACTERISTICVALUE = "characteristic-value"; + @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="member", path="Group.member", description="Who is in group", type="reference" ) + public static final String SP_MEMBER = "member"; + @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" ) + public static final String SP_EXCLUDE = "exclude"; + @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="Value held by characteristic", type="token" ) + public static final String SP_VALUE = "value"; + @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" ) + public static final String SP_CHARACTERISTIC = "characteristic"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java index 5c6d03845e8..175768833c5 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -657,14 +657,14 @@ public class HealthcareService extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The location where this healthcare service may be provided. */ - @Child(name="location", type={Location.class}, order=0, min=1, max=1) + @Child(name="location", type={Location.class}, order=1, min=1, max=1) @Description(shortDefinition="The location where this healthcare service may be provided", formalDefinition="The location where this healthcare service may be provided." ) protected Reference location; @@ -676,161 +676,161 @@ public class HealthcareService extends DomainResource { /** * Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type. */ - @Child(name="serviceCategory", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name="serviceCategory", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type", formalDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type." ) protected CodeableConcept serviceCategory; /** * A specific type of service that may be delivered or performed. */ - @Child(name="serviceType", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="serviceType", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A specific type of service that may be delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." ) protected List serviceType; /** * Further description of the service as it would be presented to a consumer while searching. */ - @Child(name="serviceName", type={StringType.class}, order=3, min=0, max=1) + @Child(name="serviceName", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Further description of the service as it would be presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." ) protected StringType serviceName; /** * Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. */ - @Child(name="comment", type={StringType.class}, order=4, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName", formalDefinition="Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." ) protected StringType comment; /** * Extra details about the service that can't be placed in the other fields. */ - @Child(name="extraDetails", type={StringType.class}, order=5, min=0, max=1) + @Child(name="extraDetails", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." ) protected StringType extraDetails; /** * The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type. */ - @Child(name="freeProvisionCode", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name="freeProvisionCode", type={CodeableConcept.class}, order=7, min=0, max=1) @Description(shortDefinition="The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type", formalDefinition="The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type." ) protected CodeableConcept freeProvisionCode; /** * Does this service have specific eligibility requirements that need to be met in order to use the service. */ - @Child(name="eligibility", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name="eligibility", type={CodeableConcept.class}, order=8, min=0, max=1) @Description(shortDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service." ) protected CodeableConcept eligibility; /** * The description of service eligibility should, in general, not exceed one or two paragraphs. It should be sufficient for a prospective consumer to determine if they are likely to be eligible or not. Where eligibility requirements and conditions are complex, it may simply be noted that an eligibility assessment is required. Where eligibility is determined by an outside source, such as an Act of Parliament, this should be noted, preferably with a reference to a commonly available copy of the source document such as a web page. */ - @Child(name="eligibilityNote", type={StringType.class}, order=8, min=0, max=1) + @Child(name="eligibilityNote", type={StringType.class}, order=9, min=0, max=1) @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="The description of service eligibility should, in general, not exceed one or two paragraphs. It should be sufficient for a prospective consumer to determine if they are likely to be eligible or not. Where eligibility requirements and conditions are complex, it may simply be noted that an eligibility assessment is required. Where eligibility is determined by an outside source, such as an Act of Parliament, this should be noted, preferably with a reference to a commonly available copy of the source document such as a web page." ) protected StringType eligibilityNote; /** * Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum). */ - @Child(name="appointmentRequired", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name="appointmentRequired", type={CodeableConcept.class}, order=10, min=0, max=1) @Description(shortDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum)", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum)." ) protected CodeableConcept appointmentRequired; /** * If there is an image associated with this Service Site, its URI can be included here. */ - @Child(name="imageURI", type={UriType.class}, order=10, min=0, max=1) + @Child(name="imageURI", type={UriType.class}, order=11, min=0, max=1) @Description(shortDefinition="If there is an image associated with this Service Site, its URI can be included here", formalDefinition="If there is an image associated with this Service Site, its URI can be included here." ) protected UriType imageURI; /** * A Collection of times that the Service Site is available. */ - @Child(name="availableTime", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="availableTime", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A Collection of times that the Service Site is available", formalDefinition="A Collection of times that the Service Site is available." ) protected List availableTime; /** * Not avail times - need better description. */ - @Child(name="notAvailableTime", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notAvailableTime", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Not avail times - need better description", formalDefinition="Not avail times - need better description." ) protected List notAvailableTime; /** * A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times. */ - @Child(name="availabilityExceptions", type={StringType.class}, order=13, min=0, max=1) + @Child(name="availabilityExceptions", type={StringType.class}, order=14, min=0, max=1) @Description(shortDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times", formalDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times." ) protected StringType availabilityExceptions; /** * The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. */ - @Child(name="publicKey", type={StringType.class}, order=14, min=0, max=1) + @Child(name="publicKey", type={StringType.class}, order=15, min=0, max=1) @Description(shortDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available", formalDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available." ) protected StringType publicKey; /** * Program Names that can be used to categorize the service. */ - @Child(name="programName", type={StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="programName", type={StringType.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Program Names that can be used to categorize the service", formalDefinition="Program Names that can be used to categorize the service." ) protected List programName; /** * List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts. */ - @Child(name="contactPoint", type={ContactPoint.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contactPoint", type={ContactPoint.class}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts", formalDefinition="List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts." ) protected List contactPoint; /** * Collection of Characteristics (attributes). */ - @Child(name="characteristic", type={CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="characteristic", type={CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Collection of Characteristics (attributes)", formalDefinition="Collection of Characteristics (attributes)." ) protected List characteristic; /** * Ways that the service accepts referrals. */ - @Child(name="referralMethod", type={CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name="referralMethod", type={CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals." ) protected List referralMethod; /** * The setting where this service can be provided, such is in home, or at location in organisation. */ - @Child(name="setting", type={CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name="setting", type={CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The setting where this service can be provided, such is in home, or at location in organisation", formalDefinition="The setting where this service can be provided, such is in home, or at location in organisation." ) protected List setting; /** * Collection of Target Groups for the Service Site (The target audience that this service is for). */ - @Child(name="targetGroup", type={CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name="targetGroup", type={CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Collection of Target Groups for the Service Site (The target audience that this service is for)", formalDefinition="Collection of Target Groups for the Service Site (The target audience that this service is for)." ) protected List targetGroup; /** * Need better description. */ - @Child(name="coverageArea", type={CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverageArea", type={CodeableConcept.class}, order=22, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Need better description", formalDefinition="Need better description." ) protected List coverageArea; /** * Need better description. */ - @Child(name="catchmentArea", type={CodeableConcept.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="catchmentArea", type={CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Need better description", formalDefinition="Need better description." ) protected List catchmentArea; /** * List of the specific. */ - @Child(name="serviceCode", type={CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="serviceCode", type={CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of the specific", formalDefinition="List of the specific." ) protected List serviceCode; @@ -1917,10 +1917,10 @@ public class HealthcareService extends DomainResource { public static final String SP_SERVICECATEGORY = "servicecategory"; @SearchParamDefinition(name="servicetype", path="HealthcareService.serviceType.type", description="The type of service provided by this healthcare service", type="token" ) public static final String SP_SERVICETYPE = "servicetype"; - @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference" ) - public static final String SP_LOCATION = "location"; @SearchParamDefinition(name="name", path="HealthcareService.serviceName", description="A portion of the Healthcare service name", type="string" ) public static final String SP_NAME = "name"; + @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference" ) + public static final String SP_LOCATION = "location"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java index 53087dd7bed..53ae653b30f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A human's name with the ability to identify parts and usage. */ @DatatypeDef(name="HumanName") -public class HumanName extends Type implements ICompositeType { +public class HumanName extends Type implements ICompositeType { public enum NameUse { /** @@ -188,49 +188,49 @@ public class HumanName extends Type implements ICompositeType { /** * Identifies the purpose for this name. */ - @Child(name="use", type={CodeType.class}, order=-1, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) @Description(shortDefinition="usual | official | temp | nickname | anonymous | old | maiden", formalDefinition="Identifies the purpose for this name." ) protected Enumeration use; /** * A full text representation of the name. */ - @Child(name="text", type={StringType.class}, order=0, min=0, max=1) + @Child(name="text", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Text representation of the full name", formalDefinition="A full text representation of the name." ) protected StringType text; /** * 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. */ - @Child(name="family", type={StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="family", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Family name (often called 'Surname')", formalDefinition="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." ) protected List family; /** * Given name. */ - @Child(name="given", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="given", type={StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Given names (not always 'first'). Includes middle names", formalDefinition="Given name." ) protected List given; /** * 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. */ - @Child(name="prefix", type={StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="prefix", type={StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parts that come before the name", formalDefinition="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." ) protected List prefix; /** * 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. */ - @Child(name="suffix", type={StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="suffix", type={StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parts that come after the name", formalDefinition="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." ) protected List suffix; /** * Indicates the period of time when this name was valid for the named person. */ - @Child(name="period", type={Period.class}, order=5, min=0, max=1) + @Child(name="period", type={Period.class}, order=6, min=0, max=1) @Description(shortDefinition="Time period when name was/is in use", formalDefinition="Indicates the period of time when this name was valid for the named person." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java index 25dbc33f459..49bcfad5ba0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A technical identifier - identifies some entity uniquely and unambiguously. */ @DatatypeDef(name="Identifier") -public class Identifier extends Type implements ICompositeType { +public class Identifier extends Type implements ICompositeType { public enum IdentifierUse { /** @@ -146,42 +146,42 @@ public class Identifier extends Type implements ICompositeType { /** * The purpose of this identifier. */ - @Child(name="use", type={CodeType.class}, order=-1, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) @Description(shortDefinition="usual | official | temp | secondary (If known)", formalDefinition="The purpose of this identifier." ) protected Enumeration use; /** * A text string for the identifier that can be displayed to a human so they can recognize the identifier. */ - @Child(name="label", type={StringType.class}, order=0, min=0, max=1) + @Child(name="label", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Description of identifier", formalDefinition="A text string for the identifier that can be displayed to a human so they can recognize the identifier." ) protected StringType label; /** * Establishes the namespace in which set of possible id values is unique. */ - @Child(name="system", type={UriType.class}, order=1, min=0, max=1) + @Child(name="system", type={UriType.class}, order=2, min=0, max=1) @Description(shortDefinition="The namespace for the identifier", formalDefinition="Establishes the namespace in which set of possible id values is unique." ) protected UriType system; /** * The portion of the identifier typically displayed to the user and which is unique within the context of the system. */ - @Child(name="value", type={StringType.class}, order=2, min=0, max=1) + @Child(name="value", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system." ) protected StringType value; /** * Time period during which identifier is/was valid for use. */ - @Child(name="period", type={Period.class}, order=3, min=0, max=1) + @Child(name="period", type={Period.class}, order=4, min=0, max=1) @Description(shortDefinition="Time period when id is/was valid for use", formalDefinition="Time period during which identifier is/was valid for use." ) protected Period period; /** * Organization that issued/manages the identifier. */ - @Child(name="assigner", type={Organization.class}, order=4, min=0, max=1) + @Child(name="assigner", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="Organization that issued id (may be just text)", formalDefinition="Organization that issued/manages the identifier." ) protected Reference assigner; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java index 89d2c8063ce..32d413de0c3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -889,14 +889,14 @@ public class ImagingObjectSelection extends DomainResource { /** * Instance UID of the DICOM KOS SOP Instances represenetd in this resource. */ - @Child(name="uid", type={OidType.class}, order=-1, min=1, max=1) + @Child(name="uid", type={OidType.class}, order=0, min=1, max=1) @Description(shortDefinition="Instance UID", formalDefinition="Instance UID of the DICOM KOS SOP Instances represenetd in this resource." ) protected OidType uid; /** * A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection." ) protected Reference patient; @@ -908,21 +908,21 @@ public class ImagingObjectSelection extends DomainResource { /** * The reason for, or significance of, the selection of objects referenced in the resource. */ - @Child(name="title", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name="title", type={CodeableConcept.class}, order=2, min=1, max=1) @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) protected CodeableConcept title; /** * Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. */ - @Child(name="description", type={StringType.class}, order=2, min=0, max=1) + @Child(name="description", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) protected StringType description; /** * Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. */ - @Child(name="author", type={Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) + @Child(name="author", type={Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1) @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) protected Reference author; @@ -934,14 +934,14 @@ public class ImagingObjectSelection extends DomainResource { /** * Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource. */ - @Child(name="authoringTime", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="authoringTime", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource." ) protected DateTimeType authoringTime; /** * Study identity and locating information of the DICOM SOP instances in the selection. */ - @Child(name="study", type={}, order=5, min=1, max=Child.MAX_UNLIMITED) + @Child(name="study", type={}, order=6, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) protected List study; @@ -1305,18 +1305,18 @@ public class ImagingObjectSelection extends DomainResource { return ResourceType.ImagingObjectSelection; } + @SearchParamDefinition(name="identifier", path="ImagingObjectSelection.uid", description="UID of key DICOM object selection", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="authoring-time", path="ImagingObjectSelection.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) + public static final String SP_AUTHORINGTIME = "authoring-time"; @SearchParamDefinition(name="selected-study", path="ImagingObjectSelection.study.uid", description="Study selected in key DICOM object selection", type="token" ) public static final String SP_SELECTEDSTUDY = "selected-study"; @SearchParamDefinition(name="author", path="ImagingObjectSelection.author", description="Author of key DICOM object selection", type="reference" ) public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="title", path="ImagingObjectSelection.title", description="Title of key DICOM object selection", type="token" ) - public static final String SP_TITLE = "title"; @SearchParamDefinition(name="patient", path="ImagingObjectSelection.patient", description="Subject of key DICOM object selection", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="authoring-time", path="ImagingObjectSelection.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) - public static final String SP_AUTHORINGTIME = "authoring-time"; - @SearchParamDefinition(name="identifier", path="ImagingObjectSelection.uid", description="UID of key DICOM object selection", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="title", path="ImagingObjectSelection.title", description="Title of key DICOM object selection", type="token" ) + public static final String SP_TITLE = "title"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java index 822cbac2926..5e5725b8bb7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2511,14 +2511,14 @@ public class ImagingStudy extends DomainResource { /** * Date and Time the study started. */ - @Child(name="started", type={DateTimeType.class}, order=-1, min=0, max=1) + @Child(name="started", type={DateTimeType.class}, order=0, min=0, max=1) @Description(shortDefinition="When the study was started (0008,0020)+(0008,0030)", formalDefinition="Date and Time the study started." ) protected DateTimeType started; /** * The patient for whom the images are of. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Who the images are of", formalDefinition="The patient for whom the images are of." ) protected Reference patient; @@ -2530,28 +2530,28 @@ public class ImagingStudy extends DomainResource { /** * Formal identifier for the study. */ - @Child(name="uid", type={OidType.class}, order=1, min=1, max=1) + @Child(name="uid", type={OidType.class}, order=2, min=1, max=1) @Description(shortDefinition="Formal identifier for the study (0020,000D)", formalDefinition="Formal identifier for the study." ) protected OidType uid; /** * Accession Number. */ - @Child(name="accession", type={Identifier.class}, order=2, min=0, max=1) + @Child(name="accession", type={Identifier.class}, order=3, min=0, max=1) @Description(shortDefinition="Accession Number (0008,0050)", formalDefinition="Accession Number." ) protected Identifier accession; /** * Other identifiers for the study. */ - @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the study (0020,0010)", formalDefinition="Other identifiers for the study." ) protected List identifier; /** * A list of the diagnostic orders that resulted in this imaging study being performed. */ - @Child(name="order", type={DiagnosticOrder.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="order", type={DiagnosticOrder.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Order(s) that caused this study to be performed", formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed." ) protected List order; /** @@ -2563,14 +2563,14 @@ public class ImagingStudy extends DomainResource { /** * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). */ - @Child(name="modalityList", type={CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="modalityList", type={CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="All series.modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) protected List> modalityList; /** * The requesting/referring physician. */ - @Child(name="referrer", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name="referrer", type={Practitioner.class}, order=7, min=0, max=1) @Description(shortDefinition="Referring physician (0008,0090)", formalDefinition="The requesting/referring physician." ) protected Reference referrer; @@ -2582,49 +2582,49 @@ public class ImagingStudy extends DomainResource { /** * Availability of study (online, offline or nearline). */ - @Child(name="availability", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="availability", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) protected Enumeration availability; /** * WADO-RS URI where Study is available. */ - @Child(name="url", type={UriType.class}, order=8, min=0, max=1) + @Child(name="url", type={UriType.class}, order=9, min=0, max=1) @Description(shortDefinition="Retrieve URI (0008,1190)", formalDefinition="WADO-RS URI where Study is available." ) protected UriType url; /** * Number of Series in Study. */ - @Child(name="numberOfSeries", type={IntegerType.class}, order=9, min=1, max=1) + @Child(name="numberOfSeries", type={IntegerType.class}, order=10, min=1, max=1) @Description(shortDefinition="Number of Study Related Series (0020,1206)", formalDefinition="Number of Series in Study." ) protected IntegerType numberOfSeries; /** * Number of SOP Instances in Study. */ - @Child(name="numberOfInstances", type={IntegerType.class}, order=10, min=1, max=1) + @Child(name="numberOfInstances", type={IntegerType.class}, order=11, min=1, max=1) @Description(shortDefinition="Number of Study Related Instances (0020,1208)", formalDefinition="Number of SOP Instances in Study." ) protected IntegerType numberOfInstances; /** * Diagnoses etc provided with request. */ - @Child(name="clinicalInformation", type={StringType.class}, order=11, min=0, max=1) + @Child(name="clinicalInformation", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="Diagnoses etc with request (0040,1002)", formalDefinition="Diagnoses etc provided with request." ) protected StringType clinicalInformation; /** * Type of procedure performed. */ - @Child(name="procedure", type={Coding.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="procedure", type={Coding.class}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Type of procedure performed (0008,1032)", formalDefinition="Type of procedure performed." ) protected List procedure; /** * Who read study and interpreted the images. */ - @Child(name="interpreter", type={Practitioner.class}, order=13, min=0, max=1) + @Child(name="interpreter", type={Practitioner.class}, order=14, min=0, max=1) @Description(shortDefinition="Who interpreted images (0008,1060)", formalDefinition="Who read study and interpreted the images." ) protected Reference interpreter; @@ -2636,14 +2636,14 @@ public class ImagingStudy extends DomainResource { /** * Institution-generated description or classification of the Study (component) performed. */ - @Child(name="description", type={StringType.class}, order=14, min=0, max=1) + @Child(name="description", type={StringType.class}, order=15, min=0, max=1) @Description(shortDefinition="Institution-generated description (0008,1030)", formalDefinition="Institution-generated description or classification of the Study (component) performed." ) protected StringType description; /** * Each study has one or more series of image instances. */ - @Child(name="series", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="series", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of image instances." ) protected List series; @@ -3508,24 +3508,24 @@ public class ImagingStudy extends DomainResource { @SearchParamDefinition(name="uid", path="ImagingStudy.series.instance.uid", description="Formal identifier for this instance (0008,0018)", type="token" ) public static final String SP_UID = "uid"; - @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The series id for the image", type="token" ) - public static final String SP_SERIES = "series"; - @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="Body part examined (Map from 0018,0015)", type="token" ) - public static final String SP_BODYSITE = "bodysite"; - @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession id for the image", type="token" ) - public static final String SP_ACCESSION = "accession"; @SearchParamDefinition(name="study", path="ImagingStudy.uid", description="The study id for the image", type="token" ) public static final String SP_STUDY = "study"; - @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the image", type="token" ) - public static final String SP_MODALITY = "modality"; - @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) - public static final String SP_STARTED = "started"; @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopclass", description="DICOM class type (0008,0016)", type="token" ) public static final String SP_DICOMCLASS = "dicom-class"; + @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the image", type="token" ) + public static final String SP_MODALITY = "modality"; + @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="Body part examined (Map from 0018,0015)", type="token" ) + public static final String SP_BODYSITE = "bodysite"; @SearchParamDefinition(name="size", path="", description="The size of the image in MB - may include > or < in the value", type="number" ) public static final String SP_SIZE = "size"; + @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The series id for the image", type="token" ) + public static final String SP_SERIES = "series"; + @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) + public static final String SP_STARTED = "started"; + @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession id for the image", type="token" ) + public static final String SP_ACCESSION = "accession"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java index 88ed98fa3c0..e4482c5a6d9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -835,28 +835,28 @@ public class Immunization extends DomainResource { /** * A unique identifier assigned to this immunization record. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." ) protected List identifier; /** * Date vaccine administered or was to be administered. */ - @Child(name="date", type={DateTimeType.class}, order=0, min=1, max=1) + @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1) @Description(shortDefinition="Vaccination administration date", formalDefinition="Date vaccine administered or was to be administered." ) protected DateTimeType date; /** * Vaccine that was administered or was to be administered. */ - @Child(name="vaccineType", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name="vaccineType", type={CodeableConcept.class}, order=2, min=1, max=1) @Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." ) protected CodeableConcept vaccineType; /** * The patient who either received or did not receive the immunization. */ - @Child(name="patient", type={Patient.class}, order=2, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=3, min=1, max=1) @Description(shortDefinition="Who was immunized?", formalDefinition="The patient who either received or did not receive the immunization." ) protected Reference patient; @@ -868,21 +868,21 @@ public class Immunization extends DomainResource { /** * Indicates if the vaccination was or was not given. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=3, min=1, max=1) + @Child(name="wasNotGiven", type={BooleanType.class}, order=4, min=1, max=1) @Description(shortDefinition="Was immunization given?", formalDefinition="Indicates if the vaccination was or was not given." ) protected BooleanType wasNotGiven; /** * True if this administration was reported rather than directly administered. */ - @Child(name="reported", type={BooleanType.class}, order=4, min=1, max=1) + @Child(name="reported", type={BooleanType.class}, order=5, min=1, max=1) @Description(shortDefinition="Is this a self-reported record?", formalDefinition="True if this administration was reported rather than directly administered." ) protected BooleanType reported; /** * Clinician who administered the vaccine. */ - @Child(name="performer", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name="performer", type={Practitioner.class}, order=6, min=0, max=1) @Description(shortDefinition="Who administered vaccine?", formalDefinition="Clinician who administered the vaccine." ) protected Reference performer; @@ -894,7 +894,7 @@ public class Immunization extends DomainResource { /** * Clinician who ordered the vaccination. */ - @Child(name="requester", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name="requester", type={Practitioner.class}, order=7, min=0, max=1) @Description(shortDefinition="Who ordered vaccination?", formalDefinition="Clinician who ordered the vaccination." ) protected Reference requester; @@ -906,7 +906,7 @@ public class Immunization extends DomainResource { /** * The visit or admission or other contact between patient and health care provider the immunization was performed as part of. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." ) protected Reference encounter; @@ -918,7 +918,7 @@ public class Immunization extends DomainResource { /** * Name of vaccine manufacturer. */ - @Child(name="manufacturer", type={Organization.class}, order=8, min=0, max=1) + @Child(name="manufacturer", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." ) protected Reference manufacturer; @@ -930,7 +930,7 @@ public class Immunization extends DomainResource { /** * The service delivery location where the vaccine administration occurred. */ - @Child(name="location", type={Location.class}, order=9, min=0, max=1) + @Child(name="location", type={Location.class}, order=10, min=0, max=1) @Description(shortDefinition="Where did vaccination occur?", formalDefinition="The service delivery location where the vaccine administration occurred." ) protected Reference location; @@ -942,56 +942,56 @@ public class Immunization extends DomainResource { /** * Lot number of the vaccine product. */ - @Child(name="lotNumber", type={StringType.class}, order=10, min=0, max=1) + @Child(name="lotNumber", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the vaccine product." ) protected StringType lotNumber; /** * Date vaccine batch expires. */ - @Child(name="expirationDate", type={DateType.class}, order=11, min=0, max=1) + @Child(name="expirationDate", type={DateType.class}, order=12, min=0, max=1) @Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." ) protected DateType expirationDate; /** * Body site where vaccine was administered. */ - @Child(name="site", type={CodeableConcept.class}, order=12, min=0, max=1) + @Child(name="site", type={CodeableConcept.class}, order=13, min=0, max=1) @Description(shortDefinition="Body site vaccine was administered", formalDefinition="Body site where vaccine was administered." ) protected CodeableConcept site; /** * The path by which the vaccine product is taken into the body. */ - @Child(name="route", type={CodeableConcept.class}, order=13, min=0, max=1) + @Child(name="route", type={CodeableConcept.class}, order=14, min=0, max=1) @Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." ) protected CodeableConcept route; /** * The quantity of vaccine product that was administered. */ - @Child(name="doseQuantity", type={Quantity.class}, order=14, min=0, max=1) + @Child(name="doseQuantity", type={Quantity.class}, order=15, min=0, max=1) @Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." ) protected Quantity doseQuantity; /** * Reasons why a vaccine was or was not administered. */ - @Child(name="explanation", type={}, order=15, min=0, max=1) + @Child(name="explanation", type={}, order=16, min=0, max=1) @Description(shortDefinition="Administration / non-administration reasons", formalDefinition="Reasons why a vaccine was or was not administered." ) protected ImmunizationExplanationComponent explanation; /** * Categorical data indicating that an adverse event is associated in time to an immunization. */ - @Child(name="reaction", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reaction", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details of a reaction that follows immunization", formalDefinition="Categorical data indicating that an adverse event is associated in time to an immunization." ) protected List reaction; /** * Contains information about the protocol(s) under which the vaccine was administered. */ - @Child(name="vaccinationProtocol", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="vaccinationProtocol", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="What protocol was followed", formalDefinition="Contains information about the protocol(s) under which the vaccine was administered." ) protected List vaccinationProtocol; @@ -1828,38 +1828,38 @@ public class Immunization extends DomainResource { return ResourceType.Immunization; } - @SearchParamDefinition(name="reaction", path="Immunization.reaction.detail", description="Additional information on reaction", type="reference" ) - public static final String SP_REACTION = "reaction"; - @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference" ) - public static final String SP_REQUESTER = "requester"; - @SearchParamDefinition(name="dose-sequence", path="Immunization.vaccinationProtocol.doseSequence", description="What dose number within series?", type="number" ) - public static final String SP_DOSESEQUENCE = "dose-sequence"; - @SearchParamDefinition(name="vaccine-type", path="Immunization.vaccineType", description="Vaccine Product Type Administered", type="token" ) - public static final String SP_VACCINETYPE = "vaccine-type"; - @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="reason", path="Immunization.explanation.reason", description="Why immunization occurred", type="token" ) - public static final String SP_REASON = "reason"; - @SearchParamDefinition(name="subject", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When did reaction start?", type="date" ) - public static final String SP_REACTIONDATE = "reaction-date"; - @SearchParamDefinition(name="notgiven", path="Immunization.wasNotGiven", description="Administrations which were not given", type="token" ) - public static final String SP_NOTGIVEN = "notgiven"; @SearchParamDefinition(name="date", path="Immunization.date", description="Vaccination (non)-Administration Date", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="reason-not-given", path="Immunization.explanation.reasonNotGiven", description="Explanation of reason vaccination was not administered", type="token" ) - public static final String SP_REASONNOTGIVEN = "reason-not-given"; - @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" ) - public static final String SP_LOTNUMBER = "lot-number"; - @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference" ) - public static final String SP_MANUFACTURER = "manufacturer"; - @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference" ) - public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference" ) + public static final String SP_REQUESTER = "requester"; @SearchParamDefinition(name="identifier", path="Immunization.identifier", description="Business identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="reason", path="Immunization.explanation.reason", description="Why immunization occurred", type="token" ) + public static final String SP_REASON = "reason"; + @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="reaction", path="Immunization.reaction.detail", description="Additional information on reaction", type="reference" ) + public static final String SP_REACTION = "reaction"; + @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" ) + public static final String SP_LOTNUMBER = "lot-number"; + @SearchParamDefinition(name="subject", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="vaccine-type", path="Immunization.vaccineType", description="Vaccine Product Type Administered", type="token" ) + public static final String SP_VACCINETYPE = "vaccine-type"; + @SearchParamDefinition(name="notgiven", path="Immunization.wasNotGiven", description="Administrations which were not given", type="token" ) + public static final String SP_NOTGIVEN = "notgiven"; + @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference" ) + public static final String SP_MANUFACTURER = "manufacturer"; + @SearchParamDefinition(name="dose-sequence", path="Immunization.vaccinationProtocol.doseSequence", description="What dose number within series?", type="number" ) + public static final String SP_DOSESEQUENCE = "dose-sequence"; + @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="reason-not-given", path="Immunization.explanation.reasonNotGiven", description="Explanation of reason vaccination was not administered", type="token" ) + public static final String SP_REASONNOTGIVEN = "reason-not-given"; + @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When did reaction start?", type="date" ) + public static final String SP_REACTIONDATE = "reaction-date"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java index 51ea39083cf..670574074f7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -895,14 +895,14 @@ public class ImmunizationRecommendation extends DomainResource { /** * A unique identifier assigned to this particular recommendation record. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this particular recommendation record." ) protected List identifier; /** * The patient for whom the recommendations are for. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Who this profile is for", formalDefinition="The patient for whom the recommendations are for." ) protected Reference patient; @@ -914,7 +914,7 @@ public class ImmunizationRecommendation extends DomainResource { /** * Vaccine administration recommendations. */ - @Child(name="recommendation", type={}, order=1, min=1, max=Child.MAX_UNLIMITED) + @Child(name="recommendation", type={}, order=2, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Vaccine administration recommendations", formalDefinition="Vaccine administration recommendations." ) protected List recommendation; @@ -1092,26 +1092,26 @@ public class ImmunizationRecommendation extends DomainResource { return ResourceType.ImmunizationRecommendation; } - @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="Patient observations supporting recommendation", type="reference" ) - public static final String SP_INFORMATION = "information"; - @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Number of dose within sequence", type="token" ) - public static final String SP_DOSESEQUENCE = "dose-sequence"; - @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="Past immunizations supporting recommendation", type="reference" ) - public static final String SP_SUPPORT = "support"; - @SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineType", description="Vaccine recommendation applies to", type="token" ) - public static final String SP_VACCINETYPE = "vaccine-type"; - @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="Vaccine administration status", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" ) - public static final String SP_DOSENUMBER = "dose-number"; - @SearchParamDefinition(name="subject", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) - public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="date", path="ImmunizationRecommendation.recommendation.date", description="Date recommendation created", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="Business identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Number of dose within sequence", type="token" ) + public static final String SP_DOSESEQUENCE = "dose-sequence"; + @SearchParamDefinition(name="subject", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineType", description="Vaccine recommendation applies to", type="token" ) + public static final String SP_VACCINETYPE = "vaccine-type"; + @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" ) + public static final String SP_DOSENUMBER = "dose-number"; + @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="Patient observations supporting recommendation", type="reference" ) + public static final String SP_INFORMATION = "information"; + @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="Past immunizations supporting recommendation", type="reference" ) + public static final String SP_SUPPORT = "support"; + @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="Vaccine administration status", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java index e1f6b11f0eb..cad6c0f4a54 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java @@ -45,7 +45,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; *
  • {@link TemporalPrecisionEnum#MILLI} * */ -@DatatypeDef(name="Instant") +@DatatypeDef(name="instant") public class InstantType extends BaseDateTimeType { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java index 780fd961853..b405402f3af 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2688,35 +2688,35 @@ public class InstitutionalClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class InstitutionalClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class InstitutionalClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class InstitutionalClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=7, min=0, max=1) + @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=8, min=0, max=1) + @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class InstitutionalClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=10, min=0, max=1) + @Child(name="facility", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,14 +2797,14 @@ public class InstitutionalClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=11, min=0, max=1) + @Child(name="payee", type={}, order=12, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=12, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2816,21 +2816,21 @@ public class InstitutionalClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=15, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2842,56 +2842,56 @@ public class InstitutionalClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=18, min=0, max=1) + @Child(name="school", type={StringType.class}, order=19, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=19, min=0, max=1) + @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=20, min=0, max=1) + @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additionalMaterials", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3939,14 +3939,14 @@ public class InstitutionalClaim extends DomainResource { return ResourceType.InstitutionalClaim; } + @SearchParamDefinition(name="identifier", path="InstitutionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="use", path="InstitutionalClaim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="InstitutionalClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="InstitutionalClaim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="use", path="InstitutionalClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; - @SearchParamDefinition(name="identifier", path="InstitutionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java index fa61e6f0e6a..6b8e205ed80 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -39,11 +39,10 @@ import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; -import org.hl7.fhir.instance.model.api.IAnyResource; /** * A set of information summarized from a list of other resources. */ -@ResourceDef(name="List", profile="http://hl7.org/fhir/Profile/List_") +@ResourceDef(name="List_", profile="http://hl7.org/fhir/Profile/List_") public class List_ extends DomainResource { public enum ListMode { @@ -394,21 +393,21 @@ public class List_ extends DomainResource { /** * Identifier for the List assigned for business purposes outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR." ) protected List identifier; /** * This code defines the purpose of the list - why it was created. */ - @Child(name="code", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="code", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="What the purpose of this list is", formalDefinition="This code defines the purpose of the list - why it was created." ) protected CodeableConcept code; /** * The common subject (or patient) of the resources that are in the list, if there is one. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=1, min=0, max=1) + @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=2, min=0, max=1) @Description(shortDefinition="If all resources have the same subject", formalDefinition="The common subject (or patient) of the resources that are in the list, if there is one." ) protected Reference subject; @@ -420,7 +419,7 @@ public class List_ extends DomainResource { /** * The entity responsible for deciding what the contents of the list were. */ - @Child(name="source", type={Practitioner.class, Patient.class, Device.class}, order=2, min=0, max=1) + @Child(name="source", type={Practitioner.class, Patient.class, Device.class}, order=3, min=0, max=1) @Description(shortDefinition="Who and/or what defined the list contents", formalDefinition="The entity responsible for deciding what the contents of the list were." ) protected Reference source; @@ -432,35 +431,35 @@ public class List_ extends DomainResource { /** * The date that the list was prepared. */ - @Child(name="date", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="When the list was prepared", formalDefinition="The date that the list was prepared." ) protected DateTimeType date; /** * Whether items in the list have a meaningful order. */ - @Child(name="ordered", type={BooleanType.class}, order=4, min=0, max=1) + @Child(name="ordered", type={BooleanType.class}, order=5, min=0, max=1) @Description(shortDefinition="Whether items in the list have a meaningful order", formalDefinition="Whether items in the list have a meaningful order." ) protected BooleanType ordered; /** * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. */ - @Child(name="mode", type={CodeType.class}, order=5, min=1, max=1) + @Child(name="mode", type={CodeType.class}, order=6, min=1, max=1) @Description(shortDefinition="working | snapshot | changes", formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) protected Enumeration mode; /** * Entries in this list. */ - @Child(name="entry", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="entry", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Entries in the list", formalDefinition="Entries in this list." ) protected List entry; /** * If the list is empty, why the list is empty. */ - @Child(name="emptyReason", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name="emptyReason", type={CodeableConcept.class}, order=8, min=0, max=1) @Description(shortDefinition="Why list is empty", formalDefinition="If the list is empty, why the list is empty." ) protected CodeableConcept emptyReason; @@ -876,20 +875,20 @@ public class List_ extends DomainResource { return ResourceType.List; } + @SearchParamDefinition(name="date", path="List.date", description="When the list was prepared", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="item", path="List.entry.item", description="Actual entry", type="reference" ) + public static final String SP_ITEM = "item"; + @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="Why list is empty", type="token" ) + public static final String SP_EMPTYREASON = "empty-reason"; + @SearchParamDefinition(name="code", path="List.code", description="What the purpose of this list is", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="patient", path="List.subject", description="If all resources have the same subject", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents", type="reference" ) public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="item", path="List.entry.item", description="Actual entry", type="reference" ) - public static final String SP_ITEM = "item"; - @SearchParamDefinition(name="code", path="List.code", description="What the purpose of this list is", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="date", path="List.date", description="When the list was prepared", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="Why list is empty", type="token" ) - public static final String SP_EMPTYREASON = "empty-reason"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java index 0c4b9153253..8832fd37afa 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -426,63 +426,63 @@ public class Location extends DomainResource { /** * Unique code or number identifying the location to its users. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) protected List identifier; /** * Name of the location as used by humans. Does not need to be unique. */ - @Child(name="name", type={StringType.class}, order=0, min=0, max=1) + @Child(name="name", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) protected StringType name; /** * Description of the Location, which helps in finding or referencing the place. */ - @Child(name="description", type={StringType.class}, order=1, min=0, max=1) + @Child(name="description", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Description of the Location, which helps in finding or referencing the place", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) protected StringType description; /** * Indicates the type of function performed at the location. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="Indicates the type of function performed at the location", formalDefinition="Indicates the type of function performed at the location." ) protected CodeableConcept type; /** * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) protected List telecom; /** * Physical location. */ - @Child(name="address", type={Address.class}, order=4, min=0, max=1) + @Child(name="address", type={Address.class}, order=5, min=0, max=1) @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) protected Address address; /** * Physical form of the location, e.g. building, room, vehicle, road. */ - @Child(name="physicalType", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name="physicalType", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) protected CodeableConcept physicalType; /** * The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML). */ - @Child(name="position", type={}, order=6, min=0, max=1) + @Child(name="position", type={}, order=7, min=0, max=1) @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML)." ) protected LocationPositionComponent position; /** * The organization that is responsible for the provisioning and upkeep of the location. */ - @Child(name="managingOrganization", type={Organization.class}, order=7, min=0, max=1) + @Child(name="managingOrganization", type={Organization.class}, order=8, min=0, max=1) @Description(shortDefinition="The organization that is responsible for the provisioning and upkeep of the location", formalDefinition="The organization that is responsible for the provisioning and upkeep of the location." ) protected Reference managingOrganization; @@ -494,14 +494,14 @@ public class Location extends DomainResource { /** * active | suspended | inactive. */ - @Child(name="status", type={CodeType.class}, order=8, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=9, min=0, max=1) @Description(shortDefinition="active | suspended | inactive", formalDefinition="active | suspended | inactive." ) protected Enumeration status; /** * Another Location which this Location is physically part of. */ - @Child(name="partOf", type={Location.class}, order=9, min=0, max=1) + @Child(name="partOf", type={Location.class}, order=10, min=0, max=1) @Description(shortDefinition="Another Location which this Location is physically part of", formalDefinition="Another Location which this Location is physically part of." ) protected Reference partOf; @@ -513,7 +513,7 @@ public class Location extends DomainResource { /** * Indicates whether a resource instance represents a specific location or a class of locations. */ - @Child(name="mode", type={CodeType.class}, order=10, min=0, max=1) + @Child(name="mode", type={CodeType.class}, order=11, min=0, max=1) @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) protected Enumeration mode; @@ -1048,24 +1048,24 @@ public class Location extends DomainResource { return ResourceType.Location; } - @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="near", path="", description="The coordinates expressed as [lat],[long] (using KML, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" ) - public static final String SP_NEAR = "near"; - @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" ) - public static final String SP_PARTOF = "partof"; - @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) - public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="near-distance", path="", description="A distance quantity to limit the near search to locations within a specific distance", type="token" ) - public static final String SP_NEARDISTANCE = "near-distance"; - @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="Location.identifier", description="Unique code or number identifying the location to its users", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" ) + public static final String SP_PARTOF = "partof"; + @SearchParamDefinition(name="near-distance", path="", description="A distance quantity to limit the near search to locations within a specific distance", type="token" ) + public static final String SP_NEARDISTANCE = "near-distance"; + @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="near", path="", description="The coordinates expressed as [lat],[long] (using KML, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" ) + public static final String SP_NEAR = "near"; + @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java index b3402562b6b..ba92d15be09 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -134,35 +134,35 @@ public class Media extends DomainResource { /** * Whether the media is a photo (still image), an audio recording, or a video recording. */ - @Child(name="type", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="photo | video | audio", formalDefinition="Whether the media is a photo (still image), an audio recording, or a video recording." ) protected Enumeration type; /** * Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality. */ - @Child(name="subtype", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="subtype", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="The type of acquisition equipment/process", formalDefinition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." ) protected CodeableConcept subtype; /** * Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) for the image", formalDefinition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." ) protected List identifier; /** * The date/time when the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the start of the recording. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="When the media was taken/recorded (start)", formalDefinition="The date/time when the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the start of the recording." ) protected DateTimeType created; /** * Who/What this Media is a record of. */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order=3, min=0, max=1) + @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order=4, min=0, max=1) @Description(shortDefinition="Who/What this Media is a record of", formalDefinition="Who/What this Media is a record of." ) protected Reference subject; @@ -174,7 +174,7 @@ public class Media extends DomainResource { /** * The person who administered the collection of the image. */ - @Child(name="operator", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="operator", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="The person who generated the image", formalDefinition="The person who administered the collection of the image." ) protected Reference operator; @@ -186,49 +186,49 @@ public class Media extends DomainResource { /** * The name of the imaging view e.g Lateral or Antero-posterior (AP). */ - @Child(name="view", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name="view", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="Imaging view e.g Lateral or Antero-posterior", formalDefinition="The name of the imaging view e.g Lateral or Antero-posterior (AP)." ) protected CodeableConcept view; /** * The name of the device / manufacturer of the device that was used to make the recording. */ - @Child(name="deviceName", type={StringType.class}, order=6, min=0, max=1) + @Child(name="deviceName", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Name of the device/manufacturer", formalDefinition="The name of the device / manufacturer of the device that was used to make the recording." ) protected StringType deviceName; /** * Height of the image in pixels(photo/video). */ - @Child(name="height", type={IntegerType.class}, order=7, min=0, max=1) + @Child(name="height", type={IntegerType.class}, order=8, min=0, max=1) @Description(shortDefinition="Height of the image in pixels(photo/video)", formalDefinition="Height of the image in pixels(photo/video)." ) protected IntegerType height; /** * Width of the image in pixels (photo/video). */ - @Child(name="width", type={IntegerType.class}, order=8, min=0, max=1) + @Child(name="width", type={IntegerType.class}, order=9, min=0, max=1) @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) protected IntegerType width; /** * The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. */ - @Child(name="frames", type={IntegerType.class}, order=9, min=0, max=1) + @Child(name="frames", type={IntegerType.class}, order=10, min=0, max=1) @Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." ) protected IntegerType frames; /** * The duration of the recording in seconds - for audio and video. */ - @Child(name="duration", type={IntegerType.class}, order=10, min=0, max=1) + @Child(name="duration", type={IntegerType.class}, order=11, min=0, max=1) @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) protected IntegerType duration; /** * The actual content of the media - inline or by direct reference to the media source file. */ - @Child(name="content", type={Attachment.class}, order=11, min=1, max=1) + @Child(name="content", type={Attachment.class}, order=12, min=1, max=1) @Description(shortDefinition="Actual Media - reference or data", formalDefinition="The actual content of the media - inline or by direct reference to the media source file." ) protected Attachment content; @@ -836,20 +836,20 @@ public class Media extends DomainResource { return ResourceType.Media; } - @SearchParamDefinition(name="patient", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="identifier", path="Media.identifier", description="Identifier(s) for the image", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="view", path="Media.view", description="Imaging view e.g Lateral or Antero-posterior", type="token" ) + public static final String SP_VIEW = "view"; + @SearchParamDefinition(name="subtype", path="Media.subtype", description="The type of acquisition equipment/process", type="token" ) + public static final String SP_SUBTYPE = "subtype"; @SearchParamDefinition(name="created", path="Media.created", description="When the media was taken/recorded (start)", type="date" ) public static final String SP_CREATED = "created"; @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="subtype", path="Media.subtype", description="The type of acquisition equipment/process", type="token" ) - public static final String SP_SUBTYPE = "subtype"; - @SearchParamDefinition(name="view", path="Media.view", description="Imaging view e.g Lateral or Antero-posterior", type="token" ) - public static final String SP_VIEW = "view"; + @SearchParamDefinition(name="patient", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="type", path="Media.type", description="photo | video | audio", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="identifier", path="Media.identifier", description="Identifier(s) for the image", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="operator", path="Media.operator", description="The person who generated the image", type="reference" ) public static final String SP_OPERATOR = "operator"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java index bf3c026eafa..dc95b018adf 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -846,28 +846,28 @@ public class Medication extends DomainResource { /** * The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code. */ - @Child(name="name", type={StringType.class}, order=-1, min=0, max=1) + @Child(name="name", type={StringType.class}, order=0, min=0, max=1) @Description(shortDefinition="Common / Commercial name", formalDefinition="The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code." ) protected StringType name; /** * A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes. */ - @Child(name="code", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="code", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="Codes that identify this medication", formalDefinition="A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes." ) protected CodeableConcept code; /** * Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is). */ - @Child(name="isBrand", type={BooleanType.class}, order=1, min=0, max=1) + @Child(name="isBrand", type={BooleanType.class}, order=2, min=0, max=1) @Description(shortDefinition="True if a brand", formalDefinition="Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)." ) protected BooleanType isBrand; /** * Describes the details of the manufacturer. */ - @Child(name="manufacturer", type={Organization.class}, order=2, min=0, max=1) + @Child(name="manufacturer", type={Organization.class}, order=3, min=0, max=1) @Description(shortDefinition="Manufacturer of the item", formalDefinition="Describes the details of the manufacturer." ) protected Reference manufacturer; @@ -879,21 +879,21 @@ public class Medication extends DomainResource { /** * Medications are either a single administrable product or a package that contains one or more products. */ - @Child(name="kind", type={CodeType.class}, order=3, min=0, max=1) + @Child(name="kind", type={CodeType.class}, order=4, min=0, max=1) @Description(shortDefinition="product | package", formalDefinition="Medications are either a single administrable product or a package that contains one or more products." ) protected Enumeration kind; /** * Information that only applies to products (not packages). */ - @Child(name="product", type={}, order=4, min=0, max=1) + @Child(name="product", type={}, order=5, min=0, max=1) @Description(shortDefinition="Administrable medication details", formalDefinition="Information that only applies to products (not packages)." ) protected MedicationProductComponent product; /** * Information that only applies to packages (not products). */ - @Child(name="package_", type={}, order=5, min=0, max=1) + @Child(name="package_", type={}, order=6, min=0, max=1) @Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." ) protected MedicationPackageComponent package_; @@ -1225,20 +1225,20 @@ public class Medication extends DomainResource { return ResourceType.Medication; } - @SearchParamDefinition(name="content", path="Medication.package.content.item", description="A product in the package", type="reference" ) - public static final String SP_CONTENT = "content"; - @SearchParamDefinition(name="form", path="Medication.product.form", description="powder | tablets | carton +", type="token" ) - public static final String SP_FORM = "form"; @SearchParamDefinition(name="container", path="Medication.package.container", description="E.g. box, vial, blister-pack", type="token" ) public static final String SP_CONTAINER = "container"; - @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="Manufacturer of the item", type="reference" ) - public static final String SP_MANUFACTURER = "manufacturer"; - @SearchParamDefinition(name="name", path="Medication.name", description="Common / Commercial name", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="The product contained", type="reference" ) - public static final String SP_INGREDIENT = "ingredient"; @SearchParamDefinition(name="code", path="Medication.code", description="Codes that identify this medication", type="token" ) public static final String SP_CODE = "code"; + @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="The product contained", type="reference" ) + public static final String SP_INGREDIENT = "ingredient"; + @SearchParamDefinition(name="form", path="Medication.product.form", description="powder | tablets | carton +", type="token" ) + public static final String SP_FORM = "form"; + @SearchParamDefinition(name="name", path="Medication.name", description="Common / Commercial name", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="content", path="Medication.package.content.item", description="A product in the package", type="reference" ) + public static final String SP_CONTENT = "content"; + @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="Manufacturer of the item", type="reference" ) + public static final String SP_MANUFACTURER = "manufacturer"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java index c8c4807d47a..e60db46811e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -433,21 +433,21 @@ public class MedicationAdministration extends DomainResource { /** * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External identifier", formalDefinition="External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) protected List identifier; /** * Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way. */ - @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way." ) protected Enumeration status; /** * The person or animal to whom the medication was given. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=2, min=1, max=1) @Description(shortDefinition="Who received medication?", formalDefinition="The person or animal to whom the medication was given." ) protected Reference patient; @@ -459,7 +459,7 @@ public class MedicationAdministration extends DomainResource { /** * The individual who was responsible for giving the medication to the patient. */ - @Child(name="practitioner", type={Practitioner.class}, order=2, min=0, max=1) + @Child(name="practitioner", type={Practitioner.class}, order=3, min=0, max=1) @Description(shortDefinition="Who administered substance?", formalDefinition="The individual who was responsible for giving the medication to the patient." ) protected Reference practitioner; @@ -471,7 +471,7 @@ public class MedicationAdministration extends DomainResource { /** * The visit or admission the or other contact between patient and health care provider the medication administration was performed as part of. */ - @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission the or other contact between patient and health care provider the medication administration was performed as part of." ) protected Reference encounter; @@ -483,7 +483,7 @@ public class MedicationAdministration extends DomainResource { /** * The original request, instruction or authority to perform the administration. */ - @Child(name="prescription", type={MedicationPrescription.class}, order=4, min=0, max=1) + @Child(name="prescription", type={MedicationPrescription.class}, order=5, min=0, max=1) @Description(shortDefinition="Order administration performed against", formalDefinition="The original request, instruction or authority to perform the administration." ) protected Reference prescription; @@ -495,35 +495,35 @@ public class MedicationAdministration extends DomainResource { /** * Set this to true if the record is saying that the medication was NOT administered. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=5, min=0, max=1) + @Child(name="wasNotGiven", type={BooleanType.class}, order=6, min=0, max=1) @Description(shortDefinition="True if medication not administered", formalDefinition="Set this to true if the record is saying that the medication was NOT administered." ) protected BooleanType wasNotGiven; /** * A code indicating why the administration was not performed. */ - @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason administration not performed", formalDefinition="A code indicating why the administration was not performed." ) protected List reasonNotGiven; /** * A code indicating why the medication was given. */ - @Child(name="reasonGiven", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reasonGiven", type={CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason administration performed", formalDefinition="A code indicating why the medication was given." ) protected List reasonGiven; /** * An interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate. */ - @Child(name="effectiveTime", type={DateTimeType.class, Period.class}, order=8, min=1, max=1) + @Child(name="effectiveTime", type={DateTimeType.class, Period.class}, order=9, min=1, max=1) @Description(shortDefinition="Start and end time of administration", formalDefinition="An interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." ) protected Type effectiveTime; /** * Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=9, min=0, max=1) + @Child(name="medication", type={Medication.class}, order=10, min=0, max=1) @Description(shortDefinition="What was administered?", formalDefinition="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -535,7 +535,7 @@ public class MedicationAdministration extends DomainResource { /** * The device used in administering the medication to the patient. E.g. a particular infusion pump. */ - @Child(name="device", type={Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="device", type={Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Device used to administer", formalDefinition="The device used in administering the medication to the patient. E.g. a particular infusion pump." ) protected List device; /** @@ -547,14 +547,14 @@ public class MedicationAdministration extends DomainResource { /** * Extra information about the medication administration that is not conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=11, min=0, max=1) + @Child(name="note", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="Information about the administration", formalDefinition="Extra information about the medication administration that is not conveyed by the other attributes." ) protected StringType note; /** * Indicates how the medication is/was used by the patient. */ - @Child(name="dosage", type={}, order=12, min=0, max=1) + @Child(name="dosage", type={}, order=13, min=0, max=1) @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) protected MedicationAdministrationDosageComponent dosage; @@ -1232,24 +1232,24 @@ public class MedicationAdministration extends DomainResource { return ResourceType.MedicationAdministration; } - @SearchParamDefinition(name="medication", path="MedicationAdministration.medication", description="Return administrations of this medication", type="reference" ) - public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="identifier", path="MedicationAdministration.identifier", description="Return administrations with this external identity", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="prescription", path="MedicationAdministration.prescription", description="The identity of a prescription to list administrations from", type="reference" ) + public static final String SP_PRESCRIPTION = "prescription"; @SearchParamDefinition(name="effectivetime", path="MedicationAdministration.effectiveTime[x]", description="Date administration happened (or did not happen)", type="date" ) public static final String SP_EFFECTIVETIME = "effectivetime"; @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="MedicationAdministration.status", description="MedicationAdministration event status (for example one of active/paused/completed/nullified)", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="prescription", path="MedicationAdministration.prescription", description="The identity of a prescription to list administrations from", type="reference" ) - public static final String SP_PRESCRIPTION = "prescription"; + @SearchParamDefinition(name="medication", path="MedicationAdministration.medication", description="Return administrations of this medication", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity", type="reference" ) public static final String SP_DEVICE = "device"; @SearchParamDefinition(name="notgiven", path="MedicationAdministration.wasNotGiven", description="Administrations that were not made", type="token" ) public static final String SP_NOTGIVEN = "notgiven"; - @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="identifier", path="MedicationAdministration.identifier", description="Return administrations with this external identity", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="status", path="MedicationAdministration.status", description="MedicationAdministration event status (for example one of active/paused/completed/nullified)", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java index 656fa0d5538..5da54ba7322 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -754,21 +754,21 @@ public class MedicationDispense extends DomainResource { /** * Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="External identifier", formalDefinition="Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR." ) protected Identifier identifier; /** * A code specifying the state of the set of dispense events. */ - @Child(name="status", type={CodeType.class}, order=0, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="A code specifying the state of the set of dispense events." ) protected Enumeration status; /** * A link to a resource representing the person to whom the medication will be given. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=2, min=0, max=1) @Description(shortDefinition="Who the dispense is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) protected Reference patient; @@ -780,7 +780,7 @@ public class MedicationDispense extends DomainResource { /** * The individual responsible for dispensing the medication. */ - @Child(name="dispenser", type={Practitioner.class}, order=2, min=0, max=1) + @Child(name="dispenser", type={Practitioner.class}, order=3, min=0, max=1) @Description(shortDefinition="Practitioner responsible for dispensing medication", formalDefinition="The individual responsible for dispensing the medication." ) protected Reference dispenser; @@ -792,7 +792,7 @@ public class MedicationDispense extends DomainResource { /** * Indicates the medication order that is being dispensed against. */ - @Child(name="authorizingPrescription", type={MedicationPrescription.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="authorizingPrescription", type={MedicationPrescription.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Medication order that authorizes the dispense", formalDefinition="Indicates the medication order that is being dispensed against." ) protected List authorizingPrescription; /** @@ -804,28 +804,28 @@ public class MedicationDispense extends DomainResource { /** * Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. */ - @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=5, min=0, max=1) @Description(shortDefinition="Trial fill, partial fill, emergency fill, etc.", formalDefinition="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ) protected CodeableConcept type; /** * The amount of medication that has been dispensed. Includes unit of measure. */ - @Child(name="quantity", type={Quantity.class}, order=5, min=0, max=1) + @Child(name="quantity", type={Quantity.class}, order=6, min=0, max=1) @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of medication that has been dispensed. Includes unit of measure." ) protected Quantity quantity; /** * The amount of medication expressed as a timing amount. */ - @Child(name="daysSupply", type={Quantity.class}, order=6, min=0, max=1) + @Child(name="daysSupply", type={Quantity.class}, order=7, min=0, max=1) @Description(shortDefinition="Days Supply", formalDefinition="The amount of medication expressed as a timing amount." ) protected Quantity daysSupply; /** * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=7, min=0, max=1) + @Child(name="medication", type={Medication.class}, order=8, min=0, max=1) @Description(shortDefinition="What medication was supplied", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -837,21 +837,21 @@ public class MedicationDispense extends DomainResource { /** * The time when the dispensed product was packaged and reviewed. */ - @Child(name="whenPrepared", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="whenPrepared", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Dispense processing time", formalDefinition="The time when the dispensed product was packaged and reviewed." ) protected DateTimeType whenPrepared; /** * The time the dispensed product was provided to the patient or their representative. */ - @Child(name="whenHandedOver", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name="whenHandedOver", type={DateTimeType.class}, order=10, min=0, max=1) @Description(shortDefinition="Handover time", formalDefinition="The time the dispensed product was provided to the patient or their representative." ) protected DateTimeType whenHandedOver; /** * Identification of the facility/location where the medication was shipped to, as part of the dispense event. */ - @Child(name="destination", type={Location.class}, order=10, min=0, max=1) + @Child(name="destination", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Where the medication was sent", formalDefinition="Identification of the facility/location where the medication was shipped to, as part of the dispense event." ) protected Reference destination; @@ -863,7 +863,7 @@ public class MedicationDispense extends DomainResource { /** * Identifies the person who picked up the medication. This will usually be a patient or their carer, but some cases exist where it can be a healthcare professional. */ - @Child(name="receiver", type={Patient.class, Practitioner.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="receiver", type={Patient.class, Practitioner.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who collected the medication", formalDefinition="Identifies the person who picked up the medication. This will usually be a patient or their carer, but some cases exist where it can be a healthcare professional." ) protected List receiver; /** @@ -875,21 +875,21 @@ public class MedicationDispense extends DomainResource { /** * Extra information about the dispense that could not be conveyed in the other attributes. */ - @Child(name="note", type={StringType.class}, order=12, min=0, max=1) + @Child(name="note", type={StringType.class}, order=13, min=0, max=1) @Description(shortDefinition="Information about the dispense", formalDefinition="Extra information about the dispense that could not be conveyed in the other attributes." ) protected StringType note; /** * Indicates how the medication is to be used by the patient. */ - @Child(name="dosageInstruction", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dosageInstruction", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Medicine administration instructions to the patient/carer", formalDefinition="Indicates how the medication is to be used by the patient." ) protected List dosageInstruction; /** * Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen. This block explains what substitition did or did not happen and why. */ - @Child(name="substitution", type={}, order=14, min=0, max=1) + @Child(name="substitution", type={}, order=15, min=0, max=1) @Description(shortDefinition="Deals with substitution of one medicine for another", formalDefinition="Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen. This block explains what substitition did or did not happen and why." ) protected MedicationDispenseSubstitutionComponent substitution; @@ -1611,28 +1611,28 @@ public class MedicationDispense extends DomainResource { return ResourceType.MedicationDispense; } - @SearchParamDefinition(name="medication", path="MedicationDispense.medication", description="Returns dispenses of this medicine", type="reference" ) - public static final String SP_MEDICATION = "medication"; - @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="MedicationDispense.status", description="Status of the dispense", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="prescription", path="MedicationDispense.authorizingPrescription", description="The identity of a prescription to list dispenses from", type="reference" ) - public static final String SP_PRESCRIPTION = "prescription"; - @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference" ) - public static final String SP_RESPONSIBLEPARTY = "responsibleparty"; @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific indiividual", type="reference" ) public static final String SP_DISPENSER = "dispenser"; - @SearchParamDefinition(name="type", path="MedicationDispense.type", description="Return all dispenses of a specific type", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="MedicationDispense.identifier", description="Return dispenses with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="whenprepared", path="MedicationDispense.whenPrepared", description="Date when medication prepared", type="date" ) - public static final String SP_WHENPREPARED = "whenprepared"; - @SearchParamDefinition(name="whenhandedover", path="MedicationDispense.whenHandedOver", description="Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)", type="date" ) - public static final String SP_WHENHANDEDOVER = "whenhandedover"; + @SearchParamDefinition(name="prescription", path="MedicationDispense.authorizingPrescription", description="The identity of a prescription to list dispenses from", type="reference" ) + public static final String SP_PRESCRIPTION = "prescription"; + @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="destination", path="MedicationDispense.destination", description="Return dispenses that should be sent to a secific destination", type="reference" ) public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name="medication", path="MedicationDispense.medication", description="Returns dispenses of this medicine", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference" ) + public static final String SP_RESPONSIBLEPARTY = "responsibleparty"; + @SearchParamDefinition(name="type", path="MedicationDispense.type", description="Return all dispenses of a specific type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="whenhandedover", path="MedicationDispense.whenHandedOver", description="Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)", type="date" ) + public static final String SP_WHENHANDEDOVER = "whenhandedover"; + @SearchParamDefinition(name="whenprepared", path="MedicationDispense.whenPrepared", description="Date when medication prepared", type="date" ) + public static final String SP_WHENPREPARED = "whenprepared"; + @SearchParamDefinition(name="status", path="MedicationDispense.status", description="Status of the dispense", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java index dc5f534741b..9267677f5be 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1019,28 +1019,28 @@ public class MedicationPrescription extends DomainResource { /** * External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an erntire workflow process where records have to be tracked through an entire system. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External identifier", formalDefinition="External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an erntire workflow process where records have to be tracked through an entire system." ) protected List identifier; /** * The date (and perhaps time) when the prescription was written. */ - @Child(name="dateWritten", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="dateWritten", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) protected DateTimeType dateWritten; /** * A code specifying the state of the order. Generally this will be active or completed state. */ - @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="active | on-hold | completed | entered-in-error | stopped | superceded | draft", formalDefinition="A code specifying the state of the order. Generally this will be active or completed state." ) protected Enumeration status; /** * A link to a resource representing the person to whom the medication will be given. */ - @Child(name="patient", type={Patient.class}, order=2, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=3, min=0, max=1) @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) protected Reference patient; @@ -1052,7 +1052,7 @@ public class MedicationPrescription extends DomainResource { /** * The healthcare professional responsible for authorizing the prescription. */ - @Child(name="prescriber", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name="prescriber", type={Practitioner.class}, order=4, min=0, max=1) @Description(shortDefinition="Who ordered the medication(s)", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) protected Reference prescriber; @@ -1064,7 +1064,7 @@ public class MedicationPrescription extends DomainResource { /** * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. */ - @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=5, min=0, max=1) @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) protected Reference encounter; @@ -1076,21 +1076,21 @@ public class MedicationPrescription extends DomainResource { /** * Can be the reason or the indication for writing the prescription. */ - @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=5, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=6, min=0, max=1) @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) protected Type reason; /** * Extra information about the prescription that could not be conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=6, min=0, max=1) + @Child(name="note", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Information about the prescription", formalDefinition="Extra information about the prescription that could not be conveyed by the other attributes." ) protected StringType note; /** * Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=7, min=0, max=1) + @Child(name="medication", type={Medication.class}, order=8, min=0, max=1) @Description(shortDefinition="Medication to be taken", formalDefinition="Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -1102,21 +1102,21 @@ public class MedicationPrescription extends DomainResource { /** * Indicates how the medication is to be used by the patient. */ - @Child(name="dosageInstruction", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dosageInstruction", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="How medication should be taken", formalDefinition="Indicates how the medication is to be used by the patient." ) protected List dosageInstruction; /** * Deals with details of the dispense part of the order. */ - @Child(name="dispense", type={}, order=9, min=0, max=1) + @Child(name="dispense", type={}, order=10, min=0, max=1) @Description(shortDefinition="Medication supply authorization", formalDefinition="Deals with details of the dispense part of the order." ) protected MedicationPrescriptionDispenseComponent dispense; /** * Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done. */ - @Child(name="substitution", type={}, order=10, min=0, max=1) + @Child(name="substitution", type={}, order=11, min=0, max=1) @Description(shortDefinition="Any restrictions on medication substitution?", formalDefinition="Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done." ) protected MedicationPrescriptionSubstitutionComponent substitution; @@ -1679,18 +1679,18 @@ public class MedicationPrescription extends DomainResource { return ResourceType.MedicationPrescription; } - @SearchParamDefinition(name="medication", path="MedicationPrescription.medication", description="Code for medicine or text in medicine name", type="reference" ) - public static final String SP_MEDICATION = "medication"; - @SearchParamDefinition(name="datewritten", path="MedicationPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) - public static final String SP_DATEWRITTEN = "datewritten"; - @SearchParamDefinition(name="patient", path="MedicationPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="MedicationPrescription.status", description="Status of the prescription", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="encounter", path="MedicationPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="identifier", path="MedicationPrescription.identifier", description="Return prescriptions with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="MedicationPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="datewritten", path="MedicationPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) + public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name="medication", path="MedicationPrescription.medication", description="Code for medicine or text in medicine name", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="encounter", path="MedicationPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="status", path="MedicationPrescription.status", description="Status of the prescription", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java index bd0810ce2f6..d5537565ddd 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -519,14 +519,14 @@ public class MedicationStatement extends DomainResource { /** * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Identifier", formalDefinition="External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) protected List identifier; /** * The person or animal who is /was taking the medication. */ - @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) @Description(shortDefinition="Who was/is taking medication", formalDefinition="The person or animal who is /was taking the medication." ) protected Reference patient; @@ -538,7 +538,7 @@ public class MedicationStatement extends DomainResource { /** * The person who provided the information about the taking of this medication. */ - @Child(name="informationSource", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=1, min=0, max=1) + @Child(name="informationSource", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1) @Description(shortDefinition="", formalDefinition="The person who provided the information about the taking of this medication." ) protected Reference informationSource; @@ -550,56 +550,56 @@ public class MedicationStatement extends DomainResource { /** * The date when the medication statement was asserted by the information source. */ - @Child(name="dateAsserted", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="dateAsserted", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="When the statement was asserted?", formalDefinition="The date when the medication statement was asserted by the information source." ) protected DateTimeType dateAsserted; /** * A code specifying the state of the statement. Generally this will be in-progress or completed state. */ - @Child(name="status", type={CodeType.class}, order=3, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=4, min=1, max=1) @Description(shortDefinition="in-progress | completed | entered-in-error", formalDefinition="A code specifying the state of the statement. Generally this will be in-progress or completed state." ) protected Enumeration status; /** * Set this to true if the record is saying that the medication was NOT taken. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=4, min=0, max=1) + @Child(name="wasNotGiven", type={BooleanType.class}, order=5, min=0, max=1) @Description(shortDefinition="True if medication is/was not being taken", formalDefinition="Set this to true if the record is saying that the medication was NOT taken." ) protected BooleanType wasNotGiven; /** * A code indicating why the medication was not taken. */ - @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="True if asserting medication was not given", formalDefinition="A code indicating why the medication was not taken." ) protected List reasonNotGiven; /** * A reason for why the medication is being/was taken. */ - @Child(name="reasonForUse", type={CodeableConcept.class, Condition.class}, order=6, min=0, max=1) + @Child(name="reasonForUse", type={CodeableConcept.class, Condition.class}, order=7, min=0, max=1) @Description(shortDefinition="", formalDefinition="A reason for why the medication is being/was taken." ) protected Type reasonForUse; /** * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the 'wasNotGiven' attribute is true). */ - @Child(name="effective", type={DateTimeType.class, Period.class}, order=7, min=0, max=1) + @Child(name="effective", type={DateTimeType.class, Period.class}, order=8, min=0, max=1) @Description(shortDefinition="Over what period was medication consumed?", formalDefinition="The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the 'wasNotGiven' attribute is true)." ) protected Type effective; /** * Provides extra information about the medication statement that is not conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=8, min=0, max=1) + @Child(name="note", type={StringType.class}, order=9, min=0, max=1) @Description(shortDefinition="Further information about the statement", formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." ) protected StringType note; /** * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=9, min=0, max=1) + @Child(name="medication", type={Medication.class}, order=10, min=0, max=1) @Description(shortDefinition="What medication was taken?", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -611,7 +611,7 @@ public class MedicationStatement extends DomainResource { /** * Indicates how the medication is/was used by the patient. */ - @Child(name="dosage", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dosage", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) protected List dosage; @@ -1194,16 +1194,16 @@ public class MedicationStatement extends DomainResource { return ResourceType.MedicationStatement; } - @SearchParamDefinition(name="medication", path="MedicationStatement.medication", description="Code for medicine or text in medicine name", type="reference" ) - public static final String SP_MEDICATION = "medication"; - @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list administrations for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="MedicationStatement.status", description="Return statements that match the given status", type="string" ) - public static final String SP_STATUS = "status"; @SearchParamDefinition(name="identifier", path="MedicationStatement.identifier", description="Return administrations with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list administrations for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="medication", path="MedicationStatement.medication", description="Code for medicine or text in medicine name", type="reference" ) + public static final String SP_MEDICATION = "medication"; @SearchParamDefinition(name="effectivedate", path="MedicationStatement.effective[x]", description="Date when patient was taking (or not taking) the medication", type="date" ) public static final String SP_EFFECTIVEDATE = "effectivedate"; + @SearchParamDefinition(name="status", path="MedicationStatement.status", description="Return statements that match the given status", type="string" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java index 3c83f52ee61..c86c0514a9f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -887,49 +887,49 @@ public class MessageHeader extends DomainResource { /** * The identifier of this message. */ - @Child(name="identifier", type={IdType.class}, order=-1, min=1, max=1) + @Child(name="identifier", type={IdType.class}, order=0, min=1, max=1) @Description(shortDefinition="Id of this message", formalDefinition="The identifier of this message." ) protected IdType identifier; /** * The time that the message was sent. */ - @Child(name="timestamp", type={InstantType.class}, order=0, min=1, max=1) + @Child(name="timestamp", type={InstantType.class}, order=1, min=1, max=1) @Description(shortDefinition="Time that the message was sent", formalDefinition="The time that the message was sent." ) protected InstantType timestamp; /** * Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-type". */ - @Child(name="event", type={Coding.class}, order=1, min=1, max=1) + @Child(name="event", type={Coding.class}, order=2, min=1, max=1) @Description(shortDefinition="Code for the event this message represents", formalDefinition="Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-type'." ) protected Coding event; /** * Information about the message that this message is a response to. Only present if this message is a response. */ - @Child(name="response", type={}, order=2, min=0, max=1) + @Child(name="response", type={}, order=3, min=0, max=1) @Description(shortDefinition="If this is a reply to prior message", formalDefinition="Information about the message that this message is a response to. Only present if this message is a response." ) protected MessageHeaderResponseComponent response; /** * The source application from which this message originated. */ - @Child(name="source", type={}, order=3, min=1, max=1) + @Child(name="source", type={}, order=4, min=1, max=1) @Description(shortDefinition="Message Source Application", formalDefinition="The source application from which this message originated." ) protected MessageSourceComponent source; /** * The destination application which the message is intended for. */ - @Child(name="destination", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="destination", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Message Destination Application(s)", formalDefinition="The destination application which the message is intended for." ) protected List destination; /** * The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions. */ - @Child(name="enterer", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=6, min=0, max=1) @Description(shortDefinition="The source of the data entry", formalDefinition="The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." ) protected Reference enterer; @@ -941,7 +941,7 @@ public class MessageHeader extends DomainResource { /** * The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions. */ - @Child(name="author", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name="author", type={Practitioner.class}, order=7, min=0, max=1) @Description(shortDefinition="The source of the decision", formalDefinition="The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." ) protected Reference author; @@ -953,7 +953,7 @@ public class MessageHeader extends DomainResource { /** * Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient. */ - @Child(name="receiver", type={Practitioner.class, Organization.class}, order=7, min=0, max=1) + @Child(name="receiver", type={Practitioner.class, Organization.class}, order=8, min=0, max=1) @Description(shortDefinition="Intended 'real-world' recipient for the data", formalDefinition="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." ) protected Reference receiver; @@ -965,7 +965,7 @@ public class MessageHeader extends DomainResource { /** * The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party. */ - @Child(name="responsible", type={Practitioner.class, Organization.class}, order=8, min=0, max=1) + @Child(name="responsible", type={Practitioner.class, Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Final responsibility for event", formalDefinition="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." ) protected Reference responsible; @@ -977,14 +977,14 @@ public class MessageHeader extends DomainResource { /** * Coded indication of the cause for the event - indicates a reason for the occurance of the event that is a focus of this message. */ - @Child(name="reason", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=1) @Description(shortDefinition="Cause of event", formalDefinition="Coded indication of the cause for the event - indicates a reason for the occurance of the event that is a focus of this message." ) protected CodeableConcept reason; /** * The actual data of the message - a reference to the root/focus class of the event. */ - @Child(name="data", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="data", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The actual content of the message", formalDefinition="The actual data of the message - a reference to the root/focus class of the event." ) protected List data; /** @@ -1514,26 +1514,26 @@ public class MessageHeader extends DomainResource { @SearchParamDefinition(name="destination-uri", path="MessageHeader.destination.endpoint", description="Actual destination address or id", type="token" ) public static final String SP_DESTINATIONURI = "destination-uri"; - @SearchParamDefinition(name="timestamp", path="MessageHeader.timestamp", description="Time that the message was sent", type="date" ) - public static final String SP_TIMESTAMP = "timestamp"; - @SearchParamDefinition(name="source-uri", path="MessageHeader.source.endpoint", description="Actual message source address or id", type="token" ) - public static final String SP_SOURCEURI = "source-uri"; + @SearchParamDefinition(name="code", path="MessageHeader.response.code", description="ok | transient-error | fatal-error", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="data", path="MessageHeader.data", description="The actual content of the message", type="reference" ) + public static final String SP_DATA = "data"; @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended 'real-world' recipient for the data", type="reference" ) public static final String SP_RECEIVER = "receiver"; + @SearchParamDefinition(name="src-id", path="MessageHeader.identifier", description="Id of this message", type="token" ) + public static final String SP_SRCID = "src-id"; + @SearchParamDefinition(name="source-uri", path="MessageHeader.source.endpoint", description="Actual message source address or id", type="token" ) + public static final String SP_SOURCEURI = "source-uri"; + @SearchParamDefinition(name="destination", path="MessageHeader.destination.name", description="Name of system", type="string" ) + public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name="response-id", path="MessageHeader.response.identifier", description="Id of original message", type="token" ) + public static final String SP_RESPONSEID = "response-id"; @SearchParamDefinition(name="source", path="MessageHeader.source.name", description="Name of system", type="string" ) public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="event", path="MessageHeader.event", description="Code for the event this message represents", type="token" ) public static final String SP_EVENT = "event"; - @SearchParamDefinition(name="data", path="MessageHeader.data", description="The actual content of the message", type="reference" ) - public static final String SP_DATA = "data"; - @SearchParamDefinition(name="code", path="MessageHeader.response.code", description="ok | transient-error | fatal-error", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="response-id", path="MessageHeader.response.identifier", description="Id of original message", type="token" ) - public static final String SP_RESPONSEID = "response-id"; - @SearchParamDefinition(name="src-id", path="MessageHeader.identifier", description="Id of this message", type="token" ) - public static final String SP_SRCID = "src-id"; - @SearchParamDefinition(name="destination", path="MessageHeader.destination.name", description="Name of system", type="string" ) - public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name="timestamp", path="MessageHeader.timestamp", description="Time that the message was sent", type="date" ) + public static final String SP_TIMESTAMP = "timestamp"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java index e8619046891..567c7ba834b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -42,47 +42,47 @@ import org.hl7.fhir.instance.model.api.IMetaType; * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ @DatatypeDef(name="Meta") -public class Meta extends Type implements IMetaType, ICompositeType { +public class Meta extends Type implements IMetaType { /** * The version specific identifier, as it appears in the version portion of the url. This values changes when the resource is created, updated, or deleted. */ - @Child(name="versionId", type={IdType.class}, order=-1, min=0, max=1) + @Child(name="versionId", type={IdType.class}, order=0, min=0, max=1) @Description(shortDefinition="Version specific identifier", formalDefinition="The version specific identifier, as it appears in the version portion of the url. This values changes when the resource is created, updated, or deleted." ) protected IdType versionId; /** * When the resource last changed - e.g. when the version changed. */ - @Child(name="lastUpdated", type={InstantType.class}, order=0, min=0, max=1) + @Child(name="lastUpdated", type={InstantType.class}, order=1, min=0, max=1) @Description(shortDefinition="When the resource version last changed", formalDefinition="When the resource last changed - e.g. when the version changed." ) protected InstantType lastUpdated; /** * Set to 'true' if the resource is deleted. Deleted resources can not be fetched via the RESTful API, but may appear in bundles for various reasons. */ - @Child(name="deleted", type={BooleanType.class}, order=1, min=0, max=1) + @Child(name="deleted", type={BooleanType.class}, order=2, min=0, max=1) @Description(shortDefinition="True if the resource is deleted", formalDefinition="Set to 'true' if the resource is deleted. Deleted resources can not be fetched via the RESTful API, but may appear in bundles for various reasons." ) protected BooleanType deleted; /** * A list of profiles that this resource claims to conform to. The URL is a reference to Profile.url. */ - @Child(name="profile", type={UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="profile", type={UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Profiles this resource claims to conform to", formalDefinition="A list of profiles that this resource claims to conform to. The URL is a reference to Profile.url." ) protected List profile; /** * Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */ - @Child(name="security", type={Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="security", type={Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Security Labels applied to this resource", formalDefinition="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." ) protected List security; /** * Tags applied to this resource. Tags are intended to to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource. */ - @Child(name="tag", type={Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="tag", type={Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Tags applied", formalDefinition="Tags applied to this resource. Tags are intended to to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource." ) protected List tag; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Money.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Money.java index da99c878b5c..c614126fd61 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Money.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Money.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java index ed9d7ed4471..283e110ca5e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -689,77 +689,77 @@ public class NamingSystem extends DomainResource { /** * Indicates the purpose for the namingsystem - what kinds of things does it make unique?. */ - @Child(name="type", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the namingsystem - what kinds of things does it make unique?." ) protected Enumeration type; /** * The descriptive name of this particular identifier type or code system. */ - @Child(name="name", type={StringType.class}, order=0, min=1, max=1) + @Child(name="name", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="Human-readable label", formalDefinition="The descriptive name of this particular identifier type or code system." ) protected StringType name; /** * Indicates whether the namingsystem is "ready for use" or not. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="proposed | active | retired", formalDefinition="Indicates whether the namingsystem is 'ready for use' or not." ) protected Enumeration status; /** * If present, indicates that the identifier or code system is principally intended for use or applies to entities within the specified country. For example, the country associated with a national code system. */ - @Child(name="country", type={CodeType.class}, order=2, min=0, max=1) + @Child(name="country", type={CodeType.class}, order=3, min=0, max=1) @Description(shortDefinition="ISO 3-char country code", formalDefinition="If present, indicates that the identifier or code system is principally intended for use or applies to entities within the specified country. For example, the country associated with a national code system." ) protected CodeType country; /** * Categorizes a namingsystem for easier search by grouping related namingsystems. */ - @Child(name="category", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="category", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="driver | provider | patient | bank", formalDefinition="Categorizes a namingsystem for easier search by grouping related namingsystems." ) protected CodeableConcept category; /** * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. */ - @Child(name="responsible", type={StringType.class}, order=4, min=0, max=1) + @Child(name="responsible", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." ) protected StringType responsible; /** * Details about what the namespace identifies including scope, granularity, version labeling, etc. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name="description", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="What does namingsystem identify?", formalDefinition="Details about what the namespace identifies including scope, granularity, version labeling, etc." ) protected StringType description; /** * Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. */ - @Child(name="usage", type={StringType.class}, order=6, min=0, max=1) + @Child(name="usage", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="How/where is it used", formalDefinition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." ) protected StringType usage; /** * Indicates how the system may be identified when referenced in electronic exchange. */ - @Child(name="uniqueId", type={}, order=7, min=1, max=Child.MAX_UNLIMITED) + @Child(name="uniqueId", type={}, order=8, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifiers used for system", formalDefinition="Indicates how the system may be identified when referenced in electronic exchange." ) protected List uniqueId; /** * The person who can be contacted about this system registration entry. */ - @Child(name="contact", type={}, order=8, min=0, max=1) + @Child(name="contact", type={}, order=9, min=0, max=1) @Description(shortDefinition="Who should be contacted for questions about namingsystem", formalDefinition="The person who can be contacted about this system registration entry." ) protected NamingSystemContactComponent contact; /** * For namingsystems that are retired, indicates the namingsystem that should be used in their place (if any). */ - @Child(name="replacedBy", type={NamingSystem.class}, order=9, min=0, max=1) + @Child(name="replacedBy", type={NamingSystem.class}, order=10, min=0, max=1) @Description(shortDefinition="Use this instead", formalDefinition="For namingsystems that are retired, indicates the namingsystem that should be used in their place (if any)." ) protected Reference replacedBy; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java index aaced0fc4ff..405c47b7f11 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java @@ -29,16 +29,19 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.util.List; +import java.util.*; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.DatatypeDef; -import org.hl7.fhir.instance.model.annotations.Description; -import org.hl7.fhir.instance.model.api.INarrative; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.utilities.xhtml.XhtmlComposer; import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.hl7.fhir.utilities.xhtml.XhtmlParser; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.annotations.Child; +import org.hl7.fhir.instance.model.annotations.Description; +import org.hl7.fhir.instance.model.annotations.DatatypeDef; +import org.hl7.fhir.instance.model.api.INarrative; /** * A human-readable formatted text, including images. */ @@ -148,15 +151,15 @@ public class Narrative extends Element implements INarrative { /** * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data. */ - @Child(name="status", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="generated | extensions | additional", formalDefinition="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." ) protected Enumeration status; /** * The actual narrative content, a stripped down version of XHTML. */ -// @Child(name="div", type={}, order=0, min=1, max=1) - @Description(shortDefinition="Limited xhtml content", formalDefinition="The actual narrative content, a stripped down version of XHTML." ) +// @Child(name="div", type={}, order=1, min=1, max=1) +// @Description(shortDefinition="Limited xhtml content", formalDefinition="The actual narrative content, a stripped down version of XHTML." ) protected XhtmlNode div; private static final long serialVersionUID = 1463852859L; @@ -282,8 +285,25 @@ public class Narrative extends Element implements INarrative { ; } - public void setDiv(String theString) throws Exception { - div = new XhtmlParser().parseFragment(theString); + /** + * Sets the value of + * @param theString + * @throws Exception + */ + public void setDivAsString(String theString) throws Exception { + if (StringUtils.isNotBlank(theString)) { + div = new XhtmlParser().parseFragment(theString); + } else { + div = null; + } + } + + public String getDivAsString() throws Exception { + if (div != null && !div.isEmpty()) { + return new XhtmlComposer().compose(div); + } else { + return null; + } } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java index 73d9467b30d..912fc4855de 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,23 +47,31 @@ public class NutritionOrder extends DomainResource { public enum NutritionOrderStatus { /** - * TODO. + * The request has been proposed. + */ + PROPOSED, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. */ REQUESTED, /** - * TODO. + * The request is 'actionable', but not all actions that are implied by it have occurred yet. */ ACTIVE, /** - * TODO. + * ???. */ INACTIVE, /** - * TODO. + * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". */ HELD, /** - * TODO. + * ???. */ CANCELLED, /** @@ -73,6 +81,10 @@ public class NutritionOrder extends DomainResource { public static NutritionOrderStatus fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; if ("requested".equals(codeString)) return REQUESTED; if ("active".equals(codeString)) @@ -87,6 +99,8 @@ public class NutritionOrder extends DomainResource { } public String toCode() { switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; case REQUESTED: return "requested"; case ACTIVE: return "active"; case INACTIVE: return "inactive"; @@ -97,6 +111,8 @@ public class NutritionOrder extends DomainResource { } public String getSystem() { switch (this) { + case PROPOSED: return ""; + case PLANNED: return ""; case REQUESTED: return ""; case ACTIVE: return ""; case INACTIVE: return ""; @@ -107,21 +123,25 @@ public class NutritionOrder extends DomainResource { } public String getDefinition() { switch (this) { - case REQUESTED: return "TODO."; - case ACTIVE: return "TODO."; - case INACTIVE: return "TODO."; - case HELD: return "TODO."; - case CANCELLED: return "TODO."; + case PROPOSED: return "The request has been proposed."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case ACTIVE: return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; + case INACTIVE: return "???."; + case HELD: return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; + case CANCELLED: return "???."; default: return "?"; } } public String getDisplay() { switch (this) { - case REQUESTED: return "Requested"; - case ACTIVE: return "Active"; - case INACTIVE: return "Inactive"; - case HELD: return "Held"; - case CANCELLED: return "Cancelled"; + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case HELD: return "held"; + case CANCELLED: return "cancelled"; default: return "?"; } } @@ -132,6 +152,10 @@ public class NutritionOrder extends DomainResource { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; + if ("proposed".equals(codeString)) + return NutritionOrderStatus.PROPOSED; + if ("planned".equals(codeString)) + return NutritionOrderStatus.PLANNED; if ("requested".equals(codeString)) return NutritionOrderStatus.REQUESTED; if ("active".equals(codeString)) @@ -145,6 +169,10 @@ public class NutritionOrder extends DomainResource { throw new IllegalArgumentException("Unknown NutritionOrderStatus code '"+codeString+"'"); } public String toCode(NutritionOrderStatus code) { + if (code == NutritionOrderStatus.PROPOSED) + return "proposed"; + if (code == NutritionOrderStatus.PLANNED) + return "planned"; if (code == NutritionOrderStatus.REQUESTED) return "requested"; if (code == NutritionOrderStatus.ACTIVE) @@ -1426,7 +1454,7 @@ public class NutritionOrder extends DomainResource { /** * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. */ - @Child(name="patient", type={Patient.class}, order=-1, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) @Description(shortDefinition="The person who requires the diet, formula or nutritional supplement", formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) protected Reference patient; @@ -1438,7 +1466,7 @@ public class NutritionOrder extends DomainResource { /** * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. */ - @Child(name="orderer", type={Practitioner.class}, order=0, min=0, max=1) + @Child(name="orderer", type={Practitioner.class}, order=1, min=0, max=1) @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) protected Reference orderer; @@ -1450,14 +1478,14 @@ public class NutritionOrder extends DomainResource { /** * Identifiers assigned to this order by the order sender or by the order receiver. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) protected List identifier; /** * An encounter that provides additional information about the healthcare context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) @Description(shortDefinition="The encounter associated with that this nutrition order", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) protected Reference encounter; @@ -1469,14 +1497,14 @@ public class NutritionOrder extends DomainResource { /** * The date and time that this nutrition order was requested. */ - @Child(name="dateTime", type={DateTimeType.class}, order=3, min=1, max=1) + @Child(name="dateTime", type={DateTimeType.class}, order=4, min=1, max=1) @Description(shortDefinition="Date and time the nutrition order was requested", formalDefinition="The date and time that this nutrition order was requested." ) protected DateTimeType dateTime; /** * The ability to list substances that may cause allergies or intolerances which should be included in the nutrition order. */ - @Child(name="allergyIntolerance", type={AllergyIntolerance.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="allergyIntolerance", type={AllergyIntolerance.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of the patient's food and nutrition-related allergies and intolerances", formalDefinition="The ability to list substances that may cause allergies or intolerances which should be included in the nutrition order." ) protected List allergyIntolerance; /** @@ -1488,43 +1516,43 @@ public class NutritionOrder extends DomainResource { /** * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. */ - @Child(name="foodPreferenceModifier", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="foodPreferenceModifier", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Order-specific modifier about the type of food that should be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) protected List foodPreferenceModifier; /** * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. */ - @Child(name="excludeFoodModifier", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="excludeFoodModifier", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Order-specific modifier about the type of food that should not be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) protected List excludeFoodModifier; /** * Class that defines the components of an oral diet order for the patient. */ - @Child(name="oralDiet", type={}, order=7, min=0, max=1) + @Child(name="oralDiet", type={}, order=8, min=0, max=1) @Description(shortDefinition="Oral diet components", formalDefinition="Class that defines the components of an oral diet order for the patient." ) protected NutritionOrderOralDietComponent oralDiet; /** * Class that defines the components of a supplement order for the patient. */ - @Child(name="supplement", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="supplement", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Supplement components", formalDefinition="Class that defines the components of a supplement order for the patient." ) protected List supplement; /** * Class that defines the components of an enteral formula order for the patient. */ - @Child(name="enteralFormula", type={}, order=9, min=0, max=1) + @Child(name="enteralFormula", type={}, order=10, min=0, max=1) @Description(shortDefinition="Enteral formula components", formalDefinition="Class that defines the components of an enteral formula order for the patient." ) protected NutritionOrderEnteralFormulaComponent enteralFormula; /** * The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended. */ - @Child(name="status", type={CodeType.class}, order=10, min=0, max=1) - @Description(shortDefinition="requested | active | inactive | held | cancelled", formalDefinition="The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended." ) + @Child(name="status", type={CodeType.class}, order=11, min=0, max=1) + @Description(shortDefinition="proposed | planned | requested | active | inactive | held | cancelled", formalDefinition="The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended." ) protected Enumeration status; private static final long serialVersionUID = -966362649L; @@ -2081,26 +2109,26 @@ public class NutritionOrder extends DomainResource { return ResourceType.NutritionOrder; } - @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token" ) - public static final String SP_SUPPLEMENT = "supplement"; - @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) - public static final String SP_ORALDIET = "oraldiet"; - @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference" ) - public static final String SP_PROVIDER = "provider"; - @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identity", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) - public static final String SP_DATETIME = "datetime"; - @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token" ) - public static final String SP_ADDITIVE = "additive"; @SearchParamDefinition(name="identifier", path="NutritionOrder.identifier", description="Return nutrition orders with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) + public static final String SP_DATETIME = "datetime"; + @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token" ) + public static final String SP_SUPPLEMENT = "supplement"; @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType", description="Type of enteral or infant formula", type="token" ) public static final String SP_FORMULA = "formula"; + @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identity", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) + public static final String SP_ORALDIET = "oraldiet"; + @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token" ) + public static final String SP_ADDITIVE = "additive"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java index ff7150f7cf7..7a0e31d1093 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -616,17 +616,17 @@ public class Observation extends DomainResource { @Block() public static class ObservationReferenceRangeComponent extends BackboneElement { /** - * The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3. + * The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'. */ @Child(name="low", type={Quantity.class}, order=1, min=0, max=1) - @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3." ) + @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'." ) protected Quantity low; /** - * The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5. + * The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'. */ @Child(name="high", type={Quantity.class}, order=2, min=0, max=1) - @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5." ) + @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'." ) protected Quantity high; /** @@ -657,7 +657,7 @@ public class Observation extends DomainResource { } /** - * @return {@link #low} (The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3.) + * @return {@link #low} (The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.) */ public Quantity getLow() { if (this.low == null) @@ -673,7 +673,7 @@ public class Observation extends DomainResource { } /** - * @param value {@link #low} (The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3.) + * @param value {@link #low} (The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.) */ public ObservationReferenceRangeComponent setLow(Quantity value) { this.low = value; @@ -681,7 +681,7 @@ public class Observation extends DomainResource { } /** - * @return {@link #high} (The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5.) + * @return {@link #high} (The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.) */ public Quantity getHigh() { if (this.high == null) @@ -697,7 +697,7 @@ public class Observation extends DomainResource { } /** - * @param value {@link #high} (The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5.) + * @param value {@link #high} (The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.) */ public ObservationReferenceRangeComponent setHigh(Quantity value) { this.high = value; @@ -803,8 +803,8 @@ public class Observation extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("low", "Quantity", "The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3.", 0, java.lang.Integer.MAX_VALUE, low)); - childrenList.add(new Property("high", "Quantity", "The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5.", 0, java.lang.Integer.MAX_VALUE, high)); + childrenList.add(new Property("low", "Quantity", "The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.", 0, java.lang.Integer.MAX_VALUE, low)); + childrenList.add(new Property("high", "Quantity", "The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.", 0, java.lang.Integer.MAX_VALUE, high)); childrenList.add(new Property("meaning", "CodeableConcept", "Code for the meaning of the reference range.", 0, java.lang.Integer.MAX_VALUE, meaning)); childrenList.add(new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, java.lang.Integer.MAX_VALUE, age)); childrenList.add(new Property("text", "string", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", 0, java.lang.Integer.MAX_VALUE, text)); @@ -1019,84 +1019,84 @@ public class Observation extends DomainResource { /** * Describes what was observed. Sometimes this is called the observation "code". */ - @Child(name="name", type={CodeableConcept.class}, order=-1, min=1, max=1) + @Child(name="code", type={CodeableConcept.class}, order=0, min=1, max=1) @Description(shortDefinition="Type of observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation 'code'." ) - protected CodeableConcept name; + protected CodeableConcept code; /** * The information determined as a result of making the observation, if the information has a simple value. */ - @Child(name="value", type={Quantity.class, CodeableConcept.class, Attachment.class, Ratio.class, DateTimeType.class, Period.class, SampledData.class, StringType.class, TimeType.class}, order=0, min=0, max=1) + @Child(name="value", type={Quantity.class, CodeableConcept.class, Attachment.class, Ratio.class, DateTimeType.class, Period.class, SampledData.class, StringType.class, TimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) protected Type value; /** * Provides a reason why the expected value in the element Observation.value[x] is missing. */ - @Child(name="dataAbsentReason", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="dataAbsentReason", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="unknown | asked | temp | notasked +", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." ) protected Enumeration dataAbsentReason; /** * The assessment made based on the result of the observation. */ - @Child(name="interpretation", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="interpretation", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="High, low, normal, etc.", formalDefinition="The assessment made based on the result of the observation." ) protected CodeableConcept interpretation; /** * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. */ - @Child(name="comments", type={StringType.class}, order=3, min=0, max=1) + @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Comments about result", formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result." ) protected StringType comments; /** * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself. */ - @Child(name="applies", type={DateTimeType.class, Period.class}, order=4, min=0, max=1) + @Child(name="applies", type={DateTimeType.class, Period.class}, order=5, min=0, max=1) @Description(shortDefinition="Physiologically Relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." ) protected Type applies; /** * The date and time this observation was made available. */ - @Child(name="issued", type={InstantType.class}, order=5, min=0, max=1) + @Child(name="issued", type={InstantType.class}, order=6, min=0, max=1) @Description(shortDefinition="Date/Time this was made available", formalDefinition="The date and time this observation was made available." ) protected InstantType issued; /** * The status of the result value. */ - @Child(name="status", type={CodeType.class}, order=6, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the result value." ) protected Enumeration status; /** * An estimate of the degree to which quality issues have impacted on the value reported. */ - @Child(name="reliability", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="reliability", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="ok | ongoing | early | questionable | calibrating | error +", formalDefinition="An estimate of the degree to which quality issues have impacted on the value reported." ) protected Enumeration reliability; /** * Indicates the site on the subject's body where the observation was made ( i.e. the target site). */ - @Child(name="bodySite", type={CodeableConcept.class, BodySite.class}, order=8, min=0, max=1) + @Child(name="bodySite", type={CodeableConcept.class, BodySite.class}, order=9, min=0, max=1) @Description(shortDefinition="Observed body part", formalDefinition="Indicates the site on the subject's body where the observation was made ( i.e. the target site)." ) protected Type bodySite; /** * Indicates the mechanism used to perform the observation. */ - @Child(name="method", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name="method", type={CodeableConcept.class}, order=10, min=0, max=1) @Description(shortDefinition="How it was done", formalDefinition="Indicates the mechanism used to perform the observation." ) protected CodeableConcept method; /** * A unique identifier for the simple observation. */ - @Child(name="identifier", type={Identifier.class}, order=10, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=11, min=0, max=1) @Description(shortDefinition="Unique Id for this particular observation", formalDefinition="A unique identifier for the simple observation." ) protected Identifier identifier; @@ -1104,7 +1104,7 @@ public class Observation extends DomainResource { * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=11, min=0, max=1) + @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=12, min=0, max=1) @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus,\nother observer (for example a relative or EMT), or any observation made about the subject." ) protected Reference subject; @@ -1117,7 +1117,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The specimen that was used when this observation was made. */ - @Child(name="specimen", type={Specimen.class}, order=12, min=0, max=1) + @Child(name="specimen", type={Specimen.class}, order=13, min=0, max=1) @Description(shortDefinition="Specimen used for this observation", formalDefinition="The specimen that was used when this observation was made." ) protected Reference specimen; @@ -1129,7 +1129,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * Who was responsible for asserting the observed value as "true". */ - @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Who did the observation", formalDefinition="Who was responsible for asserting the observed value as 'true'." ) protected List performer; /** @@ -1141,7 +1141,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The device used to generate the observation data. */ - @Child(name="device", type={Device.class, DeviceMetric.class}, order=14, min=0, max=1) + @Child(name="device", type={Device.class, DeviceMetric.class}, order=15, min=0, max=1) @Description(shortDefinition="(Measurement) Device", formalDefinition="The device used to generate the observation data." ) protected Reference device; @@ -1153,7 +1153,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The healthcare event ( e.g. a patient and healthcare provider interaction ) during which this observation is made. */ - @Child(name="encounter", type={Encounter.class}, order=15, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=16, min=0, max=1) @Description(shortDefinition="Healthcare event during which this observation is made", formalDefinition="The healthcare event ( e.g. a patient and healthcare provider interaction ) during which this observation is made." ) protected Reference encounter; @@ -1165,50 +1165,50 @@ other observer (for example a relative or EMT), or any observation made about th /** * Guidance on how to interpret the value by comparison to a normal or recommended range. */ - @Child(name="referenceRange", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="referenceRange", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Provides guide for interpretation", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) protected List referenceRange; /** * Related observations - either components, or previous observations, or statements of derivation. */ - @Child(name="related", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="related", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Observations related to this observation", formalDefinition="Related observations - either components, or previous observations, or statements of derivation." ) protected List related; - private static final long serialVersionUID = 124119028L; + private static final long serialVersionUID = 1185478098L; public Observation() { super(); } - public Observation(CodeableConcept name, Enumeration status) { + public Observation(CodeableConcept code, Enumeration status) { super(); - this.name = name; + this.code = code; this.status = status; } /** - * @return {@link #name} (Describes what was observed. Sometimes this is called the observation "code".) + * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) */ - public CodeableConcept getName() { - if (this.name == null) + public CodeableConcept getCode() { + if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Observation.name"); + throw new Error("Attempt to auto-create Observation.code"); else if (Configuration.doAutoCreate()) - this.name = new CodeableConcept(); // cc - return this.name; + this.code = new CodeableConcept(); // cc + return this.code; } - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); } /** - * @param value {@link #name} (Describes what was observed. Sometimes this is called the observation "code".) + * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) */ - public Observation setName(CodeableConcept value) { - this.name = value; + public Observation setCode(CodeableConcept value) { + this.code = value; return this; } @@ -1970,7 +1970,7 @@ other observer (for example a relative or EMT), or any observation made about th protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("name", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation 'code'.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation 'code'.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("value[x]", "Quantity|CodeableConcept|Attachment|Ratio|dateTime|Period|SampledData|string|time", "The information determined as a result of making the observation, if the information has a simple value.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("dataAbsentReason", "code", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, java.lang.Integer.MAX_VALUE, dataAbsentReason)); childrenList.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation.", 0, java.lang.Integer.MAX_VALUE, interpretation)); @@ -1994,7 +1994,7 @@ other observer (for example a relative or EMT), or any observation made about th public Observation copy() { Observation dst = new Observation(); copyValues(dst); - dst.name = name == null ? null : name.copy(); + dst.code = code == null ? null : code.copy(); dst.value = value == null ? null : value.copy(); dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); dst.interpretation = interpretation == null ? null : interpretation.copy(); @@ -2039,7 +2039,7 @@ other observer (for example a relative or EMT), or any observation made about th if (!(other instanceof Observation)) return false; Observation o = (Observation) other; - return compareDeep(name, o.name, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) + return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) && compareDeep(interpretation, o.interpretation, true) && compareDeep(comments, o.comments, true) && compareDeep(applies, o.applies, true) && compareDeep(issued, o.issued, true) && compareDeep(status, o.status, true) && compareDeep(reliability, o.reliability, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(method, o.method, true) @@ -2062,7 +2062,7 @@ other observer (for example a relative or EMT), or any observation made about th } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) + return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (interpretation == null || interpretation.isEmpty()) && (comments == null || comments.isEmpty()) && (applies == null || applies.isEmpty()) && (issued == null || issued.isEmpty()) && (status == null || status.isEmpty()) && (reliability == null || reliability.isEmpty()) @@ -2077,46 +2077,46 @@ other observer (for example a relative or EMT), or any observation made about th return ResourceType.Observation; } - @SearchParamDefinition(name="value-string", path="Observation.valueString", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) - public static final String SP_VALUESTRING = "value-string"; - @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="value-concept", path="Observation.valueCodeableConcept", description="The value of the observation, if the value is a CodeableConcept", type="token" ) - public static final String SP_VALUECONCEPT = "value-concept"; - @SearchParamDefinition(name="reliability", path="Observation.reliability", description="The reliability of the observation", type="token" ) - public static final String SP_RELIABILITY = "reliability"; - @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="date", path="Observation.applies[x]", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="name-value-[x]", path="", description="Both name and one of the value parameters", type="composite" ) - public static final String SP_NAMEVALUEX = "name-value-[x]"; - @SearchParamDefinition(name="related-target", path="Observation.related.target", description="Observation that is related to this one", type="reference" ) - public static final String SP_RELATEDTARGET = "related-target"; + @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique Id for a particular observation", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="Observation.code", description="The code of the observation type", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="code-value-[x]", path="", description="Both code and one of the value parameters", type="composite" ) + public static final String SP_CODEVALUEX = "code-value-[x]"; + @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="value-quantity", path="Observation.valueQuantity", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) + public static final String SP_VALUEQUANTITY = "value-quantity"; + @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="reliability", path="Observation.reliability", description="The reliability of the observation", type="token" ) + public static final String SP_RELIABILITY = "reliability"; + @SearchParamDefinition(name="value-concept", path="Observation.valueCodeableConcept", description="The value of the observation, if the value is a CodeableConcept", type="token" ) + public static final String SP_VALUECONCEPT = "value-concept"; + @SearchParamDefinition(name="value-date", path="Observation.valueDateTime|Observation.valuePeriod", description="The value of the observation, if the value is a Period", type="date" ) + public static final String SP_VALUEDATE = "value-date"; @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token" ) public static final String SP_DATAABSENTREASON = "data-absent-reason"; + @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="related-type", path="Observation.related.type", description="has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", type="token" ) + public static final String SP_RELATEDTYPE = "related-type"; + @SearchParamDefinition(name="related-target", path="Observation.related.target", description="Observation that is related to this one", type="reference" ) + public static final String SP_RELATEDTARGET = "related-target"; @SearchParamDefinition(name="related", path="", description="Related Observations - search on related-type and related-target together", type="composite" ) public static final String SP_RELATED = "related"; @SearchParamDefinition(name="patient", path="Observation.subject", description="The subject that the observation is about (if patient)", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="name", path="Observation.name", description="The name of the observation type", type="token" ) - public static final String SP_NAME = "name"; @SearchParamDefinition(name="specimen", path="Observation.specimen", description="Specimen used for this observation", type="reference" ) public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name="value-string", path="Observation.valueString", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) + public static final String SP_VALUESTRING = "value-string"; @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference" ) public static final String SP_DEVICE = "device"; - @SearchParamDefinition(name="related-type", path="Observation.related.type", description="has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", type="token" ) - public static final String SP_RELATEDTYPE = "related-type"; - @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference" ) - public static final String SP_PERFORMER = "performer"; - @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique Id for a particular observation", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="value-quantity", path="Observation.valueQuantity", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) - public static final String SP_VALUEQUANTITY = "value-quantity"; - @SearchParamDefinition(name="value-date", path="Observation.valueDateTime|Observation.valuePeriod", description="The value of the observation, if the value is a Period", type="date" ) - public static final String SP_VALUEDATE = "value-date"; + @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java index 4aa25424cf3..277da15fcfd 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1159,98 +1159,98 @@ public class OperationDefinition extends DomainResource { /** * The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={UriType.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={UriType.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical id to reference this operation definition", formalDefinition="The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected UriType identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the operation definition", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="title", type={StringType.class}, order=1, min=1, max=1) + @Child(name="title", type={StringType.class}, order=2, min=1, max=1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType title; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=4, min=0, max=1) + @Child(name="description", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Natural language description of the operation", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="code", type={Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=6, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date for this version of the operation definition", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * Whether this is operation or named query. */ - @Child(name="kind", type={CodeType.class}, order=9, min=1, max=1) + @Child(name="kind", type={CodeType.class}, order=10, min=1, max=1) @Description(shortDefinition="operation | query", formalDefinition="Whether this is operation or named query." ) protected Enumeration kind; /** * The name used to invoke the operation. */ - @Child(name="name", type={CodeType.class}, order=10, min=1, max=1) + @Child(name="name", type={CodeType.class}, order=11, min=1, max=1) @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." ) protected CodeType name; /** * Additional information about how to use this operation or named query. */ - @Child(name="notes", type={StringType.class}, order=11, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." ) protected StringType notes; /** * Indicates that this operation definition is a constraining profile on the base. */ - @Child(name="base", type={OperationDefinition.class}, order=12, min=0, max=1) + @Child(name="base", type={OperationDefinition.class}, order=13, min=0, max=1) @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." ) protected Reference base; @@ -1262,28 +1262,28 @@ public class OperationDefinition extends DomainResource { /** * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). */ - @Child(name="system", type={BooleanType.class}, order=13, min=1, max=1) + @Child(name="system", type={BooleanType.class}, order=14, min=1, max=1) @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." ) protected BooleanType system; /** * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context). */ - @Child(name="type", type={CodeType.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="type", type={CodeType.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Invoke at resource level for these type", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context)." ) protected List type; /** * Indicates whether this operation can be invoked on a particular instance of one of the given types. */ - @Child(name="instance", type={BooleanType.class}, order=15, min=1, max=1) + @Child(name="instance", type={BooleanType.class}, order=16, min=1, max=1) @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." ) protected BooleanType instance; /** * The parameters for the operation/query. */ - @Child(name="parameter", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="parameter", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." ) protected List parameter; @@ -2211,34 +2211,34 @@ public class OperationDefinition extends DomainResource { return ResourceType.OperationDefinition; } - @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Assist with indexing and finding", type="token" ) - public static final String SP_CODE = "code"; @SearchParamDefinition(name="date", path="OperationDefinition.date", description="Date for this version of the operation definition", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="identifier", path="OperationDefinition.identifier", description="Logical id to reference this operation definition", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Assist with indexing and finding", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) + public static final String SP_INSTANCE = "instance"; @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" ) public static final String SP_KIND = "kind"; - @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) - public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) - public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) + public static final String SP_PROFILE = "profile"; @SearchParamDefinition(name="title", path="OperationDefinition.title", description="Informal name for this profile", type="string" ) public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) + public static final String SP_VERSION = "version"; @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" ) public static final String SP_SYSTEM = "system"; @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Name used to invoke the operation", type="token" ) public static final String SP_NAME = "name"; + @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference" ) public static final String SP_BASE = "base"; - @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) - public static final String SP_INSTANCE = "instance"; - @SearchParamDefinition(name="identifier", path="OperationDefinition.identifier", description="Logical id to reference this operation definition", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) - public static final String SP_PROFILE = "profile"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java index f92256f349c..0b54026f201 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -412,7 +412,7 @@ public class OperationOutcome extends DomainResource { /** * An error, warning or information message that results from a system action. */ - @Child(name="issue", type={}, order=-1, min=1, max=Child.MAX_UNLIMITED) + @Child(name="issue", type={}, order=0, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A single issue associated with the action", formalDefinition="An error, warning or information message that results from a system action." ) protected List issue; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java index c92f14c5222..690c354d174 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -3438,35 +3438,35 @@ public class OralHealthClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -3478,7 +3478,7 @@ public class OralHealthClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -3490,7 +3490,7 @@ public class OralHealthClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -3502,28 +3502,28 @@ public class OralHealthClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=7, min=0, max=1) + @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=8, min=0, max=1) + @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -3535,7 +3535,7 @@ public class OralHealthClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=10, min=0, max=1) + @Child(name="facility", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -3547,14 +3547,14 @@ public class OralHealthClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=11, min=0, max=1) + @Child(name="payee", type={}, order=12, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=12, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -3566,21 +3566,21 @@ public class OralHealthClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=15, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -3592,70 +3592,70 @@ public class OralHealthClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=18, min=0, max=1) + @Child(name="school", type={StringType.class}, order=19, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=19, min=0, max=1) + @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=20, min=0, max=1) + @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. */ - @Child(name="missingteeth", type={}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="missingteeth", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Missing Teeth", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) protected List missingteeth; /** * The high-level details of an Orthodontic Treatment Plan. */ - @Child(name="orthoPlan", type={}, order=23, min=0, max=1) + @Child(name="orthoPlan", type={}, order=24, min=0, max=1) @Description(shortDefinition="Orthodontic Treatment Plan", formalDefinition="The high-level details of an Orthodontic Treatment Plan." ) protected OrthodonticPlanComponent orthoPlan; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additionalMaterials", type={Coding.class}, order=26, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -4767,14 +4767,14 @@ public class OralHealthClaim extends DomainResource { return ResourceType.OralHealthClaim; } + @SearchParamDefinition(name="identifier", path="OralHealthClaim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="use", path="OralHealthClaim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="OralHealthClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="OralHealthClaim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="use", path="OralHealthClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; - @SearchParamDefinition(name="identifier", path="OralHealthClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java index 21499f12dd5..015513adb99 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -158,21 +158,21 @@ public class Order extends DomainResource { /** * Identifiers assigned to this order by the orderer or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) protected List identifier; /** * When the order was made. */ - @Child(name="date", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="When the order was made", formalDefinition="When the order was made." ) protected DateTimeType date; /** * Patient this order is about. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=1, min=0, max=1) + @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=2, min=0, max=1) @Description(shortDefinition="Patient this order is about", formalDefinition="Patient this order is about." ) protected Reference subject; @@ -184,7 +184,7 @@ public class Order extends DomainResource { /** * Who initiated the order. */ - @Child(name="source", type={Practitioner.class}, order=2, min=0, max=1) + @Child(name="source", type={Practitioner.class}, order=3, min=0, max=1) @Description(shortDefinition="Who initiated the order", formalDefinition="Who initiated the order." ) protected Reference source; @@ -196,7 +196,7 @@ public class Order extends DomainResource { /** * Who is intended to fulfill the order. */ - @Child(name="target", type={Organization.class, Device.class, Practitioner.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class, Device.class, Practitioner.class}, order=4, min=0, max=1) @Description(shortDefinition="Who is intended to fulfill the order", formalDefinition="Who is intended to fulfill the order." ) protected Reference target; @@ -208,14 +208,14 @@ public class Order extends DomainResource { /** * Text - why the order was made. */ - @Child(name="reason", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=5, min=0, max=1) @Description(shortDefinition="Text - why the order was made", formalDefinition="Text - why the order was made." ) protected Type reason; /** * If required by policy. */ - @Child(name="authority", type={}, order=5, min=0, max=1) + @Child(name="authority", type={}, order=6, min=0, max=1) @Description(shortDefinition="If required by policy", formalDefinition="If required by policy." ) protected Reference authority; @@ -227,14 +227,14 @@ public class Order extends DomainResource { /** * When order should be fulfilled. */ - @Child(name="when", type={}, order=6, min=0, max=1) + @Child(name="when", type={}, order=7, min=0, max=1) @Description(shortDefinition="When order should be fulfilled", formalDefinition="When order should be fulfilled." ) protected OrderWhenComponent when; /** * What action is being ordered. */ - @Child(name="detail", type={}, order=7, min=1, max=Child.MAX_UNLIMITED) + @Child(name="detail", type={}, order=8, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="What action is being ordered", formalDefinition="What action is being ordered." ) protected List detail; /** @@ -664,24 +664,24 @@ public class Order extends DomainResource { return ResourceType.Order; } - @SearchParamDefinition(name="authority", path="Order.authority", description="If required by policy", type="reference" ) - public static final String SP_AUTHORITY = "authority"; - @SearchParamDefinition(name="detail", path="Order.detail", description="What action is being ordered", type="reference" ) - public static final String SP_DETAIL = "detail"; - @SearchParamDefinition(name="patient", path="Order.subject", description="Patient this order is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference" ) - public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="date", path="Order.date", description="When the order was made", type="date" ) + public static final String SP_DATE = "date"; @SearchParamDefinition(name="subject", path="Order.subject", description="Patient this order is about", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Order.subject", description="Patient this order is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="authority", path="Order.authority", description="If required by policy", type="reference" ) + public static final String SP_AUTHORITY = "authority"; + @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="detail", path="Order.detail", description="What action is being ordered", type="reference" ) + public static final String SP_DETAIL = "detail"; @SearchParamDefinition(name="when", path="Order.when.schedule", description="A formal schedule", type="date" ) public static final String SP_WHEN = "when"; @SearchParamDefinition(name="target", path="Order.target", description="Who is intended to fulfill the order", type="reference" ) public static final String SP_TARGET = "target"; @SearchParamDefinition(name="when_code", path="Order.when.code", description="Code specifies when request should be done. The code may simply be a priority code", type="token" ) public static final String SP_WHENCODE = "when_code"; - @SearchParamDefinition(name="date", path="Order.date", description="When the order was made", type="date" ) - public static final String SP_DATE = "date"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java index b5c6f68cf82..5a9450f84bd 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -218,14 +218,14 @@ public class OrderResponse extends DomainResource { /** * Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems." ) protected List identifier; /** * A reference to the order that this is in response to. */ - @Child(name="request", type={Order.class}, order=0, min=1, max=1) + @Child(name="request", type={Order.class}, order=1, min=1, max=1) @Description(shortDefinition="The order that this is a response to", formalDefinition="A reference to the order that this is in response to." ) protected Reference request; @@ -237,14 +237,14 @@ public class OrderResponse extends DomainResource { /** * The date and time at which this order response was made (created/posted). */ - @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=2, min=0, max=1) @Description(shortDefinition="When the response was made", formalDefinition="The date and time at which this order response was made (created/posted)." ) protected DateTimeType date; /** * The person, organization, or device credited with making the response. */ - @Child(name="who", type={Practitioner.class, Organization.class, Device.class}, order=2, min=0, max=1) + @Child(name="who", type={Practitioner.class, Organization.class, Device.class}, order=3, min=0, max=1) @Description(shortDefinition="Who made the response", formalDefinition="The person, organization, or device credited with making the response." ) protected Reference who; @@ -256,28 +256,28 @@ public class OrderResponse extends DomainResource { /** * A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection. */ - @Child(name="authority", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="authority", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="If required by policy", formalDefinition="A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection." ) protected Type authority; /** * What this response says about the status of the original order. */ - @Child(name="code", type={CodeType.class}, order=4, min=1, max=1) + @Child(name="code", type={CodeType.class}, order=5, min=1, max=1) @Description(shortDefinition="pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete", formalDefinition="What this response says about the status of the original order." ) protected Enumeration code; /** * Additional description about the response - e.g. a text description provided by a human user when making decisions about the order. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name="description", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Additional description of the response", formalDefinition="Additional description about the response - e.g. a text description provided by a human user when making decisions about the order." ) protected StringType description; /** * Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order. */ - @Child(name="fulfillment", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="fulfillment", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details of the outcome of performing the order", formalDefinition="Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order." ) protected List fulfillment; /** @@ -704,16 +704,16 @@ public class OrderResponse extends DomainResource { return ResourceType.OrderResponse; } - @SearchParamDefinition(name="patient", path="", description="The patient the reuqest order is related to", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="Details of the outcome of performing the order", type="reference" ) - public static final String SP_FULFILLMENT = "fulfillment"; + @SearchParamDefinition(name="date", path="OrderResponse.date", description="When the response was made", type="date" ) + public static final String SP_DATE = "date"; @SearchParamDefinition(name="request", path="OrderResponse.request", description="The order that this is a response to", type="reference" ) public static final String SP_REQUEST = "request"; @SearchParamDefinition(name="code", path="OrderResponse.code", description="pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="date", path="OrderResponse.date", description="When the response was made", type="date" ) - public static final String SP_DATE = "date"; + @SearchParamDefinition(name="patient", path="", description="The patient the reuqest order is related to", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="Details of the outcome of performing the order", type="reference" ) + public static final String SP_FULFILLMENT = "fulfillment"; @SearchParamDefinition(name="who", path="OrderResponse.who", description="Who made the response", type="reference" ) public static final String SP_WHO = "who"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java index f7d58f9c902..c4b7149d175 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -395,42 +395,42 @@ public class Organization extends DomainResource { /** * Identifier for the organization that is used to identify the organization across multiple disparate systems. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifies this organization across multiple systems", formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems." ) protected List identifier; /** * A name associated with the organization. */ - @Child(name="name", type={StringType.class}, order=0, min=0, max=1) + @Child(name="name", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Name used for the organization", formalDefinition="A name associated with the organization." ) protected StringType name; /** * The kind of organization that this is. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="Kind of organization", formalDefinition="The kind of organization that this is." ) protected CodeableConcept type; /** * A contact detail for the organization. */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the organization", formalDefinition="A contact detail for the organization." ) protected List telecom; /** * An address for the organization. */ - @Child(name="address", type={Address.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="address", type={Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="An address for the organization", formalDefinition="An address for the organization." ) protected List
    address; /** * The organization of which this organization forms a part. */ - @Child(name="partOf", type={Organization.class}, order=4, min=0, max=1) + @Child(name="partOf", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="The organization of which this organization forms a part", formalDefinition="The organization of which this organization forms a part." ) protected Reference partOf; @@ -442,14 +442,14 @@ public class Organization extends DomainResource { /** * Contact for the organization for a certain purpose. */ - @Child(name="contact", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contact", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact for the organization for a certain purpose", formalDefinition="Contact for the organization for a certain purpose." ) protected List contact; /** * Location(s) the organization uses to provide services. */ - @Child(name="location", type={Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="location", type={Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Location(s) the organization uses to provide services", formalDefinition="Location(s) the organization uses to provide services." ) protected List location; /** @@ -461,7 +461,7 @@ public class Organization extends DomainResource { /** * Whether the organization's record is still in active use. */ - @Child(name="active", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name="active", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="Whether the organization's record is still in active use", formalDefinition="Whether the organization's record is still in active use." ) protected BooleanType active; @@ -891,18 +891,18 @@ public class Organization extends DomainResource { return ResourceType.Organization; } - @SearchParamDefinition(name="phonetic", path="", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" ) - public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="partof", path="Organization.partOf", description="Search all organizations that are part of the given organization", type="reference" ) public static final String SP_PARTOF = "partof"; + @SearchParamDefinition(name="phonetic", path="", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="name", path="Organization.name", description="A portion of the organization's name", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="active", path="Organization.active", description="Whether the organization's record is active", type="token" ) public static final String SP_ACTIVE = "active"; @SearchParamDefinition(name="type", path="Organization.type", description="A code for the type of organization", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java index 645722b9ddf..74be9e6f90c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,21 +47,21 @@ public class Other extends DomainResource { /** * Identifier assigned to the resource for business purposes, outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) protected List identifier; /** * Identifies the 'type' of resource - equivalent to the resource name for other resources. */ - @Child(name="code", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1) @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) protected CodeableConcept code; /** * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce. */ - @Child(name="subject", type={}, order=1, min=0, max=1) + @Child(name="subject", type={}, order=2, min=0, max=1) @Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." ) protected Reference subject; @@ -73,7 +73,7 @@ public class Other extends DomainResource { /** * Indicates who was responsible for creating the resource instance. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1) + @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) protected Reference author; @@ -85,7 +85,7 @@ public class Other extends DomainResource { /** * Identifies when the resource was first created. */ - @Child(name="created", type={DateType.class}, order=3, min=0, max=1) + @Child(name="created", type={DateType.class}, order=4, min=0, max=1) @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) protected DateType created; @@ -341,14 +341,14 @@ public class Other extends DomainResource { return ResourceType.Other; } - @SearchParamDefinition(name="patient", path="Other.subject", description="Identifies the", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="created", path="Other.created", description="When created", type="date" ) - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="subject", path="Other.subject", description="Identifies the", type="reference" ) - public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="code", path="Other.code", description="Kind of Resource", type="token" ) public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="Other.subject", description="Identifies the", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="created", path="Other.created", description="When created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="patient", path="Other.subject", description="Identifies the", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java index 67734a0a94c..a155754de02 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -385,7 +385,7 @@ public class Parameters extends Resource { /** * A parameter passed to or received from the operation. */ - @Child(name="parameter", type={}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="parameter", type={}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Operation Parameter", formalDefinition="A parameter passed to or received from the operation." ) protected List parameter; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java index 7515309d958..f47945b559f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -897,98 +897,98 @@ public class Patient extends DomainResource { /** * An identifier that applies to this person as a patient. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="An identifier for the person as this patient", formalDefinition="An identifier that applies to this person as a patient." ) protected List identifier; /** * A name associated with the individual. */ - @Child(name="name", type={HumanName.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="name", type={HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A name associated with the patient", formalDefinition="A name associated with the individual." ) protected List name; /** * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted. */ - @Child(name="telecom", type={ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the individual", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." ) protected List telecom; /** * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=2, min=0, max=1) + @Child(name="gender", type={CodeType.class}, order=3, min=0, max=1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." ) protected Enumeration gender; /** * The date and time of birth for the individual. */ - @Child(name="birthDate", type={DateType.class}, order=3, min=0, max=1) + @Child(name="birthDate", type={DateType.class}, order=4, min=0, max=1) @Description(shortDefinition="The date and time of birth for the individual", formalDefinition="The date and time of birth for the individual." ) protected DateType birthDate; /** * Indicates if the individual is deceased or not. */ - @Child(name="deceased", type={BooleanType.class, DateTimeType.class}, order=4, min=0, max=1) + @Child(name="deceased", type={BooleanType.class, DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="Indicates if the individual is deceased or not", formalDefinition="Indicates if the individual is deceased or not." ) protected Type deceased; /** * Addresses for the individual. */ - @Child(name="address", type={Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="address", type={Address.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Addresses for the individual", formalDefinition="Addresses for the individual." ) protected List
    address; /** * This field contains a patient's most recent marital (civil) status. */ - @Child(name="maritalStatus", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name="maritalStatus", type={CodeableConcept.class}, order=7, min=0, max=1) @Description(shortDefinition="Marital (civil) status of a person", formalDefinition="This field contains a patient's most recent marital (civil) status." ) protected CodeableConcept maritalStatus; /** * Indicates whether the patient is part of a multiple or indicates the actual birth order. */ - @Child(name="multipleBirth", type={BooleanType.class, IntegerType.class}, order=7, min=0, max=1) + @Child(name="multipleBirth", type={BooleanType.class, IntegerType.class}, order=8, min=0, max=1) @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order." ) protected Type multipleBirth; /** * Image of the person. */ - @Child(name="photo", type={Attachment.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="photo", type={Attachment.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) protected List photo; /** * A contact party (e.g. guardian, partner, friend) for the patient. */ - @Child(name="contact", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contact", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact party (e.g. guardian, partner, friend) for the patient", formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient." ) protected List contact; /** * This element has a value if the patient is an animal. */ - @Child(name="animal", type={}, order=10, min=0, max=1) + @Child(name="animal", type={}, order=11, min=0, max=1) @Description(shortDefinition="If this patient is an animal (non-human)", formalDefinition="This element has a value if the patient is an animal." ) protected AnimalComponent animal; /** * Languages which may be used to communicate with the patient about his or her health. */ - @Child(name="communication", type={CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="communication", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Languages which may be used to communicate with the patient about his or her health", formalDefinition="Languages which may be used to communicate with the patient about his or her health." ) protected List communication; /** * Patient's nominated care provider. */ - @Child(name="careProvider", type={Organization.class, Practitioner.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="careProvider", type={Organization.class, Practitioner.class}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Patient's nominated care provider", formalDefinition="Patient's nominated care provider." ) protected List careProvider; /** @@ -1000,7 +1000,7 @@ public class Patient extends DomainResource { /** * Organization that is the custodian of the patient record. */ - @Child(name="managingOrganization", type={Organization.class}, order=13, min=0, max=1) + @Child(name="managingOrganization", type={Organization.class}, order=14, min=0, max=1) @Description(shortDefinition="Organization that is the custodian of the patient record", formalDefinition="Organization that is the custodian of the patient record." ) protected Reference managingOrganization; @@ -1012,14 +1012,14 @@ public class Patient extends DomainResource { /** * Link to another patient resource that concerns the same actual person. */ - @Child(name="link", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="link", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Link to another patient resource that concerns the same actual person", formalDefinition="Link to another patient resource that concerns the same actual person." ) protected List link; /** * Whether this patient record is in active use. */ - @Child(name="active", type={BooleanType.class}, order=15, min=0, max=1) + @Child(name="active", type={BooleanType.class}, order=16, min=0, max=1) @Description(shortDefinition="Whether this patient's record is in active use", formalDefinition="Whether this patient record is in active use." ) protected BooleanType active; @@ -1743,38 +1743,38 @@ public class Patient extends DomainResource { return ResourceType.Patient; } - @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients", type="token" ) - public static final String SP_ANIMALBREED = "animal-breed"; - @SearchParamDefinition(name="phonetic", path="", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) - public static final String SP_PHONETIC = "phonetic"; - @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" ) - public static final String SP_LINK = "link"; - @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients", type="token" ) - public static final String SP_ANIMALSPECIES = "animal-species"; - @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization at which this person is a patient", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="given", path="Patient.name.given", description="A portion of the given name of the patient", type="string" ) public static final String SP_GIVEN = "given"; - @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" ) - public static final String SP_CAREPROVIDER = "careprovider"; @SearchParamDefinition(name="address", path="Patient.address", description="An address in any kind of address/part of the patient", type="string" ) public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient", type="string" ) - public static final String SP_FAMILY = "family"; + @SearchParamDefinition(name="birthdate", path="Patient.birthDate", description="The patient's date of birth", type="date" ) + public static final String SP_BIRTHDATE = "birthdate"; + @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients", type="token" ) + public static final String SP_ANIMALSPECIES = "animal-species"; + @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" ) + public static final String SP_LINK = "link"; + @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" ) + public static final String SP_ACTIVE = "active"; + @SearchParamDefinition(name="language", path="Patient.communication", description="Language code (irrespective of use value)", type="token" ) + public static final String SP_LANGUAGE = "language"; + @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients", type="token" ) + public static final String SP_ANIMALBREED = "animal-breed"; + @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" ) + public static final String SP_CAREPROVIDER = "careprovider"; + @SearchParamDefinition(name="phonetic", path="", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization at which this person is a patient", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="name", path="Patient.name", description="A portion of either family or given name of the patient", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="telecom", path="Patient.telecom", description="The value in any kind of telecom details of the patient", type="string" ) public static final String SP_TELECOM = "telecom"; - @SearchParamDefinition(name="birthdate", path="Patient.birthDate", description="The patient's date of birth", type="date" ) - public static final String SP_BIRTHDATE = "birthdate"; - @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" ) - public static final String SP_ACTIVE = "active"; - @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient", type="token" ) - public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="language", path="Patient.communication", description="Language code (irrespective of use value)", type="token" ) - public static final String SP_LANGUAGE = "language"; - @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient", type="string" ) + public static final String SP_FAMILY = "family"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java index 1fe250accef..f3a401de15c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,35 +47,35 @@ public class PaymentNotice extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class PaymentNotice extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class PaymentNotice extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class PaymentNotice extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=6, min=0, max=1) + @Child(name="request", type={}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -123,7 +123,7 @@ public class PaymentNotice extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=7, min=0, max=1) + @Child(name="response", type={}, order=8, min=0, max=1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -135,7 +135,7 @@ public class PaymentNotice extends DomainResource { /** * The payment status, typically paid: payment sent, cleared: payment received. */ - @Child(name="paymentStatus", type={Coding.class}, order=8, min=1, max=1) + @Child(name="paymentStatus", type={Coding.class}, order=9, min=1, max=1) @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." ) protected Coding paymentStatus; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java index 0b5d5731f31..2bd7f56627f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -656,14 +656,14 @@ public class PaymentReconciliation extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={PendedRequest.class}, order=0, min=0, max=1) + @Child(name="request", type={PendedRequest.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -675,49 +675,49 @@ public class PaymentReconciliation extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=2, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The period of time for which payments have been gathered into this bulk payment for settlement. */ - @Child(name="period", type={Period.class}, order=6, min=0, max=1) + @Child(name="period", type={Period.class}, order=7, min=0, max=1) @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) protected Period period; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=8, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -729,7 +729,7 @@ public class PaymentReconciliation extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -741,7 +741,7 @@ public class PaymentReconciliation extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=10, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -753,28 +753,28 @@ public class PaymentReconciliation extends DomainResource { /** * List of individual settlement amounts and the corresponding transaction. */ - @Child(name="detail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="detail", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." ) protected List detail; /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=11, min=0, max=1) + @Child(name="form", type={Coding.class}, order=12, min=0, max=1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Total payment amount. */ - @Child(name="total", type={Money.class}, order=12, min=1, max=1) + @Child(name="total", type={Money.class}, order=13, min=1, max=1) @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." ) protected Money total; /** * Suite of notes. */ - @Child(name="note", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="note", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) protected List note; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java index d067e7fc1ab..aa452554a77 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,35 +48,35 @@ public class PendedRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -88,7 +88,7 @@ public class PendedRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -100,7 +100,7 @@ public class PendedRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -112,7 +112,7 @@ public class PendedRequest extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=6, min=0, max=1) + @Child(name="request", type={}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -124,21 +124,21 @@ public class PendedRequest extends DomainResource { /** * Names of resource types to include. */ - @Child(name="include", type={StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="include", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) protected List include; /** * Names of resource types to exclude. */ - @Child(name="exclude", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exclude", type={StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) protected List exclude; /** * A period of time during which the fulfilling resources would have been created. */ - @Child(name="period", type={Period.class}, order=9, min=0, max=1) + @Child(name="period", type={Period.class}, order=10, min=0, max=1) @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java index 357d38283a0..e589d7d0de8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A time period defined by a start and end date and optionally time. */ @DatatypeDef(name="Period") -public class Period extends Type implements ICompositeType { +public class Period extends Type implements ICompositeType { /** * The start of the period. The boundary is inclusive. */ - @Child(name="start", type={DateTimeType.class}, order=-1, min=0, max=1) + @Child(name="start", type={DateTimeType.class}, order=0, min=0, max=1) @Description(shortDefinition="Starting time with inclusive boundary", formalDefinition="The start of the period. The boundary is inclusive." ) protected DateTimeType start; /** * The end of the period. If the end of the period is missing, it means that the period is ongoing. */ - @Child(name="end", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="end", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="End time with inclusive boundary, if not ongoing", formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing." ) protected DateTimeType end; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java index 2a9afab3c63..d67222227c1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -409,56 +409,56 @@ public class Person extends DomainResource { /** * Identifier for a person within a particular scope. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A Human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) protected List identifier; /** * A name associated with the person. */ - @Child(name="name", type={HumanName.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="name", type={HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) protected List name; /** * A contact detail for the person, e.g. a telephone number or an email address. */ - @Child(name="telecom", type={ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) protected List telecom; /** * Administrative Gender. */ - @Child(name="gender", type={CodeType.class}, order=2, min=0, max=1) + @Child(name="gender", type={CodeType.class}, order=3, min=0, max=1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender." ) protected Enumeration gender; /** * The birth date for the person. */ - @Child(name="birthDate", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name="birthDate", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="The birth date for the person", formalDefinition="The birth date for the person." ) protected DateTimeType birthDate; /** * One or more addresses for the person. */ - @Child(name="address", type={Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="address", type={Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="One or more addresses for the person", formalDefinition="One or more addresses for the person." ) protected List
    address; /** * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual. */ - @Child(name="photo", type={Attachment.class}, order=5, min=0, max=1) + @Child(name="photo", type={Attachment.class}, order=6, min=0, max=1) @Description(shortDefinition="Image of the Person", formalDefinition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual." ) protected Attachment photo; /** * The Organization that is the custodian of the person record. */ - @Child(name="managingOrganization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="managingOrganization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="The Organization that is the custodian of the person record", formalDefinition="The Organization that is the custodian of the person record." ) protected Reference managingOrganization; @@ -470,14 +470,14 @@ public class Person extends DomainResource { /** * Whether this person's record is in active use. */ - @Child(name="active", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name="active", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="This person's record is in active use", formalDefinition="Whether this person's record is in active use." ) protected BooleanType active; /** * Link to a resource that converns the same actual person. */ - @Child(name="link", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="link", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Link to a resource that converns the same actual person", formalDefinition="Link to a resource that converns the same actual person." ) protected List link; @@ -938,22 +938,22 @@ public class Person extends DomainResource { return ResourceType.Person; } - @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="address", path="Person.address", description="An address in any kind of address/part", type="string" ) public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" ) - public static final String SP_NAME = "name"; @SearchParamDefinition(name="birthdate", path="Person.birthDate", description="The person's date of birth", type="date" ) public static final String SP_BIRTHDATE = "birthdate"; - @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="string" ) - public static final String SP_TELECOM = "telecom"; @SearchParamDefinition(name="gender", path="Person.gender", description="The gender of the person", type="token" ) public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="string" ) + public static final String SP_TELECOM = "telecom"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java index c9bdff7f304..6c93dec4010 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2688,35 +2688,35 @@ public class PharmacyClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class PharmacyClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class PharmacyClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class PharmacyClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=7, min=0, max=1) + @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=8, min=0, max=1) + @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class PharmacyClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=10, min=0, max=1) + @Child(name="facility", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,7 +2797,7 @@ public class PharmacyClaim extends DomainResource { /** * Prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name="prescription", type={MedicationPrescription.class}, order=11, min=0, max=1) + @Child(name="prescription", type={MedicationPrescription.class}, order=12, min=0, max=1) @Description(shortDefinition="Current Prescription", formalDefinition="Prescription to support the dispensing of pharmacy services, medications or products." ) protected Reference prescription; @@ -2809,7 +2809,7 @@ public class PharmacyClaim extends DomainResource { /** * Original prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name="originalPrescription", type={MedicationPrescription.class}, order=12, min=0, max=1) + @Child(name="originalPrescription", type={MedicationPrescription.class}, order=13, min=0, max=1) @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription to support the dispensing of pharmacy services, medications or products." ) protected Reference originalPrescription; @@ -2821,14 +2821,14 @@ public class PharmacyClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=13, min=0, max=1) + @Child(name="payee", type={}, order=14, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=14, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=15, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2840,21 +2840,21 @@ public class PharmacyClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=17, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=18, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2866,56 +2866,56 @@ public class PharmacyClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverage", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exception", type={Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=20, min=0, max=1) + @Child(name="school", type={StringType.class}, order=21, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=21, min=0, max=1) + @Child(name="accident", type={DateType.class}, order=22, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=22, min=0, max=1) + @Child(name="accidentType", type={Coding.class}, order=23, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="interventionException", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additionalMaterials", type={Coding.class}, order=26, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -4057,14 +4057,14 @@ public class PharmacyClaim extends DomainResource { return ResourceType.PharmacyClaim; } + @SearchParamDefinition(name="identifier", path="PharmacyClaim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="use", path="PharmacyClaim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="PharmacyClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="PharmacyClaim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="use", path="PharmacyClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; - @SearchParamDefinition(name="identifier", path="PharmacyClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java index 9784a26d7fa..8588b66a50e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -145,6 +145,359 @@ public class Practitioner extends DomainResource { } } + @Block() + public static class PractitionerPractitionerRoleComponent extends BackboneElement { + /** + * The Organization where the Practitioner performs the roles associated. + */ + @Child(name="managingOrganization", type={Organization.class}, order=1, min=0, max=1) + @Description(shortDefinition="The Organization where the Practitioner performs the roles associated", formalDefinition="The Organization where the Practitioner performs the roles associated." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The Organization where the Practitioner performs the roles associated.) + */ + protected Organization managingOrganizationTarget; + + /** + * Roles which this practitioner is authorized to perform for the organization. + */ + @Child(name="role", type={CodeableConcept.class}, order=2, min=0, max=1) + @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." ) + protected CodeableConcept role; + + /** + * Specific specialty of the practitioner. + */ + @Child(name="specialty", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) + protected List specialty; + + /** + * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. + */ + @Child(name="period", type={Period.class}, order=4, min=0, max=1) + @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) + protected Period period; + + /** + * The location(s) at which this practitioner provides care. + */ + @Child(name="location", type={Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) + protected List location; + /** + * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) + */ + protected List locationTarget; + + + /** + * The list of healthcare services that this worker offers at this location of this organization. + */ + @Child(name="healthcareService", type={HealthcareService.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="The list of healthcare services that this worker offers at this location of this organization", formalDefinition="The list of healthcare services that this worker offers at this location of this organization." ) + protected List healthcareService; + /** + * The actual objects that are the target of the reference (The list of healthcare services that this worker offers at this location of this organization.) + */ + protected List healthcareServiceTarget; + + + private static final long serialVersionUID = -2146177018L; + + public PractitionerPractitionerRoleComponent() { + super(); + } + + /** + * @return {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public PractitionerPractitionerRoleComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + /** + * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public PractitionerPractitionerRoleComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (Reference item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + // syntactic sugar + public Reference addLocation() { //3 + Reference t = new Reference(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + /** + * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public List getLocationTarget() { + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + return this.locationTarget; + } + + // syntactic sugar + /** + * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public Location addLocationTarget() { + Location r = new Location(); + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + this.locationTarget.add(r); + return r; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) + */ + public List getHealthcareService() { + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + return this.healthcareService; + } + + public boolean hasHealthcareService() { + if (this.healthcareService == null) + return false; + for (Reference item : this.healthcareService) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) + */ + // syntactic sugar + public Reference addHealthcareService() { //3 + Reference t = new Reference(); + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return t; + } + + /** + * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) + */ + public List getHealthcareServiceTarget() { + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + return this.healthcareServiceTarget; + } + + // syntactic sugar + /** + * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) + */ + public HealthcareService addHealthcareServiceTarget() { + HealthcareService r = new HealthcareService(); + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + this.healthcareServiceTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The Organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker offers at this location of this organization.", 0, java.lang.Integer.MAX_VALUE, healthcareService)); + } + + public PractitionerPractitionerRoleComponent copy() { + PractitionerPractitionerRoleComponent dst = new PractitionerPractitionerRoleComponent(); + copyValues(dst); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.role = role == null ? null : role.copy(); + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + if (location != null) { + dst.location = new ArrayList(); + for (Reference i : location) + dst.location.add(i.copy()); + }; + if (healthcareService != null) { + dst.healthcareService = new ArrayList(); + for (Reference i : healthcareService) + dst.healthcareService.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerPractitionerRoleComponent)) + return false; + PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; + return compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(role, o.role, true) + && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) + && compareDeep(healthcareService, o.healthcareService, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerPractitionerRoleComponent)) + return false; + PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (managingOrganization == null || managingOrganization.isEmpty()) && (role == null || role.isEmpty()) + && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty()) + && (healthcareService == null || healthcareService.isEmpty()); + } + + } + @Block() public static class PractitionerQualificationComponent extends BackboneElement { /** @@ -366,112 +719,74 @@ public class Practitioner extends DomainResource { /** * An identifier that applies to this person in this role. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A identifier for the person as this agent", formalDefinition="An identifier that applies to this person in this role." ) protected List identifier; /** * A name associated with the person. */ - @Child(name="name", type={HumanName.class}, order=0, min=0, max=1) + @Child(name="name", type={HumanName.class}, order=1, min=0, max=1) @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) protected HumanName name; /** * A contact detail for the practitioner, e.g. a telephone number or an email address. */ - @Child(name="telecom", type={ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the practitioner", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." ) protected List telecom; /** * The postal address where the practitioner can be found or visited or to which mail can be delivered. */ - @Child(name="address", type={Address.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="address", type={Address.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Where practitioner can be found/visited", formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered." ) protected List
    address; /** * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=3, min=0, max=1) + @Child(name="gender", type={CodeType.class}, order=4, min=0, max=1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) protected Enumeration gender; /** * The date and time of birth for the practitioner. */ - @Child(name="birthDate", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="birthDate", type={DateType.class}, order=5, min=0, max=1) @Description(shortDefinition="The date and time of birth for the practitioner", formalDefinition="The date and time of birth for the practitioner." ) - protected DateTimeType birthDate; + protected DateType birthDate; /** * Image of the person. */ - @Child(name="photo", type={Attachment.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="photo", type={Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) protected List photo; /** - * The organization that the practitioner represents. + * The list of Roles/Organizations that the Practitioner is associated with. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) - @Description(shortDefinition="The represented organization", formalDefinition="The organization that the practitioner represents." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization that the practitioner represents.) - */ - protected Organization organizationTarget; - - /** - * Roles which this practitioner is authorized to perform for the organization. - */ - @Child(name="role", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." ) - protected List role; - - /** - * Specific specialty of the practitioner. - */ - @Child(name="specialty", type={CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) - protected List specialty; - - /** - * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. - */ - @Child(name="period", type={Period.class}, order=9, min=0, max=1) - @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) - protected Period period; - - /** - * The location(s) at which this practitioner provides care. - */ - @Child(name="location", type={Location.class}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) - protected List location; - /** - * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) - */ - protected List locationTarget; - + @Child(name="practitionerRole", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="The list of Roles/Organizations that the Practitioner is associated with", formalDefinition="The list of Roles/Organizations that the Practitioner is associated with." ) + protected List practitionerRole; /** * Qualifications obtained by training and certification. */ - @Child(name="qualification", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="qualification", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Qualifications obtained by training and certification", formalDefinition="Qualifications obtained by training and certification." ) protected List qualification; /** * A language the practitioner is able to use in patient communication. */ - @Child(name="communication", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="communication", type={CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A language the practitioner is able to use in patient communication", formalDefinition="A language the practitioner is able to use in patient communication." ) protected List communication; - private static final long serialVersionUID = 1792768502L; + private static final long serialVersionUID = 781100268L; public Practitioner() { super(); @@ -643,12 +958,12 @@ public class Practitioner extends DomainResource { /** * @return {@link #birthDate} (The date and time of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value */ - public DateTimeType getBirthDateElement() { + public DateType getBirthDateElement() { if (this.birthDate == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Practitioner.birthDate"); else if (Configuration.doAutoCreate()) - this.birthDate = new DateTimeType(); // bb + this.birthDate = new DateType(); // bb return this.birthDate; } @@ -663,7 +978,7 @@ public class Practitioner extends DomainResource { /** * @param value {@link #birthDate} (The date and time of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value */ - public Practitioner setBirthDateElement(DateTimeType value) { + public Practitioner setBirthDateElement(DateType value) { this.birthDate = value; return this; } @@ -683,7 +998,7 @@ public class Practitioner extends DomainResource { this.birthDate = null; else { if (this.birthDate == null) - this.birthDate = new DateTimeType(); + this.birthDate = new DateType(); this.birthDate.setValue(value); } return this; @@ -720,184 +1035,35 @@ public class Practitioner extends DomainResource { } /** - * @return {@link #organization} (The organization that the practitioner represents.) + * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Practitioner.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; + public List getPractitionerRole() { + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + return this.practitionerRole; } - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization that the practitioner represents.) - */ - public Practitioner setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that the practitioner represents.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Practitioner.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that the practitioner represents.) - */ - public Practitioner setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) - */ - public List getRole() { - if (this.role == null) - this.role = new ArrayList(); - return this.role; - } - - public boolean hasRole() { - if (this.role == null) + public boolean hasPractitionerRole() { + if (this.practitionerRole == null) return false; - for (CodeableConcept item : this.role) + for (PractitionerPractitionerRoleComponent item : this.practitionerRole) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) */ // syntactic sugar - public CodeableConcept addRole() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.role == null) - this.role = new ArrayList(); - this.role.add(t); + public PractitionerPractitionerRoleComponent addPractitionerRole() { //3 + PractitionerPractitionerRoleComponent t = new PractitionerPractitionerRoleComponent(); + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + this.practitionerRole.add(t); return t; } - /** - * @return {@link #specialty} (Specific specialty of the practitioner.) - */ - public List getSpecialty() { - if (this.specialty == null) - this.specialty = new ArrayList(); - return this.specialty; - } - - public boolean hasSpecialty() { - if (this.specialty == null) - return false; - for (CodeableConcept item : this.specialty) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #specialty} (Specific specialty of the practitioner.) - */ - // syntactic sugar - public CodeableConcept addSpecialty() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialty == null) - this.specialty = new ArrayList(); - this.specialty.add(t); - return t; - } - - /** - * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Practitioner.period"); - else if (Configuration.doAutoCreate()) - this.period = new Period(); // cc - return this.period; - } - - public boolean hasPeriod() { - return this.period != null && !this.period.isEmpty(); - } - - /** - * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) - */ - public Practitioner setPeriod(Period value) { - this.period = value; - return this; - } - - /** - * @return {@link #location} (The location(s) at which this practitioner provides care.) - */ - public List getLocation() { - if (this.location == null) - this.location = new ArrayList(); - return this.location; - } - - public boolean hasLocation() { - if (this.location == null) - return false; - for (Reference item : this.location) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #location} (The location(s) at which this practitioner provides care.) - */ - // syntactic sugar - public Reference addLocation() { //3 - Reference t = new Reference(); - if (this.location == null) - this.location = new ArrayList(); - this.location.add(t); - return t; - } - - /** - * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) - */ - public List getLocationTarget() { - if (this.locationTarget == null) - this.locationTarget = new ArrayList(); - return this.locationTarget; - } - - // syntactic sugar - /** - * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) - */ - public Location addLocationTarget() { - Location r = new Location(); - if (this.locationTarget == null) - this.locationTarget = new ArrayList(); - this.locationTarget.add(r); - return r; - } - /** * @return {@link #qualification} (Qualifications obtained by training and certification.) */ @@ -965,13 +1131,9 @@ public class Practitioner extends DomainResource { childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the practitioner, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("address", "Address", "The postal address where the practitioner can be found or visited or to which mail can be delivered.", 0, java.lang.Integer.MAX_VALUE, address)); childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); - childrenList.add(new Property("birthDate", "dateTime", "The date and time of birth for the practitioner.", 0, java.lang.Integer.MAX_VALUE, birthDate)); + childrenList.add(new Property("birthDate", "date", "The date and time of birth for the practitioner.", 0, java.lang.Integer.MAX_VALUE, birthDate)); childrenList.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization that the practitioner represents.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); - childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); - childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("practitionerRole", "", "The list of Roles/Organizations that the Practitioner is associated with.", 0, java.lang.Integer.MAX_VALUE, practitionerRole)); childrenList.add(new Property("qualification", "", "Qualifications obtained by training and certification.", 0, java.lang.Integer.MAX_VALUE, qualification)); childrenList.add(new Property("communication", "CodeableConcept", "A language the practitioner is able to use in patient communication.", 0, java.lang.Integer.MAX_VALUE, communication)); } @@ -1002,22 +1164,10 @@ public class Practitioner extends DomainResource { for (Attachment i : photo) dst.photo.add(i.copy()); }; - dst.organization = organization == null ? null : organization.copy(); - if (role != null) { - dst.role = new ArrayList(); - for (CodeableConcept i : role) - dst.role.add(i.copy()); - }; - if (specialty != null) { - dst.specialty = new ArrayList(); - for (CodeableConcept i : specialty) - dst.specialty.add(i.copy()); - }; - dst.period = period == null ? null : period.copy(); - if (location != null) { - dst.location = new ArrayList(); - for (Reference i : location) - dst.location.add(i.copy()); + if (practitionerRole != null) { + dst.practitionerRole = new ArrayList(); + for (PractitionerPractitionerRoleComponent i : practitionerRole) + dst.practitionerRole.add(i.copy()); }; if (qualification != null) { dst.qualification = new ArrayList(); @@ -1045,8 +1195,7 @@ public class Practitioner extends DomainResource { Practitioner o = (Practitioner) other; return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) - && compareDeep(photo, o.photo, true) && compareDeep(organization, o.organization, true) && compareDeep(role, o.role, true) - && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) + && compareDeep(photo, o.photo, true) && compareDeep(practitionerRole, o.practitionerRole, true) && compareDeep(qualification, o.qualification, true) && compareDeep(communication, o.communication, true) ; } @@ -1064,10 +1213,9 @@ public class Practitioner extends DomainResource { public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) && (gender == null || gender.isEmpty()) - && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) && (organization == null || organization.isEmpty()) - && (role == null || role.isEmpty()) && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) - && (location == null || location.isEmpty()) && (qualification == null || qualification.isEmpty()) - && (communication == null || communication.isEmpty()); + && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) && (practitionerRole == null || practitionerRole.isEmpty()) + && (qualification == null || qualification.isEmpty()) && (communication == null || communication.isEmpty()) + ; } @Override @@ -1075,28 +1223,32 @@ public class Practitioner extends DomainResource { return ResourceType.Practitioner; } - @SearchParamDefinition(name="organization", path="Practitioner.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) - public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="given", path="Practitioner.name", description="A portion of the given name", type="string" ) public static final String SP_GIVEN = "given"; - @SearchParamDefinition(name="location", path="Practitioner.location", description="One of the locations at which this practitioner provides care", type="reference" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" ) - public static final String SP_COMMUNICATION = "communication"; + @SearchParamDefinition(name="specialty", path="Practitioner.practitionerRole.specialty", description="The practitioner has this specailty at an organization", type="token" ) + public static final String SP_SPECIALTY = "specialty"; @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part", type="string" ) public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="family", path="Practitioner.name", description="A portion of the family name", type="string" ) - public static final String SP_FAMILY = "family"; + @SearchParamDefinition(name="role", path="Practitioner.practitionerRole.role", description="The practitioner can perform this role at for the organization", type="token" ) + public static final String SP_ROLE = "role"; + @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.managingOrganization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="string" ) public static final String SP_TELECOM = "telecom"; - @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" ) - public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="location", path="Practitioner.practitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="family", path="Practitioner.name", description="A portion of the family name", type="string" ) + public static final String SP_FAMILY = "family"; + @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" ) + public static final String SP_COMMUNICATION = "communication"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java index 8c54ff0ee9c..44e5688129d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -412,14 +412,14 @@ public class Procedure extends DomainResource { /** * This records identifiers associated with this procedure that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this procedure", formalDefinition="This records identifiers associated with this procedure that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The person on whom the procedure was performed. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Who procedure was performed on", formalDefinition="The person on whom the procedure was performed." ) protected Reference patient; @@ -431,42 +431,42 @@ public class Procedure extends DomainResource { /** * The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) @Description(shortDefinition="Identification of the procedure", formalDefinition="The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded." ) protected CodeableConcept type; /** * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="bodySite", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Precise location details", formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion." ) protected List bodySite; /** * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text. */ - @Child(name="indication", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason procedure performed", formalDefinition="The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text." ) protected List indication; /** * Limited to 'real' people rather than equipment. */ - @Child(name="performer", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="performer", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The people who performed the procedure", formalDefinition="Limited to 'real' people rather than equipment." ) protected List performer; /** * The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured. */ - @Child(name="date", type={Period.class}, order=5, min=0, max=1) + @Child(name="date", type={Period.class}, order=6, min=0, max=1) @Description(shortDefinition="The date the procedure was performed", formalDefinition="The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." ) protected Period date; /** * The encounter during which the procedure was performed. */ - @Child(name="encounter", type={Encounter.class}, order=6, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) @Description(shortDefinition="The encounter when procedure performed", formalDefinition="The encounter during which the procedure was performed." ) protected Reference encounter; @@ -478,14 +478,14 @@ public class Procedure extends DomainResource { /** * What was the outcome of the procedure - did it resolve reasons why the procedure was performed?. */ - @Child(name="outcome", type={StringType.class}, order=7, min=0, max=1) + @Child(name="outcome", type={StringType.class}, order=8, min=0, max=1) @Description(shortDefinition="What was result of procedure?", formalDefinition="What was the outcome of the procedure - did it resolve reasons why the procedure was performed?." ) protected StringType outcome; /** * This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies. */ - @Child(name="report", type={DiagnosticReport.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="report", type={DiagnosticReport.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Any report that results from the procedure", formalDefinition="This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies." ) protected List report; /** @@ -497,28 +497,28 @@ public class Procedure extends DomainResource { /** * Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues. */ - @Child(name="complication", type={CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="complication", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Complication following the procedure", formalDefinition="Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues." ) protected List complication; /** * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used. */ - @Child(name="followUp", type={StringType.class}, order=10, min=0, max=1) + @Child(name="followUp", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="Instructions for follow up", formalDefinition="If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used." ) protected StringType followUp; /** * Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure. */ - @Child(name="relatedItem", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="relatedItem", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A procedure that is related to this one", formalDefinition="Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure." ) protected List relatedItem; /** * Any other notes about the procedure - e.g. the operative notes. */ - @Child(name="notes", type={StringType.class}, order=12, min=0, max=1) + @Child(name="notes", type={StringType.class}, order=13, min=0, max=1) @Description(shortDefinition="Additional information about procedure", formalDefinition="Any other notes about the procedure - e.g. the operative notes." ) protected StringType notes; @@ -1157,10 +1157,10 @@ public class Procedure extends DomainResource { return ResourceType.Procedure; } - @SearchParamDefinition(name="patient", path="Procedure.patient", description="The identity of a patient to list procedures for", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="date", path="Procedure.date", description="The date the procedure was performed on", type="date" ) public static final String SP_DATE = "date"; + @SearchParamDefinition(name="patient", path="Procedure.patient", description="The identity of a patient to list procedures for", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="type", path="Procedure.type", description="Type of procedure", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java index f76aa6eac7f..67c615eb092 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -332,14 +332,14 @@ public class ProcedureRequest extends DomainResource { /** * Identifiers assigned to this order by the order or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier", formalDefinition="Identifiers assigned to this order by the order or by the receiver." ) protected List identifier; /** * The patient who will receive the procedure. */ - @Child(name="subject", type={Patient.class}, order=0, min=1, max=1) + @Child(name="subject", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Subject", formalDefinition="The patient who will receive the procedure." ) protected Reference subject; @@ -351,35 +351,35 @@ public class ProcedureRequest extends DomainResource { /** * The specific procedure that is ordered. Use text if the exact nature of the procedure can't be coded. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) @Description(shortDefinition="Procedure Type", formalDefinition="The specific procedure that is ordered. Use text if the exact nature of the procedure can't be coded." ) protected CodeableConcept type; /** * The site where the procedure is to be performed. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="bodySite", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Target Body Site", formalDefinition="The site where the procedure is to be performed." ) protected List bodySite; /** * The reason why the procedure is proposed or ordered. This procedure request may be motivated by a Condition for instance. */ - @Child(name="indication", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Indication", formalDefinition="The reason why the procedure is proposed or ordered. This procedure request may be motivated by a Condition for instance." ) protected List indication; /** * The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". */ - @Child(name="timing", type={DateTimeType.class, Period.class, Timing.class}, order=4, min=0, max=1) + @Child(name="timing", type={DateTimeType.class, Period.class, Timing.class}, order=5, min=0, max=1) @Description(shortDefinition="Timing", formalDefinition="The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'." ) protected Type timing; /** * The encounter within which the procedure proposal or request was created. */ - @Child(name="encounter", type={Encounter.class}, order=5, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=6, min=0, max=1) @Description(shortDefinition="Encounter", formalDefinition="The encounter within which the procedure proposal or request was created." ) protected Reference encounter; @@ -391,7 +391,7 @@ public class ProcedureRequest extends DomainResource { /** * E.g. surgeon, anaethetist, endoscopist. */ - @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1) + @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=7, min=0, max=1) @Description(shortDefinition="Performer", formalDefinition="E.g. surgeon, anaethetist, endoscopist." ) protected Reference performer; @@ -403,35 +403,35 @@ public class ProcedureRequest extends DomainResource { /** * The status of the order. */ - @Child(name="status", type={CodeType.class}, order=7, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the order." ) protected Enumeration status; /** * Any other notes associated with this proposal or order - e.g., provider instructions. */ - @Child(name="notes", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notes", type={StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Notes", formalDefinition="Any other notes associated with this proposal or order - e.g., provider instructions." ) protected List notes; /** * If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. */ - @Child(name="asNeeded", type={BooleanType.class, CodeableConcept.class}, order=9, min=0, max=1) + @Child(name="asNeeded", type={BooleanType.class, CodeableConcept.class}, order=10, min=0, max=1) @Description(shortDefinition="PRN", formalDefinition="If a CodeableConcept is present, it indicates the pre-condition for performing the procedure." ) protected Type asNeeded; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name="orderedOn", type={DateTimeType.class}, order=11, min=0, max=1) @Description(shortDefinition="When Requested", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The healthcare professional responsible for proposing or ordering the procedure. */ - @Child(name="orderer", type={Practitioner.class, Patient.class, RelatedPerson.class, Device.class}, order=11, min=0, max=1) + @Child(name="orderer", type={Practitioner.class, Patient.class, RelatedPerson.class, Device.class}, order=12, min=0, max=1) @Description(shortDefinition="Ordering Party", formalDefinition="The healthcare professional responsible for proposing or ordering the procedure." ) protected Reference orderer; @@ -443,7 +443,7 @@ public class ProcedureRequest extends DomainResource { /** * The clinical priority associated with this order. */ - @Child(name="priority", type={CodeType.class}, order=12, min=0, max=1) + @Child(name="priority", type={CodeType.class}, order=13, min=0, max=1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) protected Enumeration priority; @@ -1120,10 +1120,10 @@ public class ProcedureRequest extends DomainResource { return ResourceType.ProcedureRequest; } - @SearchParamDefinition(name="patient", path="ProcedureRequest.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="subject", path="ProcedureRequest.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="ProcedureRequest.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java index 58cb576a853..60353c1a4f8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2688,35 +2688,35 @@ public class ProfessionalClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class ProfessionalClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class ProfessionalClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class ProfessionalClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=7, min=0, max=1) + @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=8, min=0, max=1) + @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class ProfessionalClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=10, min=0, max=1) + @Child(name="facility", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,14 +2797,14 @@ public class ProfessionalClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=11, min=0, max=1) + @Child(name="payee", type={}, order=12, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=12, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2816,21 +2816,21 @@ public class ProfessionalClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=15, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2842,56 +2842,56 @@ public class ProfessionalClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=18, min=0, max=1) + @Child(name="school", type={StringType.class}, order=19, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=19, min=0, max=1) + @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=20, min=0, max=1) + @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additionalMaterials", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3939,14 +3939,14 @@ public class ProfessionalClaim extends DomainResource { return ResourceType.ProfessionalClaim; } + @SearchParamDefinition(name="identifier", path="ProfessionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="use", path="ProfessionalClaim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="ProfessionalClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="ProfessionalClaim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="use", path="ProfessionalClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; - @SearchParamDefinition(name="identifier", path="ProfessionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java index 169caecda26..880b73d3dcc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -501,126 +501,126 @@ public class Profile extends DomainResource { /** * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=-1, min=1, max=1) + @Child(name="url", type={UriType.class}, order=0, min=1, max=1) @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name="version", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="name", type={StringType.class}, order=2, min=1, max=1) + @Child(name="name", type={StringType.class}, order=3, min=1, max=1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType name; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name="description", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="code", type={Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * The Scope and Usage that this profile was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=10, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) protected StringType requirements; /** * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. */ - @Child(name="fhirVersion", type={IdType.class}, order=11, min=0, max=1) + @Child(name="fhirVersion", type={IdType.class}, order=12, min=0, max=1) @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) protected IdType fhirVersion; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mapping", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * The Resource or Data type being described. */ - @Child(name="type", type={CodeType.class}, order=13, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=14, min=1, max=1) @Description(shortDefinition="The Resource or Data Type being described", formalDefinition="The Resource or Data type being described." ) protected CodeType type; /** * The structure that is the base on which this set of constraints is derived from. */ - @Child(name="base", type={UriType.class}, order=14, min=0, max=1) + @Child(name="base", type={UriType.class}, order=15, min=0, max=1) @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) protected UriType base; /** * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. */ - @Child(name="snapshot", type={}, order=15, min=0, max=1) + @Child(name="snapshot", type={}, order=16, min=0, max=1) @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) protected ConstraintComponent snapshot; /** * A differential view is expressed relative to the base profile - a statement of differences that it applies. */ - @Child(name="differential", type={ConstraintComponent.class}, order=16, min=0, max=1) + @Child(name="differential", type={ConstraintComponent.class}, order=17, min=0, max=1) @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) protected ConstraintComponent differential; @@ -1486,28 +1486,28 @@ public class Profile extends DomainResource { return ResourceType.Profile; } - @SearchParamDefinition(name="valueset", path="Profile.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="status", path="Profile.status", description="The current status of the profile", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="Profile.description", description="Text search in the description of the profile", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="Profile.name", description="Name of the profile", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="code", path="Profile.code", description="A code for the profile", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="type", path="Profile.type", description="Type of resource that is constrained in the profile", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="Profile.date", description="The profile publication date", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Profile.identifier", description="The identifier of the profile", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="url", path="Profile.url", description="Literal URL used to reference this profile", type="token" ) - public static final String SP_URL = "url"; + @SearchParamDefinition(name="code", path="Profile.code", description="A code for the profile", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="valueset", path="Profile.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name="name", path="Profile.name", description="Name of the profile", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="Profile.publisher", description="Name of the publisher of the profile", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="Profile.description", description="Text search in the description of the profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="type", path="Profile.type", description="Type of resource that is constrained in the profile", type="token" ) + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="version", path="Profile.version", description="The version identifier of the profile", type="token" ) public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="Profile.url", description="Literal URL used to reference this profile", type="token" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="Profile.status", description="The current status of the profile", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java index dd18cd7e704..7e43d10576d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -666,7 +666,7 @@ public class Provenance extends DomainResource { /** * The Reference(s) that were generated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity. */ - @Child(name="target", type={}, order=-1, min=1, max=Child.MAX_UNLIMITED) + @Child(name="target", type={}, order=0, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Target Reference(s) (usually version specific)", formalDefinition="The Reference(s) that were generated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) protected List target; /** @@ -678,28 +678,28 @@ public class Provenance extends DomainResource { /** * The period during which the activity occurred. */ - @Child(name="period", type={Period.class}, order=0, min=0, max=1) + @Child(name="period", type={Period.class}, order=1, min=0, max=1) @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) protected Period period; /** * The instant of time at which the activity was recorded. */ - @Child(name="recorded", type={InstantType.class}, order=1, min=1, max=1) + @Child(name="recorded", type={InstantType.class}, order=2, min=1, max=1) @Description(shortDefinition="When the activity was recorded / updated", formalDefinition="The instant of time at which the activity was recorded." ) protected InstantType recorded; /** * The reason that the activity was taking place. */ - @Child(name="reason", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="Reason the activity is occurring", formalDefinition="The reason that the activity was taking place." ) protected CodeableConcept reason; /** * Where the activity occurred, if relevant. */ - @Child(name="location", type={Location.class}, order=3, min=0, max=1) + @Child(name="location", type={Location.class}, order=4, min=0, max=1) @Description(shortDefinition="Where the activity occurred, if relevant", formalDefinition="Where the activity occurred, if relevant." ) protected Reference location; @@ -711,28 +711,28 @@ public class Provenance extends DomainResource { /** * Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc. */ - @Child(name="policy", type={UriType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="policy", type={UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Policy or plan the activity was defined by", formalDefinition="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc." ) protected List policy; /** * An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility. */ - @Child(name="agent", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="agent", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Person, organization, records, etc. involved in creating resource", formalDefinition="An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility." ) protected List agent; /** * An entity used in this activity. */ - @Child(name="entity", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="entity", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="An entity used in this activity", formalDefinition="An entity used in this activity." ) protected List entity; /** * A digital signature on the target Reference(s). The signature should match a Provenance.agent.reference in the provenance resource. The signature is only added to support checking cryptographic integrity of the resource, and not to represent workflow and clinical aspects of the signing process, or to support non-repudiation. */ - @Child(name="integritySignature", type={StringType.class}, order=7, min=0, max=1) + @Child(name="integritySignature", type={StringType.class}, order=8, min=0, max=1) @Description(shortDefinition="Base64 signature (DigSig) - integrity check", formalDefinition="A digital signature on the target Reference(s). The signature should match a Provenance.agent.reference in the provenance resource. The signature is only added to support checking cryptographic integrity of the resource, and not to represent workflow and clinical aspects of the signing process, or to support non-repudiation." ) protected StringType integritySignature; @@ -1172,18 +1172,18 @@ public class Provenance extends DomainResource { @SearchParamDefinition(name="patient", path="", description="A patient that the target resource(s) refer to", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="location", path="Provenance.location", description="Where the activity occurred, if relevant", type="reference" ) - public static final String SP_LOCATION = "location"; @SearchParamDefinition(name="start", path="Provenance.period.start", description="Starting time with inclusive boundary", type="date" ) public static final String SP_START = "start"; - @SearchParamDefinition(name="partytype", path="Provenance.agent.type", description="e.g. Resource | Person | Application | Record | Document +", type="token" ) - public static final String SP_PARTYTYPE = "partytype"; - @SearchParamDefinition(name="target", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) - public static final String SP_TARGET = "target"; - @SearchParamDefinition(name="party", path="Provenance.agent.reference", description="Identity of agent (urn or url)", type="token" ) - public static final String SP_PARTY = "party"; @SearchParamDefinition(name="end", path="Provenance.period.end", description="End time with inclusive boundary, if not ongoing", type="date" ) public static final String SP_END = "end"; + @SearchParamDefinition(name="location", path="Provenance.location", description="Where the activity occurred, if relevant", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="partytype", path="Provenance.agent.type", description="e.g. Resource | Person | Application | Record | Document +", type="token" ) + public static final String SP_PARTYTYPE = "partytype"; + @SearchParamDefinition(name="party", path="Provenance.agent.reference", description="Identity of agent (urn or url)", type="token" ) + public static final String SP_PARTY = "party"; + @SearchParamDefinition(name="target", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) + public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java index 93886d2dcb0..4ad1a02696c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java @@ -29,11 +29,11 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; - import java.math.*; + import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; @@ -42,7 +42,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @DatatypeDef(name="Quantity") -public class Quantity extends Type implements ICompositeType { +public class Quantity extends Type implements ICompositeType { public enum QuantityComparator { /** @@ -147,35 +147,35 @@ public class Quantity extends Type implements ICompositeType { /** * The value of the measured amount. The value includes an implicit precision in the presentation of the value. */ - @Child(name="value", type={DecimalType.class}, order=-1, min=0, max=1) + @Child(name="value", type={DecimalType.class}, order=0, min=0, max=1) @Description(shortDefinition="Numerical value (with implicit precision)", formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value." ) protected DecimalType value; /** * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value. */ - @Child(name="comparator", type={CodeType.class}, order=0, min=0, max=1) + @Child(name="comparator", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="< | <= | >= | > - how to understand the value", formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is '<' , then the real value is < stated value." ) protected Enumeration comparator; /** * A human-readable form of the units. */ - @Child(name="units", type={StringType.class}, order=1, min=0, max=1) + @Child(name="units", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Unit representation", formalDefinition="A human-readable form of the units." ) protected StringType units; /** * The identification of the system that provides the coded form of the unit. */ - @Child(name="system", type={UriType.class}, order=2, min=0, max=1) + @Child(name="system", type={UriType.class}, order=3, min=0, max=1) @Description(shortDefinition="System that defines coded unit form", formalDefinition="The identification of the system that provides the coded form of the unit." ) protected UriType system; /** * A computer processable form of the units in some unit representation system. */ - @Child(name="code", type={CodeType.class}, order=3, min=0, max=1) + @Child(name="code", type={CodeType.class}, order=4, min=0, max=1) @Description(shortDefinition="Coded form of the unit", formalDefinition="A computer processable form of the units in some unit representation system." ) protected CodeType code; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java index 9b5fa393e9f..f6bc12288cc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -168,6 +168,10 @@ public class Questionnaire extends DomainResource { * Answer is a long (potentially multi-paragram) free-text entry. */ TEXT, + /** + * Answer is a url (website, FTP site, etc.). + */ + URL, /** * Answer is a choice from a list of options. */ @@ -213,6 +217,8 @@ public class Questionnaire extends DomainResource { return STRING; if ("text".equals(codeString)) return TEXT; + if ("url".equals(codeString)) + return URL; if ("choice".equals(codeString)) return CHOICE; if ("open-choice".equals(codeString)) @@ -236,6 +242,7 @@ public class Questionnaire extends DomainResource { case TIME: return "time"; case STRING: return "string"; case TEXT: return "text"; + case URL: return "url"; case CHOICE: return "choice"; case OPENCHOICE: return "open-choice"; case ATTACHMENT: return "attachment"; @@ -255,6 +262,7 @@ public class Questionnaire extends DomainResource { case TIME: return ""; case STRING: return ""; case TEXT: return ""; + case URL: return ""; case CHOICE: return ""; case OPENCHOICE: return ""; case ATTACHMENT: return ""; @@ -274,6 +282,7 @@ public class Questionnaire extends DomainResource { case TIME: return "Answer is a time independent of date."; case STRING: return "Answer is a short (few words to short sentence) free-text entry."; case TEXT: return "Answer is a long (potentially multi-paragram) free-text entry."; + case URL: return "Answer is a url (website, FTP site, etc.)."; case CHOICE: return "Answer is a choice from a list of options."; case OPENCHOICE: return "Answer is a choice from a list of options or a free-text entry."; case ATTACHMENT: return "Answer is binary content such as a image, PDF, etc."; @@ -293,6 +302,7 @@ public class Questionnaire extends DomainResource { case TIME: return "time"; case STRING: return "string"; case TEXT: return "text"; + case URL: return "url"; case CHOICE: return "choice"; case OPENCHOICE: return "open-choice"; case ATTACHMENT: return "attachment"; @@ -326,6 +336,8 @@ public class Questionnaire extends DomainResource { return AnswerFormat.STRING; if ("text".equals(codeString)) return AnswerFormat.TEXT; + if ("url".equals(codeString)) + return AnswerFormat.URL; if ("choice".equals(codeString)) return AnswerFormat.CHOICE; if ("open-choice".equals(codeString)) @@ -357,6 +369,8 @@ public class Questionnaire extends DomainResource { return "string"; if (code == AnswerFormat.TEXT) return "text"; + if (code == AnswerFormat.URL) + return "url"; if (code == AnswerFormat.CHOICE) return "choice"; if (code == AnswerFormat.OPENCHOICE) @@ -849,10 +863,10 @@ public class Questionnaire extends DomainResource { protected List concept; /** - * Text of the question as it is shown to the user. + * The actual question as shown to the user to prompt them for an answer. */ @Child(name="text", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="Text of the question as it is shown to the user." ) + @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="The actual question as shown to the user to prompt them for an answer." ) protected StringType text; /** @@ -863,17 +877,17 @@ public class Questionnaire extends DomainResource { protected Enumeration type; /** - * If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire. + * If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire. */ @Child(name="required", type={BooleanType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Must group be included in data results?", formalDefinition="If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire." ) + @Description(shortDefinition="Must question be answered in data results?", formalDefinition="If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire." ) protected BooleanType required; /** - * Whether the group may occur multiple times in the instance, containing multiple sets of answers. + * If true, the question may have more than one answer. */ @Child(name="repeats", type={BooleanType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Whether the group may repeat", formalDefinition="Whether the group may occur multiple times in the instance, containing multiple sets of answers." ) + @Description(shortDefinition="Can question have multiple answers?", formalDefinition="If true, the question may have more than one answer." ) protected BooleanType repeats; /** @@ -981,7 +995,7 @@ public class Questionnaire extends DomainResource { } /** - * @return {@link #text} (Text of the question as it is shown to the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + * @return {@link #text} (The actual question as shown to the user to prompt them for an answer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ public StringType getTextElement() { if (this.text == null) @@ -1001,7 +1015,7 @@ public class Questionnaire extends DomainResource { } /** - * @param value {@link #text} (Text of the question as it is shown to the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + * @param value {@link #text} (The actual question as shown to the user to prompt them for an answer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ public QuestionComponent setTextElement(StringType value) { this.text = value; @@ -1009,14 +1023,14 @@ public class Questionnaire extends DomainResource { } /** - * @return Text of the question as it is shown to the user. + * @return The actual question as shown to the user to prompt them for an answer. */ public String getText() { return this.text == null ? null : this.text.getValue(); } /** - * @param value Text of the question as it is shown to the user. + * @param value The actual question as shown to the user to prompt them for an answer. */ public QuestionComponent setText(String value) { if (Utilities.noString(value)) @@ -1079,7 +1093,7 @@ public class Questionnaire extends DomainResource { } /** - * @return {@link #required} (If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + * @return {@link #required} (If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value */ public BooleanType getRequiredElement() { if (this.required == null) @@ -1099,7 +1113,7 @@ public class Questionnaire extends DomainResource { } /** - * @param value {@link #required} (If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + * @param value {@link #required} (If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value */ public QuestionComponent setRequiredElement(BooleanType value) { this.required = value; @@ -1107,14 +1121,14 @@ public class Questionnaire extends DomainResource { } /** - * @return If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire. + * @return If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire. */ public boolean getRequired() { return this.required == null ? false : this.required.getValue(); } /** - * @param value If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire. + * @param value If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire. */ public QuestionComponent setRequired(boolean value) { if (this.required == null) @@ -1124,7 +1138,7 @@ public class Questionnaire extends DomainResource { } /** - * @return {@link #repeats} (Whether the group may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value + * @return {@link #repeats} (If true, the question may have more than one answer.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value */ public BooleanType getRepeatsElement() { if (this.repeats == null) @@ -1144,7 +1158,7 @@ public class Questionnaire extends DomainResource { } /** - * @param value {@link #repeats} (Whether the group may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value + * @param value {@link #repeats} (If true, the question may have more than one answer.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value */ public QuestionComponent setRepeatsElement(BooleanType value) { this.repeats = value; @@ -1152,14 +1166,14 @@ public class Questionnaire extends DomainResource { } /** - * @return Whether the group may occur multiple times in the instance, containing multiple sets of answers. + * @return If true, the question may have more than one answer. */ public boolean getRepeats() { return this.repeats == null ? false : this.repeats.getValue(); } /** - * @param value Whether the group may occur multiple times in the instance, containing multiple sets of answers. + * @param value If true, the question may have more than one answer. */ public QuestionComponent setRepeats(boolean value) { if (this.repeats == null) @@ -1246,10 +1260,10 @@ public class Questionnaire extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("linkId", "string", "An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireAnswers]]] resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); childrenList.add(new Property("concept", "Coding", "Identifies a how this question is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); - childrenList.add(new Property("text", "string", "Text of the question as it is shown to the user.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("text", "string", "The actual question as shown to the user to prompt them for an answer.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("type", "code", "The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("required", "boolean", "If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); - childrenList.add(new Property("repeats", "boolean", "Whether the group may occur multiple times in the instance, containing multiple sets of answers.", 0, java.lang.Integer.MAX_VALUE, repeats)); + childrenList.add(new Property("required", "boolean", "If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("repeats", "boolean", "If true, the question may have more than one answer.", 0, java.lang.Integer.MAX_VALUE, repeats)); childrenList.add(new Property("options", "Reference(ValueSet)", "Reference to a valueset containing the possible options.", 0, java.lang.Integer.MAX_VALUE, options)); childrenList.add(new Property("group", "@Questionnaire.group", "Nested group, containing nested question for this question. The order of groups within the question is relevant.", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -1311,46 +1325,53 @@ public class Questionnaire extends DomainResource { /** * This records identifiers associated with this question set that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this questionnaire", formalDefinition="This records identifiers associated with this question set that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of Questionnaire", formalDefinition="The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated." ) protected StringType version; /** * The lifecycle status of the questionnaire as a whole. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="draft | published | retired", formalDefinition="The lifecycle status of the questionnaire as a whole." ) protected Enumeration status; /** * The date that this questionnaire was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Date this version was authored", formalDefinition="The date that this questionnaire was last changed." ) protected DateTimeType date; /** - * Organization responsible for developing and maintaining the questionnaire. + * Organization or person responsible for developing and maintaining the questionnaire. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who designed the questionnaire", formalDefinition="Organization responsible for developing and maintaining the questionnaire." ) + @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) + @Description(shortDefinition="Organization/individual who designed the questionnaire", formalDefinition="Organization or person responsible for developing and maintaining the questionnaire." ) protected StringType publisher; + /** + * Contact details to assist a user in finding and communicating with the publisher. + */ + @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) + protected List telecom; + /** * A collection of related questions (or further groupings of questions). */ - @Child(name="group", type={}, order=4, min=1, max=1) + @Child(name="group", type={}, order=6, min=1, max=1) @Description(shortDefinition="Grouped questions", formalDefinition="A collection of related questions (or further groupings of questions)." ) protected GroupComponent group; - private static final long serialVersionUID = 2121035996L; + private static final long serialVersionUID = -852096969L; public Questionnaire() { super(); @@ -1536,7 +1557,7 @@ public class Questionnaire extends DomainResource { } /** - * @return {@link #publisher} (Organization responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @return {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public StringType getPublisherElement() { if (this.publisher == null) @@ -1556,7 +1577,7 @@ public class Questionnaire extends DomainResource { } /** - * @param value {@link #publisher} (Organization responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @param value {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public Questionnaire setPublisherElement(StringType value) { this.publisher = value; @@ -1564,14 +1585,14 @@ public class Questionnaire extends DomainResource { } /** - * @return Organization responsible for developing and maintaining the questionnaire. + * @return Organization or person responsible for developing and maintaining the questionnaire. */ public String getPublisher() { return this.publisher == null ? null : this.publisher.getValue(); } /** - * @param value Organization responsible for developing and maintaining the questionnaire. + * @param value Organization or person responsible for developing and maintaining the questionnaire. */ public Questionnaire setPublisher(String value) { if (Utilities.noString(value)) @@ -1584,6 +1605,36 @@ public class Questionnaire extends DomainResource { return this; } + /** + * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + /** * @return {@link #group} (A collection of related questions (or further groupings of questions).) */ @@ -1614,7 +1665,8 @@ public class Questionnaire extends DomainResource { childrenList.add(new Property("version", "string", "The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("date", "dateTime", "The date that this questionnaire was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("publisher", "string", "Organization responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("group", "", "A collection of related questions (or further groupings of questions).", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -1630,6 +1682,11 @@ public class Questionnaire extends DomainResource { dst.status = status == null ? null : status.copy(); dst.date = date == null ? null : date.copy(); dst.publisher = publisher == null ? null : publisher.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; dst.group = group == null ? null : group.copy(); return dst; } @@ -1646,8 +1703,8 @@ public class Questionnaire extends DomainResource { return false; Questionnaire o = (Questionnaire) other; return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(status, o.status, true) - && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(group, o.group, true) - ; + && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(group, o.group, true); } @Override @@ -1664,7 +1721,7 @@ public class Questionnaire extends DomainResource { public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (group == null || group.isEmpty()); + && (telecom == null || telecom.isEmpty()) && (group == null || group.isEmpty()); } @Override @@ -1672,20 +1729,20 @@ public class Questionnaire extends DomainResource { return ResourceType.Questionnaire; } - @SearchParamDefinition(name="title", path="", description="All or part of the name of the questionnaire (title for the root group of the questionnaire)", type="string" ) - public static final String SP_TITLE = "title"; - @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="code", path="Questionnaire.group.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token" ) - public static final String SP_CODE = "code"; @SearchParamDefinition(name="date", path="Questionnaire.date", description="When the questionnaire was last changed", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string" ) - public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="code", path="Questionnaire.group.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token" ) + public static final String SP_CODE = "code"; @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="The author of the questionnaire", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="title", path="", description="All or part of the name of the questionnaire (title for the root group of the questionnaire)", type="string" ) + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java index 886b6120c20..414cf94de59 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -503,10 +503,10 @@ public class QuestionnaireAnswers extends DomainResource { protected StringType linkId; /** - * Text of the question as it is shown to the user. + * The actual question as shown to the user to prompt them for an answer. */ @Child(name="text", type={StringType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="Text of the question as it is shown to the user." ) + @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="The actual question as shown to the user to prompt them for an answer." ) protected StringType text; /** @@ -579,7 +579,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #text} (Text of the question as it is shown to the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + * @return {@link #text} (The actual question as shown to the user to prompt them for an answer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ public StringType getTextElement() { if (this.text == null) @@ -599,7 +599,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @param value {@link #text} (Text of the question as it is shown to the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + * @param value {@link #text} (The actual question as shown to the user to prompt them for an answer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ public QuestionComponent setTextElement(StringType value) { this.text = value; @@ -607,14 +607,14 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return Text of the question as it is shown to the user. + * @return The actual question as shown to the user to prompt them for an answer. */ public String getText() { return this.text == null ? null : this.text.getValue(); } /** - * @param value Text of the question as it is shown to the user. + * @param value The actual question as shown to the user to prompt them for an answer. */ public QuestionComponent setText(String value) { if (Utilities.noString(value)) @@ -690,7 +690,7 @@ public class QuestionnaireAnswers extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("linkId", "string", "Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireAnswers resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); - childrenList.add(new Property("text", "string", "Text of the question as it is shown to the user.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("text", "string", "The actual question as shown to the user to prompt them for an answer.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer)); childrenList.add(new Property("group", "@QuestionnaireAnswers.group", "Nested group, containing nested question for this question. The order of groups within the question is relevant.", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -744,10 +744,10 @@ public class QuestionnaireAnswers extends DomainResource { @Block() public static class QuestionAnswerComponent extends BackboneElement { /** - * Single-valued answer to the question. + * The answer (or one of the answers) provided by the respondant to the question. */ - @Child(name="value", type={BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, Attachment.class, Coding.class, Quantity.class}, order=1, min=0, max=1) - @Description(shortDefinition="Single-valued answer to the question", formalDefinition="Single-valued answer to the question." ) + @Child(name="value", type={BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=1, min=0, max=1) + @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondant to the question." ) protected Type value; private static final long serialVersionUID = -732981989L; @@ -757,14 +757,14 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Type getValue() { return this.value; } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public BooleanType getValueBooleanType() throws Exception { if (!(this.value instanceof BooleanType)) @@ -773,7 +773,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public DecimalType getValueDecimalType() throws Exception { if (!(this.value instanceof DecimalType)) @@ -782,7 +782,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public IntegerType getValueIntegerType() throws Exception { if (!(this.value instanceof IntegerType)) @@ -791,7 +791,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public DateType getValueDateType() throws Exception { if (!(this.value instanceof DateType)) @@ -800,7 +800,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public DateTimeType getValueDateTimeType() throws Exception { if (!(this.value instanceof DateTimeType)) @@ -809,7 +809,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public InstantType getValueInstantType() throws Exception { if (!(this.value instanceof InstantType)) @@ -818,7 +818,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public TimeType getValueTimeType() throws Exception { if (!(this.value instanceof TimeType)) @@ -827,7 +827,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public StringType getValueStringType() throws Exception { if (!(this.value instanceof StringType)) @@ -836,7 +836,16 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + */ + public UriType getValueUriType() throws Exception { + if (!(this.value instanceof UriType)) + throw new Exception("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (UriType) this.value; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Attachment getValueAttachment() throws Exception { if (!(this.value instanceof Attachment)) @@ -845,7 +854,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Coding getValueCoding() throws Exception { if (!(this.value instanceof Coding)) @@ -854,7 +863,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Quantity getValueQuantity() throws Exception { if (!(this.value instanceof Quantity)) @@ -863,7 +872,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #value} (Single-valued answer to the question.) + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Reference getValueReference() throws Exception { if (!(this.value instanceof Reference)) @@ -876,7 +885,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @param value {@link #value} (Single-valued answer to the question.) + * @param value {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public QuestionAnswerComponent setValue(Type value) { this.value = value; @@ -885,7 +894,7 @@ public class QuestionnaireAnswers extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|Attachment|Coding|Quantity|Reference(Any)", "Single-valued answer to the question.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The answer (or one of the answers) provided by the respondant to the question.", 0, java.lang.Integer.MAX_VALUE, value)); } public QuestionAnswerComponent copy() { @@ -924,14 +933,14 @@ public class QuestionnaireAnswers extends DomainResource { /** * A business identifier assigned to a particular completed (or partially completed) questionnaire. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) @Description(shortDefinition="Unique id for this set of answers", formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) protected Identifier identifier; /** * Indicates the Questionnaire resource that defines the form for which answers are being provided. */ - @Child(name="questionnaire", type={Questionnaire.class}, order=0, min=0, max=1) + @Child(name="questionnaire", type={Questionnaire.class}, order=1, min=0, max=1) @Description(shortDefinition="Form being answered", formalDefinition="Indicates the Questionnaire resource that defines the form for which answers are being provided." ) protected Reference questionnaire; @@ -943,14 +952,14 @@ public class QuestionnaireAnswers extends DomainResource { /** * The lifecycle status of the questionnaire answers as a whole. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="in-progress | completed | amended", formalDefinition="The lifecycle status of the questionnaire answers as a whole." ) protected Enumeration status; /** * The subject of the questionnaire answers. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information. */ - @Child(name="subject", type={}, order=2, min=0, max=1) + @Child(name="subject", type={}, order=3, min=0, max=1) @Description(shortDefinition="The subject of the questions", formalDefinition="The subject of the questionnaire answers. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information." ) protected Reference subject; @@ -962,7 +971,7 @@ public class QuestionnaireAnswers extends DomainResource { /** * Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the system. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) + @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1) @Description(shortDefinition="Person who received and recorded the answers", formalDefinition="Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the system." ) protected Reference author; @@ -974,26 +983,26 @@ public class QuestionnaireAnswers extends DomainResource { /** * The date and/or time that this version of the questionnaire answers was authored. */ - @Child(name="authored", type={DateTimeType.class}, order=4, min=1, max=1) + @Child(name="authored", type={DateTimeType.class}, order=5, min=1, max=1) @Description(shortDefinition="Date this version was authored", formalDefinition="The date and/or time that this version of the questionnaire answers was authored." ) protected DateTimeType authored; /** - * The person who answered the questions about the subject. Only used when this is not the subject him/herself. + * The person who answered the questions about the subject. */ - @Child(name="source", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=5, min=0, max=1) - @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject. Only used when this is not the subject him/herself." ) + @Child(name="source", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=6, min=0, max=1) + @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject." ) protected Reference source; /** - * The actual object that is the target of the reference (The person who answered the questions about the subject. Only used when this is not the subject him/herself.) + * The actual object that is the target of the reference (The person who answered the questions about the subject.) */ protected Resource sourceTarget; /** * Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers. */ - @Child(name="encounter", type={Encounter.class}, order=6, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) @Description(shortDefinition="Primary encounter during which the answers were collected", formalDefinition="Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers." ) protected Reference encounter; @@ -1005,7 +1014,7 @@ public class QuestionnaireAnswers extends DomainResource { /** * A group of questions to a possibly similarly grouped set of questions in the questionnaire answers. */ - @Child(name="group", type={}, order=7, min=0, max=1) + @Child(name="group", type={}, order=8, min=0, max=1) @Description(shortDefinition="Grouped questions", formalDefinition="A group of questions to a possibly similarly grouped set of questions in the questionnaire answers." ) protected GroupComponent group; @@ -1258,7 +1267,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #source} (The person who answered the questions about the subject. Only used when this is not the subject him/herself.) + * @return {@link #source} (The person who answered the questions about the subject.) */ public Reference getSource() { if (this.source == null) @@ -1274,7 +1283,7 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @param value {@link #source} (The person who answered the questions about the subject. Only used when this is not the subject him/herself.) + * @param value {@link #source} (The person who answered the questions about the subject.) */ public QuestionnaireAnswers setSource(Reference value) { this.source = value; @@ -1282,14 +1291,14 @@ public class QuestionnaireAnswers extends DomainResource { } /** - * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject. Only used when this is not the subject him/herself.) + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) */ public Resource getSourceTarget() { return this.sourceTarget; } /** - * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject. Only used when this is not the subject him/herself.) + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) */ public QuestionnaireAnswers setSourceTarget(Resource value) { this.sourceTarget = value; @@ -1372,7 +1381,7 @@ public class QuestionnaireAnswers extends DomainResource { childrenList.add(new Property("subject", "Reference(Any)", "The subject of the questionnaire answers. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.", 0, java.lang.Integer.MAX_VALUE, subject)); childrenList.add(new Property("author", "Reference(Practitioner|Patient|RelatedPerson)", "Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the system.", 0, java.lang.Integer.MAX_VALUE, author)); childrenList.add(new Property("authored", "dateTime", "The date and/or time that this version of the questionnaire answers was authored.", 0, java.lang.Integer.MAX_VALUE, authored)); - childrenList.add(new Property("source", "Reference(Patient|Practitioner|RelatedPerson)", "The person who answered the questions about the subject. Only used when this is not the subject him/herself.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("source", "Reference(Patient|Practitioner|RelatedPerson)", "The person who answered the questions about the subject.", 0, java.lang.Integer.MAX_VALUE, source)); childrenList.add(new Property("encounter", "Reference(Encounter)", "Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.", 0, java.lang.Integer.MAX_VALUE, encounter)); childrenList.add(new Property("group", "", "A group of questions to a possibly similarly grouped set of questions in the questionnaire answers.", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -1431,20 +1440,20 @@ public class QuestionnaireAnswers extends DomainResource { return ResourceType.QuestionnaireAnswers; } - @SearchParamDefinition(name="author", path="QuestionnaireAnswers.author", description="The author of the questionnaire", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="questionnaire", path="QuestionnaireAnswers.questionnaire", description="The questionnaire the answers are provided for", type="reference" ) - public static final String SP_QUESTIONNAIRE = "questionnaire"; - @SearchParamDefinition(name="patient", path="QuestionnaireAnswers.subject", description="The patient that is the subject of the questionnaire", type="reference" ) - public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="authored", path="QuestionnaireAnswers.authored", description="When the questionnaire was authored", type="date" ) public static final String SP_AUTHORED = "authored"; - @SearchParamDefinition(name="status", path="QuestionnaireAnswers.status", description="The status of the questionnaire answers", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="questionnaire", path="QuestionnaireAnswers.questionnaire", description="The questionnaire the answers are provided for", type="reference" ) + public static final String SP_QUESTIONNAIRE = "questionnaire"; @SearchParamDefinition(name="subject", path="QuestionnaireAnswers.subject", description="The subject of the questionnaire", type="reference" ) public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="QuestionnaireAnswers.author", description="The author of the questionnaire", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="patient", path="QuestionnaireAnswers.subject", description="The patient that is the subject of the questionnaire", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="encounter", path="QuestionnaireAnswers.encounter", description="Encounter during which questionnaire was authored", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="status", path="QuestionnaireAnswers.status", description="The status of the questionnaire answers", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java index fe7bcf3a2e8..e525afa6695 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A set of ordered Quantities defined by a low and high limit. */ @DatatypeDef(name="Range") -public class Range extends Type implements ICompositeType { +public class Range extends Type implements ICompositeType { /** * The low limit. The boundary is inclusive. */ - @Child(name="low", type={Quantity.class}, order=-1, min=0, max=1) + @Child(name="low", type={Quantity.class}, order=0, min=0, max=1) @Description(shortDefinition="Low limit", formalDefinition="The low limit. The boundary is inclusive." ) protected Quantity low; /** * The high limit. The boundary is inclusive. */ - @Child(name="high", type={Quantity.class}, order=0, min=0, max=1) + @Child(name="high", type={Quantity.class}, order=1, min=0, max=1) @Description(shortDefinition="High limit", formalDefinition="The high limit. The boundary is inclusive." ) protected Quantity high; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java index 557e4a3ee64..a544f4bdf92 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A relationship of two Quantity values - expressed as a numerator and a denominator. */ @DatatypeDef(name="Ratio") -public class Ratio extends Type implements ICompositeType { +public class Ratio extends Type implements ICompositeType { /** * The value of the numerator. */ - @Child(name="numerator", type={Quantity.class}, order=-1, min=0, max=1) + @Child(name="numerator", type={Quantity.class}, order=0, min=0, max=1) @Description(shortDefinition="Numerator value", formalDefinition="The value of the numerator." ) protected Quantity numerator; /** * The value of the denominator. */ - @Child(name="denominator", type={Quantity.class}, order=0, min=0, max=1) + @Child(name="denominator", type={Quantity.class}, order=1, min=0, max=1) @Description(shortDefinition="Denominator value", formalDefinition="The value of the denominator." ) protected Quantity denominator; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java index 7b5b708be93..963adddb036 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -151,35 +151,35 @@ public class Readjudicate extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -191,7 +191,7 @@ public class Readjudicate extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -203,7 +203,7 @@ public class Readjudicate extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -215,7 +215,7 @@ public class Readjudicate extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=6, min=0, max=1) + @Child(name="request", type={}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -227,7 +227,7 @@ public class Readjudicate extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=7, min=0, max=1) + @Child(name="response", type={}, order=8, min=0, max=1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -239,14 +239,14 @@ public class Readjudicate extends DomainResource { /** * A reference to supply which authenticated the process. */ - @Child(name="reference", type={StringType.class}, order=8, min=0, max=1) + @Child(name="reference", type={StringType.class}, order=9, min=0, max=1) @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticated the process." ) protected StringType reference; /** * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. */ - @Child(name="item", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) protected List item; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java index afdcf58c1db..22a11aa7110 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java @@ -29,53 +29,94 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.util.*; +import java.util.List; -import org.hl7.fhir.utilities.Utilities; +import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.annotations.DatatypeDef; +import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IReference; +import org.hl7.fhir.utilities.Utilities; /** * A reference from one resource to another. */ @DatatypeDef(name="Reference") public class Reference extends Type implements IReference, ICompositeType { + + /** + * Constructor + */ + public Reference() { + super(); + } + + /** + * Constructor + */ + public Reference(IAnyResource theResource) { + this.resource = theResource; + } + + /** + * Constructor + */ + public Reference(StringType theReference) { + this.reference = theReference; + } + + /** + * Constructor + */ + public Reference(String theReference) { + if (StringUtils.isNotBlank(theReference)) { + this.reference = new StringType(theReference); + } + } + + /** + * This is not a part of the "wire format" resource, but can be changed/accessed by parsers + */ + private transient IAnyResource resource; + /** + * Retrieves the actual resource referenced by this reference. Note that the resource itself is not + * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property + * may be changed/accessed by parsers. + */ + public IAnyResource getResource() { + return resource; + } + + /** + * Sets the actual resource referenced by this reference. Note that the resource itself is not + * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property + * may be changed/accessed by parsers. + */ + public void setResource(IAnyResource theResource) { + resource = theResource; + } + + /** * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. */ - @Child(name="reference", type={StringType.class}, order=-1, min=0, max=1) + @Child(name="reference", type={StringType.class}, order=0, min=0, max=1) @Description(shortDefinition="Relative, internal or absolute URL reference", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) protected StringType reference; /** * Plain text narrative that identifies the resource in addition to the resource reference. */ - @Child(name="display", type={StringType.class}, order=0, min=0, max=1) + @Child(name="display", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) protected StringType display; - private IAnyResource myResource; - private static final long serialVersionUID = 22777321L; - public Reference() { - super(); - } - - public Reference(IAnyResource theResource) { - myResource = theResource; - } - - public Reference(String theReference) { - setReference(theReference); - } - - /** + /** * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value */ public StringType getReferenceElement() { @@ -216,16 +257,6 @@ public class Reference extends Type implements IReference, ICompositeType { ; } - @Override - public IAnyResource getResource() { - return myResource; - } - - @Override - public void setResource(IAnyResource theResource) { - myResource = theResource; - } - } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java index 4462b11bf23..5d97755f403 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -176,42 +176,42 @@ public class ReferralRequest extends DomainResource { /** * The workflow status of the referral or transfer of care request. */ - @Child(name="status", type={CodeType.class}, order=-1, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) @Description(shortDefinition="draft | sent | active | cancelled | refused | completed", formalDefinition="The workflow status of the referral or transfer of care request." ) protected Enumeration status; /** * Business Id that uniquely identifies the referral/care transfer request instance. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier of request", formalDefinition="Business Id that uniquely identifies the referral/care transfer request instance." ) protected List identifier; /** * An indication of the type of referral (or where applicable the type of transfer of care) request. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="Referral/Transition of care request type", formalDefinition="An indication of the type of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept type; /** * Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. */ - @Child(name="specialty", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name="specialty", type={CodeableConcept.class}, order=3, min=0, max=1) @Description(shortDefinition="The clinical specialty (discipline) that the referral is requested for", formalDefinition="Indication of the clinical domain or discipline to which the referral or transfer of care request is sent." ) protected CodeableConcept specialty; /** * An indication of the urgency of referral (or where applicable the type of transfer of care) request. */ - @Child(name="priority", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name="priority", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="Urgency of referral / transfer of care request", formalDefinition="An indication of the urgency of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept priority; /** * The patient who is the subject of a referral or transfer of care request. */ - @Child(name="patient", type={Patient.class}, order=4, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=5, min=0, max=1) @Description(shortDefinition="Patient referred to care or transfer", formalDefinition="The patient who is the subject of a referral or transfer of care request." ) protected Reference patient; @@ -223,7 +223,7 @@ public class ReferralRequest extends DomainResource { /** * The healthcare provider or provider organization who/which initaited the referral/transfer of care request. Can also be Patient (a self referral). */ - @Child(name="requester", type={Practitioner.class, Organization.class, Patient.class}, order=5, min=0, max=1) + @Child(name="requester", type={Practitioner.class, Organization.class, Patient.class}, order=6, min=0, max=1) @Description(shortDefinition="Requester of referral / transfer of care", formalDefinition="The healthcare provider or provider organization who/which initaited the referral/transfer of care request. Can also be Patient (a self referral)." ) protected Reference requester; @@ -235,7 +235,7 @@ public class ReferralRequest extends DomainResource { /** * The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request. */ - @Child(name="recipient", type={Practitioner.class, Organization.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="recipient", type={Practitioner.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Receiver of referral / transfer of care request", formalDefinition="The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request." ) protected List recipient; /** @@ -247,7 +247,7 @@ public class ReferralRequest extends DomainResource { /** * The encounter at which the request for referral or transfer of care is initiated. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) @Description(shortDefinition="Encounter", formalDefinition="The encounter at which the request for referral or transfer of care is initiated." ) protected Reference encounter; @@ -259,35 +259,35 @@ public class ReferralRequest extends DomainResource { /** * Date/DateTime the request for referral or transfer of care is sent by the author. */ - @Child(name="dateSent", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name="dateSent", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date referral/transfer of care request is sent", formalDefinition="Date/DateTime the request for referral or transfer of care is sent by the author." ) protected DateTimeType dateSent; /** * Description of clinical condition indicating why referral/transfer of care is requested. */ - @Child(name="reason", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=1) @Description(shortDefinition="Reason for referral / Transfer of care request", formalDefinition="Description of clinical condition indicating why referral/transfer of care is requested." ) protected CodeableConcept reason; /** * The reason gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. */ - @Child(name="description", type={StringType.class}, order=10, min=0, max=1) + @Child(name="description", type={StringType.class}, order=11, min=0, max=1) @Description(shortDefinition="A textual description of the referral", formalDefinition="The reason gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary." ) protected StringType description; /** * The service(s) that is/are requested to be provided to the patient. */ - @Child(name="serviceRequested", type={CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="serviceRequested", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Service(s) requested", formalDefinition="The service(s) that is/are requested to be provided to the patient." ) protected List serviceRequested; /** * Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. */ - @Child(name="supportingInformation", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name="supportingInformation", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additonal information to support referral or transfer of care request", formalDefinition="Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care." ) protected List supportingInformation; /** @@ -299,7 +299,7 @@ public class ReferralRequest extends DomainResource { /** * The period of time within which the services identified in the referral/transfer of care is specified or required to occur. */ - @Child(name="fulfillmentTime", type={Period.class}, order=13, min=0, max=1) + @Child(name="fulfillmentTime", type={Period.class}, order=14, min=0, max=1) @Description(shortDefinition="Requested service(s) fulfillment time", formalDefinition="The period of time within which the services identified in the referral/transfer of care is specified or required to occur." ) protected Period fulfillmentTime; @@ -943,18 +943,18 @@ public class ReferralRequest extends DomainResource { return ResourceType.ReferralRequest; } - @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="ReferralRequest.status", description="The status of the referral", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="priority", path="ReferralRequest.priority", description="The priority assigned to the referral", type="token" ) - public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="type", path="ReferralRequest.type", description="The type of the referral", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="specialty", path="ReferralRequest.specialty", description="The specialty that the referral is for", type="token" ) public static final String SP_SPECIALTY = "specialty"; + @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="recipient", path="ReferralRequest.recipient", description="The person that the referral was sent to", type="reference" ) public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="type", path="ReferralRequest.type", description="The type of the referral", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="priority", path="ReferralRequest.priority", description="The priority assigned to the referral", type="token" ) + public static final String SP_PRIORITY = "priority"; + @SearchParamDefinition(name="status", path="ReferralRequest.status", description="The status of the referral", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java index cb0bcfc4097..01cdafa5d79 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -148,14 +148,14 @@ public class RelatedPerson extends DomainResource { /** * Identifier for a person within a particular scope. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A Human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) protected List identifier; /** * The patient this person is related to. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="The patient this person is related to", formalDefinition="The patient this person is related to." ) protected Reference patient; @@ -167,49 +167,49 @@ public class RelatedPerson extends DomainResource { /** * The nature of the relationship between a patient and the related person. */ - @Child(name="relationship", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name="relationship", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="The nature of the relationship", formalDefinition="The nature of the relationship between a patient and the related person." ) protected CodeableConcept relationship; /** * A name associated with the person. */ - @Child(name="name", type={HumanName.class}, order=2, min=0, max=1) + @Child(name="name", type={HumanName.class}, order=3, min=0, max=1) @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) protected HumanName name; /** * A contact detail for the person, e.g. a telephone number or an email address. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) protected List telecom; /** * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=4, min=0, max=1) + @Child(name="gender", type={CodeType.class}, order=5, min=0, max=1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) protected Enumeration gender; /** * Address where the related person can be contacted or visited. */ - @Child(name="address", type={Address.class}, order=5, min=0, max=1) + @Child(name="address", type={Address.class}, order=6, min=0, max=1) @Description(shortDefinition="Address where the related person can be contacted or visited", formalDefinition="Address where the related person can be contacted or visited." ) protected Address address; /** * Image of the person. */ - @Child(name="photo", type={Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="photo", type={Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) protected List photo; /** * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown. */ - @Child(name="period", type={Period.class}, order=7, min=0, max=1) + @Child(name="period", type={Period.class}, order=8, min=0, max=1) @Description(shortDefinition="Period of time that this relationship is considered valid", formalDefinition="The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown." ) protected Period period; @@ -582,20 +582,20 @@ public class RelatedPerson extends DomainResource { return ResourceType.RelatedPerson; } - @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string" ) public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" ) + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact", type="string" ) public static final String SP_TELECOM = "telecom"; - @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token" ) - public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java index 07b5fbbbe3b..268fb0fba41 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -49,28 +49,28 @@ public abstract class Resource extends Base implements IAnyResource { /** * The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes. */ - @Child(name="id", type={IdType.class}, order=-1, min=0, max=1) + @Child(name="id", type={IdType.class}, order=0, min=0, max=1) @Description(shortDefinition="Logical id of this artefact", formalDefinition="The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes." ) protected IdType id; /** * The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ - @Child(name="meta", type={Meta.class}, order=0, min=0, max=1) + @Child(name="meta", type={Meta.class}, order=1, min=0, max=1) @Description(shortDefinition="Metadata about the resource", formalDefinition="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource." ) protected Meta meta; /** * A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. */ - @Child(name="implicitRules", type={UriType.class}, order=1, min=0, max=1) + @Child(name="implicitRules", type={UriType.class}, order=2, min=0, max=1) @Description(shortDefinition="A set of rules under which this content was created", formalDefinition="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content." ) protected UriType implicitRules; /** * The base language in which the resource is written. */ - @Child(name="language", type={CodeType.class}, order=2, min=0, max=1) + @Child(name="language", type={CodeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Language of the resource content", formalDefinition="The base language in which the resource is written." ) protected CodeType language; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java index aa6b5985133..5fd39d1680d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java @@ -29,266 +29,266 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 public class ResourceFactory extends Factory { public static Resource createReference(String name) throws Exception { - if ("Condition".equals(name)) - return new Condition(); - if ("Parameters".equals(name)) - return new Parameters(); - if ("Supply".equals(name)) - return new Supply(); - if ("VisionClaim".equals(name)) - return new VisionClaim(); - if ("ProcedureRequest".equals(name)) - return new ProcedureRequest(); - if ("DeviceComponent".equals(name)) - return new DeviceComponent(); - if ("DeviceMetric".equals(name)) - return new DeviceMetric(); - if ("Communication".equals(name)) - return new Communication(); - if ("Organization".equals(name)) - return new Organization(); - if ("Readjudicate".equals(name)) - return new Readjudicate(); - if ("Group".equals(name)) - return new Group(); - if ("ValueSet".equals(name)) - return new ValueSet(); - if ("OralHealthClaim".equals(name)) - return new OralHealthClaim(); - if ("ImmunizationRecommendation".equals(name)) - return new ImmunizationRecommendation(); - if ("Coverage".equals(name)) - return new Coverage(); if ("Appointment".equals(name)) return new Appointment(); - if ("MedicationDispense".equals(name)) - return new MedicationDispense(); - if ("MedicationPrescription".equals(name)) - return new MedicationPrescription(); - if ("Slot".equals(name)) - return new Slot(); - if ("PaymentNotice".equals(name)) - return new PaymentNotice(); - if ("Contraindication".equals(name)) - return new Contraindication(); - if ("AppointmentResponse".equals(name)) - return new AppointmentResponse(); - if ("MedicationStatement".equals(name)) - return new MedicationStatement(); - if ("Questionnaire".equals(name)) - return new Questionnaire(); - if ("Composition".equals(name)) - return new Composition(); - if ("EpisodeOfCare".equals(name)) - return new EpisodeOfCare(); - if ("OperationOutcome".equals(name)) - return new OperationOutcome(); - if ("Conformance".equals(name)) - return new Conformance(); - if ("NamingSystem".equals(name)) - return new NamingSystem(); - if ("Media".equals(name)) - return new Media(); - if ("Binary".equals(name)) - return new Binary(); - if ("Other".equals(name)) - return new Other(); - if ("HealthcareService".equals(name)) - return new HealthcareService(); - if ("Profile".equals(name)) - return new Profile(); - if ("VisionPrescription".equals(name)) - return new VisionPrescription(); - if ("DocumentReference".equals(name)) - return new DocumentReference(); - if ("Immunization".equals(name)) - return new Immunization(); - if ("Bundle".equals(name)) - return new Bundle(); - if ("ExtensionDefinition".equals(name)) - return new ExtensionDefinition(); + if ("ReferralRequest".equals(name)) + return new ReferralRequest(); + if ("OralHealthClaim".equals(name)) + return new OralHealthClaim(); + if ("DocumentManifest".equals(name)) + return new DocumentManifest(); + if ("Goal".equals(name)) + return new Goal(); + if ("EnrollmentRequest".equals(name)) + return new EnrollmentRequest(); + if ("FamilyHistory".equals(name)) + return new FamilyHistory(); + if ("Medication".equals(name)) + return new Medication(); if ("Subscription".equals(name)) return new Subscription(); + if ("DocumentReference".equals(name)) + return new DocumentReference(); + if ("SecurityEvent".equals(name)) + return new SecurityEvent(); + if ("Parameters".equals(name)) + return new Parameters(); + if ("Conformance".equals(name)) + return new Conformance(); + if ("RelatedPerson".equals(name)) + return new RelatedPerson(); + if ("Practitioner".equals(name)) + return new Practitioner(); + if ("Slot".equals(name)) + return new Slot(); + if ("Contraindication".equals(name)) + return new Contraindication(); + if ("Contract".equals(name)) + return new Contract(); + if ("Person".equals(name)) + return new Person(); + if ("RiskAssessment".equals(name)) + return new RiskAssessment(); + if ("Group".equals(name)) + return new Group(); + if ("PaymentNotice".equals(name)) + return new PaymentNotice(); + if ("Organization".equals(name)) + return new Organization(); + if ("Supply".equals(name)) + return new Supply(); + if ("ImagingStudy".equals(name)) + return new ImagingStudy(); + if ("Profile".equals(name)) + return new Profile(); + if ("DeviceComponent".equals(name)) + return new DeviceComponent(); + if ("Encounter".equals(name)) + return new Encounter(); + if ("Substance".equals(name)) + return new Substance(); + if ("SearchParameter".equals(name)) + return new SearchParameter(); + if ("Communication".equals(name)) + return new Communication(); if ("OrderResponse".equals(name)) return new OrderResponse(); if ("StatusResponse".equals(name)) return new StatusResponse(); - if ("ConceptMap".equals(name)) - return new ConceptMap(); - if ("PharmacyClaim".equals(name)) - return new PharmacyClaim(); - if ("Reversal".equals(name)) - return new Reversal(); - if ("ImagingStudy".equals(name)) - return new ImagingStudy(); - if ("Practitioner".equals(name)) - return new Practitioner(); - if ("Provenance".equals(name)) - return new Provenance(); - if ("CarePlan".equals(name)) - return new CarePlan(); - if ("Device".equals(name)) - return new Device(); - if ("StructureDefinition".equals(name)) - return new StructureDefinition(); - if ("Order".equals(name)) - return new Order(); - if ("ClinicalAssessment".equals(name)) - return new ClinicalAssessment(); - if ("Procedure".equals(name)) - return new Procedure(); - if ("Substance".equals(name)) - return new Substance(); - if ("DeviceUseRequest".equals(name)) - return new DeviceUseRequest(); - if ("DiagnosticReport".equals(name)) - return new DiagnosticReport(); - if ("Medication".equals(name)) - return new Medication(); - if ("MessageHeader".equals(name)) - return new MessageHeader(); - if ("DataElement".equals(name)) - return new DataElement(); - if ("DocumentManifest".equals(name)) - return new DocumentManifest(); - if ("Schedule".equals(name)) - return new Schedule(); - if ("EligibilityRequest".equals(name)) - return new EligibilityRequest(); - if ("MedicationAdministration".equals(name)) - return new MedicationAdministration(); - if ("QuestionnaireAnswers".equals(name)) - return new QuestionnaireAnswers(); - if ("Encounter".equals(name)) - return new Encounter(); - if ("SecurityEvent".equals(name)) - return new SecurityEvent(); - if ("PaymentReconciliation".equals(name)) - return new PaymentReconciliation(); - if ("PendedRequest".equals(name)) - return new PendedRequest(); - if ("List".equals(name)) - return new List_(); - if ("ProfessionalClaim".equals(name)) - return new ProfessionalClaim(); + if ("VisionClaim".equals(name)) + return new VisionClaim(); if ("DeviceUseStatement".equals(name)) return new DeviceUseStatement(); - if ("Goal".equals(name)) - return new Goal(); - if ("ImagingObjectSelection".equals(name)) - return new ImagingObjectSelection(); - if ("OperationDefinition".equals(name)) - return new OperationDefinition(); - if ("SearchParameter".equals(name)) - return new SearchParameter(); - if ("NutritionOrder".equals(name)) - return new NutritionOrder(); - if ("ClaimResponse".equals(name)) - return new ClaimResponse(); - if ("ReferralRequest".equals(name)) - return new ReferralRequest(); + if ("Reversal".equals(name)) + return new Reversal(); + if ("MessageHeader".equals(name)) + return new MessageHeader(); + if ("PharmacyClaim".equals(name)) + return new PharmacyClaim(); + if ("ImmunizationRecommendation".equals(name)) + return new ImmunizationRecommendation(); + if ("Other".equals(name)) + return new Other(); if ("BodySite".equals(name)) return new BodySite(); - if ("CommunicationRequest".equals(name)) - return new CommunicationRequest(); - if ("RiskAssessment".equals(name)) - return new RiskAssessment(); - if ("FamilyHistory".equals(name)) - return new FamilyHistory(); - if ("EnrollmentRequest".equals(name)) - return new EnrollmentRequest(); - if ("Location".equals(name)) - return new Location(); - if ("Observation".equals(name)) - return new Observation(); - if ("AllergyIntolerance".equals(name)) - return new AllergyIntolerance(); + if ("Provenance".equals(name)) + return new Provenance(); + if ("Questionnaire".equals(name)) + return new Questionnaire(); + if ("ProfessionalClaim".equals(name)) + return new ProfessionalClaim(); if ("ExplanationOfBenefit".equals(name)) return new ExplanationOfBenefit(); - if ("Contract".equals(name)) - return new Contract(); - if ("SupportingDocumentation".equals(name)) - return new SupportingDocumentation(); - if ("RelatedPerson".equals(name)) - return new RelatedPerson(); - if ("Basic".equals(name)) - return new Basic(); - if ("Specimen".equals(name)) - return new Specimen(); if ("InstitutionalClaim".equals(name)) return new InstitutionalClaim(); - if ("Alert".equals(name)) - return new Alert(); - if ("EnrollmentResponse".equals(name)) - return new EnrollmentResponse(); - if ("Patient".equals(name)) - return new Patient(); + if ("Specimen".equals(name)) + return new Specimen(); + if ("AllergyIntolerance".equals(name)) + return new AllergyIntolerance(); + if ("CarePlan".equals(name)) + return new CarePlan(); + if ("StructureDefinition".equals(name)) + return new StructureDefinition(); + if ("EpisodeOfCare".equals(name)) + return new EpisodeOfCare(); + if ("MedicationPrescription".equals(name)) + return new MedicationPrescription(); + if ("OperationOutcome".equals(name)) + return new OperationOutcome(); + if ("Procedure".equals(name)) + return new Procedure(); + if ("List".equals(name)) + return new List_(); + if ("ConceptMap".equals(name)) + return new ConceptMap(); + if ("ValueSet".equals(name)) + return new ValueSet(); + if ("OperationDefinition".equals(name)) + return new OperationDefinition(); + if ("Order".equals(name)) + return new Order(); + if ("Immunization".equals(name)) + return new Immunization(); + if ("Device".equals(name)) + return new Device(); + if ("VisionPrescription".equals(name)) + return new VisionPrescription(); + if ("Media".equals(name)) + return new Media(); + if ("ProcedureRequest".equals(name)) + return new ProcedureRequest(); if ("EligibilityResponse".equals(name)) return new EligibilityResponse(); - if ("CarePlan2".equals(name)) - return new CarePlan2(); + if ("DeviceUseRequest".equals(name)) + return new DeviceUseRequest(); + if ("DeviceMetric".equals(name)) + return new DeviceMetric(); + if ("AppointmentResponse".equals(name)) + return new AppointmentResponse(); + if ("Observation".equals(name)) + return new Observation(); + if ("MedicationAdministration".equals(name)) + return new MedicationAdministration(); + if ("EnrollmentResponse".equals(name)) + return new EnrollmentResponse(); + if ("Binary".equals(name)) + return new Binary(); + if ("MedicationStatement".equals(name)) + return new MedicationStatement(); + if ("CommunicationRequest".equals(name)) + return new CommunicationRequest(); + if ("PendedRequest".equals(name)) + return new PendedRequest(); + if ("Basic".equals(name)) + return new Basic(); if ("StatusRequest".equals(name)) return new StatusRequest(); - if ("Person".equals(name)) - return new Person(); + if ("ClaimResponse".equals(name)) + return new ClaimResponse(); + if ("EligibilityRequest".equals(name)) + return new EligibilityRequest(); + if ("MedicationDispense".equals(name)) + return new MedicationDispense(); + if ("DiagnosticReport".equals(name)) + return new DiagnosticReport(); + if ("ImagingObjectSelection".equals(name)) + return new ImagingObjectSelection(); + if ("HealthcareService".equals(name)) + return new HealthcareService(); + if ("CarePlan2".equals(name)) + return new CarePlan2(); + if ("DataElement".equals(name)) + return new DataElement(); + if ("ClinicalAssessment".equals(name)) + return new ClinicalAssessment(); + if ("QuestionnaireAnswers".equals(name)) + return new QuestionnaireAnswers(); + if ("Readjudicate".equals(name)) + return new Readjudicate(); + if ("NutritionOrder".equals(name)) + return new NutritionOrder(); + if ("PaymentReconciliation".equals(name)) + return new PaymentReconciliation(); + if ("Condition".equals(name)) + return new Condition(); + if ("Composition".equals(name)) + return new Composition(); + if ("Bundle".equals(name)) + return new Bundle(); if ("DiagnosticOrder".equals(name)) return new DiagnosticOrder(); + if ("Patient".equals(name)) + return new Patient(); + if ("Coverage".equals(name)) + return new Coverage(); + if ("ExtensionDefinition".equals(name)) + return new ExtensionDefinition(); + if ("NamingSystem".equals(name)) + return new NamingSystem(); + if ("Schedule".equals(name)) + return new Schedule(); + if ("SupportingDocumentation".equals(name)) + return new SupportingDocumentation(); + if ("Alert".equals(name)) + return new Alert(); + if ("Location".equals(name)) + return new Location(); else throw new Exception("Unknown Resource Name '"+name+"'"); } public static Element createType(String name) throws Exception { - if ("Timing".equals(name)) - return new Timing(); - if ("Period".equals(name)) - return new Period(); - if ("Coding".equals(name)) - return new Coding(); - if ("Age".equals(name)) - return new Age(); - if ("Range".equals(name)) - return new Range(); - if ("Count".equals(name)) - return new Count(); - if ("Quantity".equals(name)) - return new Quantity(); - if ("Attachment".equals(name)) - return new Attachment(); - if ("Money".equals(name)) - return new Money(); - if ("Distance".equals(name)) - return new Distance(); - if ("ContactPoint".equals(name)) - return new ContactPoint(); - if ("ElementDefinition".equals(name)) - return new ElementDefinition(); - if ("Extension".equals(name)) - return new Extension(); - if ("HumanName".equals(name)) - return new HumanName(); - if ("Address".equals(name)) - return new Address(); - if ("Duration".equals(name)) - return new Duration(); - if ("Ratio".equals(name)) - return new Ratio(); if ("Meta".equals(name)) return new Meta(); - if ("SampledData".equals(name)) - return new SampledData(); + if ("Address".equals(name)) + return new Address(); if ("Reference".equals(name)) return new Reference(); - if ("CodeableConcept".equals(name)) - return new CodeableConcept(); + if ("Quantity".equals(name)) + return new Quantity(); + if ("Period".equals(name)) + return new Period(); + if ("Attachment".equals(name)) + return new Attachment(); + if ("Duration".equals(name)) + return new Duration(); + if ("Count".equals(name)) + return new Count(); + if ("Range".equals(name)) + return new Range(); + if ("Extension".equals(name)) + return new Extension(); + if ("Money".equals(name)) + return new Money(); + if ("HumanName".equals(name)) + return new HumanName(); + if ("ContactPoint".equals(name)) + return new ContactPoint(); if ("Identifier".equals(name)) return new Identifier(); if ("Narrative".equals(name)) return new Narrative(); + if ("Coding".equals(name)) + return new Coding(); + if ("SampledData".equals(name)) + return new SampledData(); + if ("Ratio".equals(name)) + return new Ratio(); + if ("Timing".equals(name)) + return new Timing(); + if ("ElementDefinition".equals(name)) + return new ElementDefinition(); + if ("Distance".equals(name)) + return new Distance(); + if ("Age".equals(name)) + return new Age(); + if ("CodeableConcept".equals(name)) + return new CodeableConcept(); else throw new Exception("Unknown Type Name '"+name+"'"); } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java index 71cc5e20a4d..87c164e03c0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java @@ -1,316 +1,316 @@ package org.hl7.fhir.instance.model; -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 public enum ResourceType { - Condition, - Supply, - DeviceComponent, - Communication, - Group, - ValueSet, - OralHealthClaim, - Coverage, Appointment, + ReferralRequest, + OralHealthClaim, + DocumentManifest, + Goal, + EnrollmentRequest, + FamilyHistory, + Medication, + Subscription, + DocumentReference, + SecurityEvent, + Conformance, + RelatedPerson, + Practitioner, Slot, Contraindication, - EpisodeOfCare, - Composition, - Conformance, - NamingSystem, + Contract, + Person, + RiskAssessment, + Group, + PaymentNotice, + Organization, + Supply, + ImagingStudy, Profile, - HealthcareService, + DeviceComponent, + Encounter, + Substance, + SearchParameter, + Communication, OrderResponse, StatusResponse, - ConceptMap, - PharmacyClaim, - Reversal, - Practitioner, - CarePlan, - ClinicalAssessment, - Substance, - DeviceUseRequest, - Schedule, - EligibilityRequest, - QuestionnaireAnswers, - PaymentReconciliation, - ProfessionalClaim, - ImagingObjectSelection, - OperationDefinition, - ClaimResponse, - BodySite, - CommunicationRequest, - RiskAssessment, - Observation, - AllergyIntolerance, - ExplanationOfBenefit, - SupportingDocumentation, - RelatedPerson, - InstitutionalClaim, - Alert, - EligibilityResponse, - Person, - StatusRequest, - ProcedureRequest, VisionClaim, - DeviceMetric, - Organization, - Readjudicate, - ImmunizationRecommendation, - MedicationDispense, - MedicationPrescription, - PaymentNotice, - MedicationStatement, - AppointmentResponse, - Questionnaire, - OperationOutcome, - Media, - Binary, - Other, - VisionPrescription, - DocumentReference, - Immunization, - ExtensionDefinition, - Bundle, - Subscription, - ImagingStudy, - Provenance, - Device, - StructureDefinition, - Order, - Procedure, - DiagnosticReport, - Medication, - MessageHeader, - DocumentManifest, - DataElement, - MedicationAdministration, - Encounter, - SecurityEvent, - PendedRequest, - List, DeviceUseStatement, - Goal, - NutritionOrder, - SearchParameter, - ReferralRequest, - FamilyHistory, - EnrollmentRequest, - Location, - Contract, - Basic, + Reversal, + MessageHeader, + PharmacyClaim, + ImmunizationRecommendation, + Other, + BodySite, + Provenance, + Questionnaire, + ProfessionalClaim, + ExplanationOfBenefit, + InstitutionalClaim, Specimen, + AllergyIntolerance, + CarePlan, + StructureDefinition, + EpisodeOfCare, + MedicationPrescription, + OperationOutcome, + Procedure, + List, + ConceptMap, + ValueSet, + OperationDefinition, + Order, + Immunization, + Device, + VisionPrescription, + Media, + ProcedureRequest, + EligibilityResponse, + DeviceUseRequest, + DeviceMetric, + AppointmentResponse, + Observation, + MedicationAdministration, EnrollmentResponse, - Patient, + Binary, + MedicationStatement, + CommunicationRequest, + PendedRequest, + Basic, + StatusRequest, + ClaimResponse, + EligibilityRequest, + MedicationDispense, + DiagnosticReport, + ImagingObjectSelection, + HealthcareService, CarePlan2, + DataElement, + ClinicalAssessment, + QuestionnaireAnswers, + Readjudicate, + NutritionOrder, + PaymentReconciliation, + Condition, + Composition, + Bundle, DiagnosticOrder, + Patient, + Coverage, + ExtensionDefinition, + NamingSystem, + Schedule, + SupportingDocumentation, + Alert, + Location, Parameters; public String getPath() {; switch (this) { - case Condition: - return "condition"; - case Supply: - return "supply"; - case DeviceComponent: - return "devicecomponent"; - case Communication: - return "communication"; - case Group: - return "group"; - case ValueSet: - return "valueset"; - case OralHealthClaim: - return "oralhealthclaim"; - case Coverage: - return "coverage"; case Appointment: return "appointment"; + case ReferralRequest: + return "referralrequest"; + case OralHealthClaim: + return "oralhealthclaim"; + case DocumentManifest: + return "documentmanifest"; + case Goal: + return "goal"; + case EnrollmentRequest: + return "enrollmentrequest"; + case FamilyHistory: + return "familyhistory"; + case Medication: + return "medication"; + case Subscription: + return "subscription"; + case DocumentReference: + return "documentreference"; + case SecurityEvent: + return "securityevent"; + case Conformance: + return "conformance"; + case RelatedPerson: + return "relatedperson"; + case Practitioner: + return "practitioner"; case Slot: return "slot"; case Contraindication: return "contraindication"; - case EpisodeOfCare: - return "episodeofcare"; - case Composition: - return "composition"; - case Conformance: - return "conformance"; - case NamingSystem: - return "namingsystem"; + case Contract: + return "contract"; + case Person: + return "person"; + case RiskAssessment: + return "riskassessment"; + case Group: + return "group"; + case PaymentNotice: + return "paymentnotice"; + case Organization: + return "organization"; + case Supply: + return "supply"; + case ImagingStudy: + return "imagingstudy"; case Profile: return "profile"; - case HealthcareService: - return "healthcareservice"; + case DeviceComponent: + return "devicecomponent"; + case Encounter: + return "encounter"; + case Substance: + return "substance"; + case SearchParameter: + return "searchparameter"; + case Communication: + return "communication"; case OrderResponse: return "orderresponse"; case StatusResponse: return "statusresponse"; - case ConceptMap: - return "conceptmap"; - case PharmacyClaim: - return "pharmacyclaim"; - case Reversal: - return "reversal"; - case Practitioner: - return "practitioner"; - case CarePlan: - return "careplan"; - case ClinicalAssessment: - return "clinicalassessment"; - case Substance: - return "substance"; - case DeviceUseRequest: - return "deviceuserequest"; - case Schedule: - return "schedule"; - case EligibilityRequest: - return "eligibilityrequest"; - case QuestionnaireAnswers: - return "questionnaireanswers"; - case PaymentReconciliation: - return "paymentreconciliation"; - case ProfessionalClaim: - return "professionalclaim"; - case ImagingObjectSelection: - return "imagingobjectselection"; - case OperationDefinition: - return "operationdefinition"; - case ClaimResponse: - return "claimresponse"; - case BodySite: - return "bodysite"; - case CommunicationRequest: - return "communicationrequest"; - case RiskAssessment: - return "riskassessment"; - case Observation: - return "observation"; - case AllergyIntolerance: - return "allergyintolerance"; - case ExplanationOfBenefit: - return "explanationofbenefit"; - case SupportingDocumentation: - return "supportingdocumentation"; - case RelatedPerson: - return "relatedperson"; - case InstitutionalClaim: - return "institutionalclaim"; - case Alert: - return "alert"; - case EligibilityResponse: - return "eligibilityresponse"; - case Person: - return "person"; - case StatusRequest: - return "statusrequest"; - case ProcedureRequest: - return "procedurerequest"; case VisionClaim: return "visionclaim"; - case DeviceMetric: - return "devicemetric"; - case Organization: - return "organization"; - case Readjudicate: - return "readjudicate"; - case ImmunizationRecommendation: - return "immunizationrecommendation"; - case MedicationDispense: - return "medicationdispense"; - case MedicationPrescription: - return "medicationprescription"; - case PaymentNotice: - return "paymentnotice"; - case MedicationStatement: - return "medicationstatement"; - case AppointmentResponse: - return "appointmentresponse"; - case Questionnaire: - return "questionnaire"; - case OperationOutcome: - return "operationoutcome"; - case Media: - return "media"; - case Binary: - return "binary"; - case Other: - return "other"; - case VisionPrescription: - return "visionprescription"; - case DocumentReference: - return "documentreference"; - case Immunization: - return "immunization"; - case ExtensionDefinition: - return "extensiondefinition"; - case Bundle: - return "bundle"; - case Subscription: - return "subscription"; - case ImagingStudy: - return "imagingstudy"; - case Provenance: - return "provenance"; - case Device: - return "device"; - case StructureDefinition: - return "structuredefinition"; - case Order: - return "order"; - case Procedure: - return "procedure"; - case DiagnosticReport: - return "diagnosticreport"; - case Medication: - return "medication"; - case MessageHeader: - return "messageheader"; - case DocumentManifest: - return "documentmanifest"; - case DataElement: - return "dataelement"; - case MedicationAdministration: - return "medicationadministration"; - case Encounter: - return "encounter"; - case SecurityEvent: - return "securityevent"; - case PendedRequest: - return "pendedrequest"; - case List: - return "list"; case DeviceUseStatement: return "deviceusestatement"; - case Goal: - return "goal"; - case NutritionOrder: - return "nutritionorder"; - case SearchParameter: - return "searchparameter"; - case ReferralRequest: - return "referralrequest"; - case FamilyHistory: - return "familyhistory"; - case EnrollmentRequest: - return "enrollmentrequest"; - case Location: - return "location"; - case Contract: - return "contract"; - case Basic: - return "basic"; + case Reversal: + return "reversal"; + case MessageHeader: + return "messageheader"; + case PharmacyClaim: + return "pharmacyclaim"; + case ImmunizationRecommendation: + return "immunizationrecommendation"; + case Other: + return "other"; + case BodySite: + return "bodysite"; + case Provenance: + return "provenance"; + case Questionnaire: + return "questionnaire"; + case ProfessionalClaim: + return "professionalclaim"; + case ExplanationOfBenefit: + return "explanationofbenefit"; + case InstitutionalClaim: + return "institutionalclaim"; case Specimen: return "specimen"; + case AllergyIntolerance: + return "allergyintolerance"; + case CarePlan: + return "careplan"; + case StructureDefinition: + return "structuredefinition"; + case EpisodeOfCare: + return "episodeofcare"; + case MedicationPrescription: + return "medicationprescription"; + case OperationOutcome: + return "operationoutcome"; + case Procedure: + return "procedure"; + case List: + return "list"; + case ConceptMap: + return "conceptmap"; + case ValueSet: + return "valueset"; + case OperationDefinition: + return "operationdefinition"; + case Order: + return "order"; + case Immunization: + return "immunization"; + case Device: + return "device"; + case VisionPrescription: + return "visionprescription"; + case Media: + return "media"; + case ProcedureRequest: + return "procedurerequest"; + case EligibilityResponse: + return "eligibilityresponse"; + case DeviceUseRequest: + return "deviceuserequest"; + case DeviceMetric: + return "devicemetric"; + case AppointmentResponse: + return "appointmentresponse"; + case Observation: + return "observation"; + case MedicationAdministration: + return "medicationadministration"; case EnrollmentResponse: return "enrollmentresponse"; - case Patient: - return "patient"; + case Binary: + return "binary"; + case MedicationStatement: + return "medicationstatement"; + case CommunicationRequest: + return "communicationrequest"; + case PendedRequest: + return "pendedrequest"; + case Basic: + return "basic"; + case StatusRequest: + return "statusrequest"; + case ClaimResponse: + return "claimresponse"; + case EligibilityRequest: + return "eligibilityrequest"; + case MedicationDispense: + return "medicationdispense"; + case DiagnosticReport: + return "diagnosticreport"; + case ImagingObjectSelection: + return "imagingobjectselection"; + case HealthcareService: + return "healthcareservice"; case CarePlan2: return "careplan2"; + case DataElement: + return "dataelement"; + case ClinicalAssessment: + return "clinicalassessment"; + case QuestionnaireAnswers: + return "questionnaireanswers"; + case Readjudicate: + return "readjudicate"; + case NutritionOrder: + return "nutritionorder"; + case PaymentReconciliation: + return "paymentreconciliation"; + case Condition: + return "condition"; + case Composition: + return "composition"; + case Bundle: + return "bundle"; case DiagnosticOrder: return "diagnosticorder"; + case Patient: + return "patient"; + case Coverage: + return "coverage"; + case ExtensionDefinition: + return "extensiondefinition"; + case NamingSystem: + return "namingsystem"; + case Schedule: + return "schedule"; + case SupportingDocumentation: + return "supportingdocumentation"; + case Alert: + return "alert"; + case Location: + return "location"; case Parameters: return "parameters"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java index f8651f8c7aa..e75201ff3d8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -616,35 +616,35 @@ public class Reversal extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -656,7 +656,7 @@ public class Reversal extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -668,7 +668,7 @@ public class Reversal extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -680,7 +680,7 @@ public class Reversal extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class, SupportingDocumentation.class}, order=6, min=0, max=1) + @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class, SupportingDocumentation.class}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -692,7 +692,7 @@ public class Reversal extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={ClaimResponse.class, StatusResponse.class}, order=7, min=0, max=1) + @Child(name="response", type={ClaimResponse.class, StatusResponse.class}, order=8, min=0, max=1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -704,21 +704,21 @@ public class Reversal extends DomainResource { /** * Payee information supplied for matching purposes. */ - @Child(name="payee", type={}, order=8, min=0, max=1) + @Child(name="payee", type={}, order=9, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="Payee information supplied for matching purposes." ) protected PayeeComponent payee; /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=9, min=1, max=1) + @Child(name="coverage", type={}, order=10, min=1, max=1) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected ReversalCoverageComponent coverage; /** * If true remove all history excluding audit. */ - @Child(name="nullify", type={BooleanType.class}, order=10, min=1, max=1) + @Child(name="nullify", type={BooleanType.class}, order=11, min=1, max=1) @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) protected BooleanType nullify; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java index b033e3ea29a..2310bd52074 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -352,7 +352,7 @@ public class RiskAssessment extends DomainResource { /** * The patient or group the risk assessment applies to. */ - @Child(name="subject", type={Patient.class, Group.class}, order=-1, min=0, max=1) + @Child(name="subject", type={Patient.class, Group.class}, order=0, min=0, max=1) @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) protected Reference subject; @@ -364,14 +364,14 @@ public class RiskAssessment extends DomainResource { /** * The date (and possibly time) the risk assessment was performed. */ - @Child(name="date", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) protected DateTimeType date; /** * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. */ - @Child(name="condition", type={Condition.class}, order=1, min=0, max=1) + @Child(name="condition", type={Condition.class}, order=2, min=0, max=1) @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) protected Reference condition; @@ -383,7 +383,7 @@ public class RiskAssessment extends DomainResource { /** * The provider or software application that performed the assessment. */ - @Child(name="performer", type={Practitioner.class, Device.class}, order=2, min=0, max=1) + @Child(name="performer", type={Practitioner.class, Device.class}, order=3, min=0, max=1) @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) protected Reference performer; @@ -395,21 +395,21 @@ public class RiskAssessment extends DomainResource { /** * Business identifier assigned to the risk assessment. */ - @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=1) @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) protected Identifier identifier; /** * The algorithm, processs or mechanism used to evaluate the risk. */ - @Child(name="method", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name="method", type={CodeableConcept.class}, order=5, min=0, max=1) @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, processs or mechanism used to evaluate the risk." ) protected CodeableConcept method; /** * Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.). */ - @Child(name="basis", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="basis", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.)." ) protected List basis; /** @@ -421,14 +421,14 @@ public class RiskAssessment extends DomainResource { /** * Describes the expected outcome for the subject. */ - @Child(name="prediction", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="prediction", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) protected List prediction; /** * A description of the steps that might be taken to reduce the identified risk(s). */ - @Child(name="mitigation", type={StringType.class}, order=7, min=0, max=1) + @Child(name="mitigation", type={StringType.class}, order=8, min=0, max=1) @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) protected StringType mitigation; @@ -851,20 +851,20 @@ public class RiskAssessment extends DomainResource { return ResourceType.RiskAssessment; } - @SearchParamDefinition(name="patient", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference" ) - public static final String SP_PERFORMER = "performer"; - @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) - public static final String SP_METHOD = "method"; @SearchParamDefinition(name="date", path="RiskAssessment.date", description="When was assessment made?", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="RiskAssessment.identifier", description="Unique identifier for the assessment", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) + public static final String SP_METHOD = "method"; + @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java index 896f4280397..79fcb1df91c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java @@ -29,11 +29,11 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; - import java.math.*; + import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; @@ -42,54 +42,54 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. */ @DatatypeDef(name="SampledData") -public class SampledData extends Type implements ICompositeType { +public class SampledData extends Type implements ICompositeType { /** * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series. */ - @Child(name="origin", type={Quantity.class}, order=-1, min=1, max=1) + @Child(name="origin", type={Quantity.class}, order=0, min=1, max=1) @Description(shortDefinition="Zero value and units", formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." ) protected Quantity origin; /** * The length of time between sampling times, measured in milliseconds. */ - @Child(name="period", type={DecimalType.class}, order=0, min=1, max=1) + @Child(name="period", type={DecimalType.class}, order=1, min=1, max=1) @Description(shortDefinition="Number of milliseconds between samples", formalDefinition="The length of time between sampling times, measured in milliseconds." ) protected DecimalType period; /** * A correction factor that is applied to the sampled data points before they are added to the origin. */ - @Child(name="factor", type={DecimalType.class}, order=1, min=0, max=1) + @Child(name="factor", type={DecimalType.class}, order=2, min=0, max=1) @Description(shortDefinition="Multiply data by this before adding to origin", formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin." ) protected DecimalType factor; /** * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). */ - @Child(name="lowerLimit", type={DecimalType.class}, order=2, min=0, max=1) + @Child(name="lowerLimit", type={DecimalType.class}, order=3, min=0, max=1) @Description(shortDefinition="Lower limit of detection", formalDefinition="The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit)." ) protected DecimalType lowerLimit; /** * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). */ - @Child(name="upperLimit", type={DecimalType.class}, order=3, min=0, max=1) + @Child(name="upperLimit", type={DecimalType.class}, order=4, min=0, max=1) @Description(shortDefinition="Upper limit of detection", formalDefinition="The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit)." ) protected DecimalType upperLimit; /** * The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once. */ - @Child(name="dimensions", type={IntegerType.class}, order=4, min=1, max=1) + @Child(name="dimensions", type={IntegerType.class}, order=5, min=1, max=1) @Description(shortDefinition="Number of sample points at each time point", formalDefinition="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." ) protected IntegerType dimensions; /** * A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. */ - @Child(name="data", type={StringType.class}, order=5, min=1, max=1) + @Child(name="data", type={StringType.class}, order=6, min=1, max=1) @Description(shortDefinition="Decimal values with spaces, or 'E' | 'U' | 'L'", formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value." ) protected StringType data; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java index 4925ff874af..4d5e0e91d85 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -48,21 +48,21 @@ public class Schedule extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The schedule type can be used for the categorization of healthcare services or other appointment types. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types", formalDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types." ) protected List type; /** * The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson. */ - @Child(name="actor", type={}, order=1, min=1, max=1) + @Child(name="actor", type={}, order=2, min=1, max=1) @Description(shortDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson", formalDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson." ) protected Reference actor; @@ -74,21 +74,21 @@ public class Schedule extends DomainResource { /** * The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates. */ - @Child(name="planningHorizon", type={Period.class}, order=2, min=0, max=1) + @Child(name="planningHorizon", type={Period.class}, order=3, min=0, max=1) @Description(shortDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates", formalDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates." ) protected Period planningHorizon; /** * Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. */ - @Child(name="comment", type={StringType.class}, order=3, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated", formalDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated." ) protected StringType comment; /** * When this Schedule was created, or last revised. */ - @Child(name="lastModified", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="lastModified", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="When this Schedule was created, or last revised", formalDefinition="When this Schedule was created, or last revised." ) protected DateTimeType lastModified; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java index 9d713827cea..af6de6037c3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -190,70 +190,70 @@ public class SearchParameter extends DomainResource { /** * The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statements. */ - @Child(name="url", type={UriType.class}, order=-1, min=1, max=1) + @Child(name="url", type={UriType.class}, order=0, min=1, max=1) @Description(shortDefinition="Literal URL used to reference this search parameter", formalDefinition="The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statements." ) protected UriType url; /** * The name of the standard or custom search parameter. */ - @Child(name="name", type={StringType.class}, order=0, min=1, max=1) + @Child(name="name", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the standard or custom search parameter." ) protected StringType name; /** * Details of the individual or organization who accepts responsibility for publishing the search parameter. */ - @Child(name="publisher", type={StringType.class}, order=1, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the search parameter." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * The Scope and Usage that this search parameter was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=3, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Why this search parameter is defined", formalDefinition="The Scope and Usage that this search parameter was created to meet." ) protected StringType requirements; /** * The base resource type that this search parameter refers to. */ - @Child(name="base", type={CodeType.class}, order=4, min=1, max=1) + @Child(name="base", type={CodeType.class}, order=5, min=1, max=1) @Description(shortDefinition="The resource type this search parameter applies to", formalDefinition="The base resource type that this search parameter refers to." ) protected CodeType base; /** * The type of value a search parameter refers to, and how the content is interpreted. */ - @Child(name="type", type={CodeType.class}, order=5, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=6, min=1, max=1) @Description(shortDefinition="number | date | string | token | reference | composite | quantity", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) protected Enumeration type; /** * A description of the search parameters and how it used. */ - @Child(name="description", type={StringType.class}, order=6, min=1, max=1) + @Child(name="description", type={StringType.class}, order=7, min=1, max=1) @Description(shortDefinition="Documentation for search parameter", formalDefinition="A description of the search parameters and how it used." ) protected StringType description; /** * An XPath expression that returns a set of elements for the search parameter. */ - @Child(name="xpath", type={StringType.class}, order=7, min=0, max=1) + @Child(name="xpath", type={StringType.class}, order=8, min=0, max=1) @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." ) protected StringType xpath; /** * Types of resource (if a resource is referenced). */ - @Child(name="target", type={CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name="target", type={CodeType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) protected List target; @@ -808,18 +808,18 @@ public class SearchParameter extends DomainResource { return ResourceType.SearchParameter; } - @SearchParamDefinition(name="description", path="SearchParameter.description", description="Documentation for search parameter", type="string" ) - public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="name", path="SearchParameter.name", description="Name of search parameter", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" ) - public static final String SP_TARGET = "target"; - @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type this search parameter applies to", type="token" ) - public static final String SP_BASE = "base"; + @SearchParamDefinition(name="description", path="SearchParameter.description", description="Documentation for search parameter", type="string" ) + public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="type", path="SearchParameter.type", description="number | date | string | token | reference | composite | quantity", type="token" ) public static final String SP_TYPE = "type"; @SearchParamDefinition(name="url", path="SearchParameter.url", description="Literal URL used to reference this search parameter", type="token" ) public static final String SP_URL = "url"; + @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type this search parameter applies to", type="token" ) + public static final String SP_BASE = "base"; + @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" ) + public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java index 759d200c657..7d5e272aba5 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -3002,28 +3002,28 @@ public class SecurityEvent extends DomainResource { /** * Identifies the name, action type, time, and disposition of the audited event. */ - @Child(name="event", type={}, order=-1, min=1, max=1) + @Child(name="event", type={}, order=0, min=1, max=1) @Description(shortDefinition="What was done", formalDefinition="Identifies the name, action type, time, and disposition of the audited event." ) protected SecurityEventEventComponent event; /** * A person, a hardware device or software process. */ - @Child(name="participant", type={}, order=0, min=1, max=Child.MAX_UNLIMITED) + @Child(name="participant", type={}, order=1, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) protected List participant; /** * Application systems and processes. */ - @Child(name="source", type={}, order=1, min=1, max=1) + @Child(name="source", type={}, order=2, min=1, max=1) @Description(shortDefinition="Application systems and processes", formalDefinition="Application systems and processes." ) protected SecurityEventSourceComponent source; /** * Specific instances of data or objects that have been accessed. */ - @Child(name="object", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="object", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Specific instances of data or objects that have been accessed", formalDefinition="Specific instances of data or objects that have been accessed." ) protected List object; @@ -3208,38 +3208,38 @@ public class SecurityEvent extends DomainResource { return ResourceType.SecurityEvent; } - @SearchParamDefinition(name="site", path="SecurityEvent.source.site", description="Logical source location within the enterprise", type="token" ) - public static final String SP_SITE = "site"; - @SearchParamDefinition(name="desc", path="SecurityEvent.object.name", description="Instance-specific descriptor for Object", type="string" ) - public static final String SP_DESC = "desc"; - @SearchParamDefinition(name="type", path="SecurityEvent.event.type", description="Type/identifier of event", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="SecurityEvent.event.dateTime", description="Time when the event occurred on source", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="reference", path="SecurityEvent.object.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) - public static final String SP_REFERENCE = "reference"; - @SearchParamDefinition(name="identity", path="SecurityEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) - public static final String SP_IDENTITY = "identity"; - @SearchParamDefinition(name="patient", path="", description="A patient that the .object.reference refers to", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="altid", path="SecurityEvent.participant.altId", description="Alternative User id e.g. authentication", type="token" ) - public static final String SP_ALTID = "altid"; + @SearchParamDefinition(name="address", path="SecurityEvent.participant.network.identifier", description="Identifier for the network access point of the user device", type="token" ) + public static final String SP_ADDRESS = "address"; @SearchParamDefinition(name="patientid", path="", description="The id of the patient (one of multiple kinds of participations)", type="token" ) public static final String SP_PATIENTID = "patientid"; @SearchParamDefinition(name="source", path="SecurityEvent.source.identifier", description="The id of source where event originated", type="token" ) public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="address", path="SecurityEvent.participant.network.identifier", description="Identifier for the network access point of the user device", type="token" ) - public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="type", path="SecurityEvent.event.type", description="Type/identifier of event", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="altid", path="SecurityEvent.participant.altId", description="Alternative User id e.g. authentication", type="token" ) + public static final String SP_ALTID = "altid"; + @SearchParamDefinition(name="reference", path="SecurityEvent.object.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) + public static final String SP_REFERENCE = "reference"; + @SearchParamDefinition(name="site", path="SecurityEvent.source.site", description="Logical source location within the enterprise", type="token" ) + public static final String SP_SITE = "site"; @SearchParamDefinition(name="subtype", path="SecurityEvent.event.subtype", description="More specific type/id for the event", type="token" ) public static final String SP_SUBTYPE = "subtype"; + @SearchParamDefinition(name="identity", path="SecurityEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) + public static final String SP_IDENTITY = "identity"; + @SearchParamDefinition(name="patient", path="", description="A patient that the .object.reference refers to", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="object-type", path="SecurityEvent.object.type", description="Object type being audited", type="token" ) + public static final String SP_OBJECTTYPE = "object-type"; @SearchParamDefinition(name="name", path="SecurityEvent.participant.name", description="Human-meaningful name for the user", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="action", path="SecurityEvent.event.action", description="Type of action performed during the event", type="token" ) public static final String SP_ACTION = "action"; - @SearchParamDefinition(name="object-type", path="SecurityEvent.object.type", description="Object type being audited", type="token" ) - public static final String SP_OBJECTTYPE = "object-type"; @SearchParamDefinition(name="user", path="SecurityEvent.participant.userId", description="Unique identifier for the user", type="token" ) public static final String SP_USER = "user"; + @SearchParamDefinition(name="desc", path="SecurityEvent.object.name", description="Instance-specific descriptor for Object", type="string" ) + public static final String SP_DESC = "desc"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java index 5fdd9230b90..6fdd5b6935d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -148,21 +148,21 @@ public class Slot extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource", formalDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource." ) protected CodeableConcept type; /** * The schedule resource that this slot defines an interval of status information. */ - @Child(name="schedule", type={Schedule.class}, order=1, min=1, max=1) + @Child(name="schedule", type={Schedule.class}, order=2, min=1, max=1) @Description(shortDefinition="The schedule resource that this slot defines an interval of status information", formalDefinition="The schedule resource that this slot defines an interval of status information." ) protected Reference schedule; @@ -174,42 +174,42 @@ public class Slot extends DomainResource { /** * BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE. */ - @Child(name="freeBusyType", type={CodeType.class}, order=2, min=1, max=1) + @Child(name="freeBusyType", type={CodeType.class}, order=3, min=1, max=1) @Description(shortDefinition="BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE", formalDefinition="BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE." ) protected Enumeration freeBusyType; /** * Date/Time that the slot is to begin. */ - @Child(name="start", type={InstantType.class}, order=3, min=1, max=1) + @Child(name="start", type={InstantType.class}, order=4, min=1, max=1) @Description(shortDefinition="Date/Time that the slot is to begin", formalDefinition="Date/Time that the slot is to begin." ) protected InstantType start; /** * Date/Time that the slot is to conclude. */ - @Child(name="end", type={InstantType.class}, order=4, min=1, max=1) + @Child(name="end", type={InstantType.class}, order=5, min=1, max=1) @Description(shortDefinition="Date/Time that the slot is to conclude", formalDefinition="Date/Time that the slot is to conclude." ) protected InstantType end; /** * This slot has already been overbooked, appointments are unlikely to be accepted for this time. */ - @Child(name="overbooked", type={BooleanType.class}, order=5, min=0, max=1) + @Child(name="overbooked", type={BooleanType.class}, order=6, min=0, max=1) @Description(shortDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time", formalDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time." ) protected BooleanType overbooked; /** * Comments on the slot to describe any extended information. Such as custom constraints on the slot. */ - @Child(name="comment", type={StringType.class}, order=6, min=0, max=1) + @Child(name="comment", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot", formalDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot." ) protected StringType comment; /** * When this slot was created, or last revised. */ - @Child(name="lastModified", type={DateTimeType.class}, order=7, min=0, max=1) + @Child(name="lastModified", type={DateTimeType.class}, order=8, min=0, max=1) @Description(shortDefinition="When this slot was created, or last revised", formalDefinition="When this slot was created, or last revised." ) protected DateTimeType lastModified; @@ -679,10 +679,10 @@ public class Slot extends DomainResource { @SearchParamDefinition(name="schedule", path="Slot.schedule", description="The Schedule Resource that we are seeking a slot within", type="reference" ) public static final String SP_SCHEDULE = "schedule"; - @SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.", type="date" ) - public static final String SP_START = "start"; @SearchParamDefinition(name="slottype", path="Slot.type", description="The type of appointments that can be booked into the slot", type="token" ) public static final String SP_SLOTTYPE = "slottype"; + @SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.", type="date" ) + public static final String SP_START = "start"; @SearchParamDefinition(name="fbtype", path="Slot.freeBusyType", description="The free/busy status of the appointment", type="token" ) public static final String SP_FBTYPE = "fbtype"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java index 9a5f16bc993..5d70e855d21 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1124,28 +1124,28 @@ public class Specimen extends DomainResource { /** * Id for specimen. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Identifier", formalDefinition="Id for specimen." ) protected List identifier; /** * Kind of material that forms the specimen. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) @Description(shortDefinition="Kind of material that forms the specimen", formalDefinition="Kind of material that forms the specimen." ) protected CodeableConcept type; /** * Parent specimen from which the focal specimen was a component. */ - @Child(name="source", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="source", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parent of specimen", formalDefinition="Parent specimen from which the focal specimen was a component." ) protected List source; /** * Where the specimen came from. This may be from the patient(s) or from the environment or a device. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=2, min=1, max=1) + @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=3, min=1, max=1) @Description(shortDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device", formalDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device." ) protected Reference subject; @@ -1157,35 +1157,35 @@ public class Specimen extends DomainResource { /** * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. */ - @Child(name="accessionIdentifier", type={Identifier.class}, order=3, min=0, max=1) + @Child(name="accessionIdentifier", type={Identifier.class}, order=4, min=0, max=1) @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) protected Identifier accessionIdentifier; /** * Time when specimen was received for processing or testing. */ - @Child(name="receivedTime", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name="receivedTime", type={DateTimeType.class}, order=5, min=0, max=1) @Description(shortDefinition="The time when specimen was received for processing", formalDefinition="Time when specimen was received for processing or testing." ) protected DateTimeType receivedTime; /** * Details concerning the specimen collection. */ - @Child(name="collection", type={}, order=5, min=0, max=1) + @Child(name="collection", type={}, order=6, min=0, max=1) @Description(shortDefinition="Collection details", formalDefinition="Details concerning the specimen collection." ) protected SpecimenCollectionComponent collection; /** * Details concerning treatment and processing steps for the specimen. */ - @Child(name="treatment", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="treatment", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Treatment and processing step details", formalDefinition="Details concerning treatment and processing steps for the specimen." ) protected List treatment; /** * The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here. */ - @Child(name="container", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="container", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Direct container of specimen (tube/slide, etc)", formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." ) protected List container; @@ -1564,28 +1564,28 @@ public class Specimen extends DomainResource { return ResourceType.Specimen; } - @SearchParamDefinition(name="site", path="Specimen.collection.bodySite[x]", description="The source or body site from where the specimen came", type="token" ) - public static final String SP_SITE = "site"; - @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference" ) - public static final String SP_COLLECTOR = "collector"; - @SearchParamDefinition(name="patient", path="Specimen.subject", description="The patient the specimen comes from", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="source", path="Specimen.source.target", description="The parent of the specimen", type="reference" ) - public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="container", path="Specimen.container.type", description="The kind of specimen container", type="token" ) public static final String SP_CONTAINER = "container"; - @SearchParamDefinition(name="collected", path="Specimen.collection.collected[x]", description="The date the specimen was collected", type="date" ) - public static final String SP_COLLECTED = "collected"; + @SearchParamDefinition(name="identifier", path="Specimen.identifier", description="The unique identifier associated with the specimen", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="site", path="Specimen.collection.bodySite[x]", description="The source or body site from where the specimen came", type="token" ) + public static final String SP_SITE = "site"; @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="containerid", path="Specimen.container.identifier", description="The unique identifier associated with the specimen container", type="token" ) - public static final String SP_CONTAINERID = "containerid"; + @SearchParamDefinition(name="patient", path="Specimen.subject", description="The patient the specimen comes from", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="collected", path="Specimen.collection.collected[x]", description="The date the specimen was collected", type="date" ) + public static final String SP_COLLECTED = "collected"; + @SearchParamDefinition(name="source", path="Specimen.source.target", description="The parent of the specimen", type="reference" ) + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="accession", path="Specimen.accessionIdentifier", description="The accession number associated with the specimen", type="token" ) public static final String SP_ACCESSION = "accession"; @SearchParamDefinition(name="type", path="Specimen.type", description="The specimen type", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="identifier", path="Specimen.identifier", description="The unique identifier associated with the specimen", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="containerid", path="Specimen.container.identifier", description="The unique identifier associated with the specimen container", type="token" ) + public static final String SP_CONTAINERID = "containerid"; + @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference" ) + public static final String SP_COLLECTOR = "collector"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java index d5ec339c8a0..59583a4fa0b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -47,35 +47,35 @@ public class StatusRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class StatusRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class StatusRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class StatusRequest extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=6, min=0, max=1) + @Child(name="request", type={}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -123,7 +123,7 @@ public class StatusRequest extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=7, min=0, max=1) + @Child(name="response", type={}, order=8, min=0, max=1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java index a8e65c11bed..523a8915de8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -184,14 +184,14 @@ public class StatusResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={}, order=0, min=0, max=1) + @Child(name="request", type={}, order=1, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -203,42 +203,42 @@ public class StatusResponse extends DomainResource { /** * Transaction status: error, complete, held. */ - @Child(name="outcome", type={Coding.class}, order=1, min=0, max=1) + @Child(name="outcome", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) protected Coding outcome; /** * A description of the status of the adjudication or processing. */ - @Child(name="disposition", type={StringType.class}, order=2, min=0, max=1) + @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication or processing." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -250,7 +250,7 @@ public class StatusResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -262,7 +262,7 @@ public class StatusResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=8, min=0, max=1) + @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -274,21 +274,21 @@ public class StatusResponse extends DomainResource { /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=9, min=0, max=1) + @Child(name="form", type={Coding.class}, order=10, min=0, max=1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Suite of processing note or additional requirements is the processing has been held. */ - @Child(name="notes", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="notes", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Notes", formalDefinition="Suite of processing note or additional requirements is the processing has been held." ) protected List notes; /** * Processing errors. */ - @Child(name="error", type={Coding.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name="error", type={Coding.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) protected List error; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java index 5688e1f3032..e643ad4888f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -802,147 +802,147 @@ public class StructureDefinition extends DomainResource { /** * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=-1, min=1, max=1) + @Child(name="url", type={UriType.class}, order=0, min=1, max=1) @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name="version", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="name", type={StringType.class}, order=2, min=1, max=1) + @Child(name="name", type={StringType.class}, order=3, min=1, max=1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType name; /** * Defined so that applications can use this name when displaying the value of the extension to the user. */ - @Child(name="display", type={StringType.class}, order=3, min=0, max=1) + @Child(name="display", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) protected StringType display; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name="description", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name="code", type={Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=9, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=10, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=11, min=0, max=1) @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * The Scope and Usage that this profile was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=11, min=0, max=1) + @Child(name="requirements", type={StringType.class}, order=12, min=0, max=1) @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) protected StringType requirements; /** * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. */ - @Child(name="fhirVersion", type={IdType.class}, order=12, min=0, max=1) + @Child(name="fhirVersion", type={IdType.class}, order=13, min=0, max=1) @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) protected IdType fhirVersion; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name="mapping", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * Defines the type of structure that this definition is describing. */ - @Child(name="type", type={CodeType.class}, order=14, min=1, max=1) + @Child(name="type", type={CodeType.class}, order=15, min=1, max=1) @Description(shortDefinition="abstract | type | resource | constraint | extension", formalDefinition="Defines the type of structure that this definition is describing." ) protected Enumeration type; /** * Identifies the type of context to which the extension applies. */ - @Child(name="contextType", type={CodeType.class}, order=15, min=0, max=1) + @Child(name="contextType", type={CodeType.class}, order=16, min=0, max=1) @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name="context", type={StringType.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name="context", type={StringType.class}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** * The structure that is the base on which this set of constraints is derived from. */ - @Child(name="base", type={UriType.class}, order=17, min=0, max=1) + @Child(name="base", type={UriType.class}, order=18, min=0, max=1) @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) protected UriType base; /** * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. */ - @Child(name="snapshot", type={}, order=18, min=0, max=1) + @Child(name="snapshot", type={}, order=19, min=0, max=1) @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) protected StructureDefinitionSnapshotComponent snapshot; /** * A differential view is expressed relative to the base profile - a statement of differences that it applies. */ - @Child(name="differential", type={}, order=19, min=0, max=1) + @Child(name="differential", type={}, order=20, min=0, max=1) @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) protected StructureDefinitionDifferentialComponent differential; @@ -1972,30 +1972,30 @@ public class StructureDefinition extends DomainResource { return ResourceType.StructureDefinition; } - @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description="A path that is constrained in the profile", type="token" ) - public static final String SP_PATH = "path"; - @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="type", path="StructureDefinition.type", description="abstract | type | resource | constraint | extension", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="date", path="StructureDefinition.date", description="The profile publication date", type="date" ) public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="StructureDefinition.identifier", description="The identifier of the profile", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="url", path="StructureDefinition.url", description="Literal URL used to reference this profile", type="token" ) - public static final String SP_URL = "url"; + @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description="A path that is constrained in the profile", type="token" ) + public static final String SP_PATH = "path"; + @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="type", path="StructureDefinition.type", description="abstract | type | resource | constraint | extension", type="token" ) + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="version", path="StructureDefinition.version", description="The version identifier of the profile", type="token" ) public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="StructureDefinition.url", description="Literal URL used to reference this profile", type="token" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java index 4645513d807..4f2d215a61d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -758,56 +758,56 @@ public class Subscription extends DomainResource { /** * Todo. */ - @Child(name="criteria", type={StringType.class}, order=-1, min=1, max=1) + @Child(name="criteria", type={StringType.class}, order=0, min=1, max=1) @Description(shortDefinition="Rule for server push criteria", formalDefinition="Todo." ) protected StringType criteria; /** * Todo. */ - @Child(name="contact", type={ContactPoint.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name="contact", type={ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact details for source (e.g. troubleshooting)", formalDefinition="Todo." ) protected List contact; /** * Todo. */ - @Child(name="reason", type={StringType.class}, order=1, min=1, max=1) + @Child(name="reason", type={StringType.class}, order=2, min=1, max=1) @Description(shortDefinition="Description of why this subscription was created", formalDefinition="Todo." ) protected StringType reason; /** * Todo. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=3, min=1, max=1) @Description(shortDefinition="requested | active | error | off", formalDefinition="Todo." ) protected Enumeration status; /** * Todo. */ - @Child(name="error", type={StringType.class}, order=3, min=0, max=1) + @Child(name="error", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Latest error note", formalDefinition="Todo." ) protected StringType error; /** * Todo. */ - @Child(name="channel", type={}, order=4, min=1, max=1) + @Child(name="channel", type={}, order=5, min=1, max=1) @Description(shortDefinition="The channel on which to report matches to the criteria", formalDefinition="Todo." ) protected SubscriptionChannelComponent channel; /** * Todo. */ - @Child(name="end", type={InstantType.class}, order=5, min=0, max=1) + @Child(name="end", type={InstantType.class}, order=6, min=0, max=1) @Description(shortDefinition="When to automatically delete the subscription", formalDefinition="Todo." ) protected InstantType end; /** * Todo. */ - @Child(name="tag", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name="tag", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A tag to add to matching resources", formalDefinition="Todo." ) protected List tag; @@ -1215,20 +1215,20 @@ public class Subscription extends DomainResource { return ResourceType.Subscription; } - @SearchParamDefinition(name="criteria", path="Subscription.criteria", description="Rule for server push criteria", type="string" ) - public static final String SP_CRITERIA = "criteria"; - @SearchParamDefinition(name="status", path="Subscription.status", description="requested | active | error | off", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="tag", path="Subscription.tag.term", description="The term that identifies the tag", type="string" ) - public static final String SP_TAG = "tag"; @SearchParamDefinition(name="payload", path="Subscription.channel.payload", description="Mimetype to send, or blank for no payload", type="string" ) public static final String SP_PAYLOAD = "payload"; - @SearchParamDefinition(name="type", path="Subscription.channel.type", description="rest-hook | websocket | email | sms | message", type="token" ) - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="criteria", path="Subscription.criteria", description="Rule for server push criteria", type="string" ) + public static final String SP_CRITERIA = "criteria"; @SearchParamDefinition(name="contact", path="Subscription.contact", description="Contact details for source (e.g. troubleshooting)", type="token" ) public static final String SP_CONTACT = "contact"; + @SearchParamDefinition(name="tag", path="Subscription.tag.term", description="The term that identifies the tag", type="string" ) + public static final String SP_TAG = "tag"; + @SearchParamDefinition(name="type", path="Subscription.channel.type", description="rest-hook | websocket | email | sms | message", type="token" ) + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="url", path="Subscription.channel.url", description="Where the channel points to", type="string" ) public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="Subscription.status", description="requested | active | error | off", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java index 5f0a69dd9cc..9cc8402c2be 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -359,28 +359,28 @@ public class Substance extends DomainResource { /** * A code (or set of codes) that identify this substance. */ - @Child(name="type", type={CodeableConcept.class}, order=-1, min=1, max=1) + @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) @Description(shortDefinition="What kind of substance this is", formalDefinition="A code (or set of codes) that identify this substance." ) protected CodeableConcept type; /** * A description of the substance - its appearance, handling requirements, and other usage notes. */ - @Child(name="description", type={StringType.class}, order=0, min=0, max=1) + @Child(name="description", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Textual description of the substance, comments", formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes." ) protected StringType description; /** * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance. */ - @Child(name="instance", type={}, order=1, min=0, max=1) + @Child(name="instance", type={}, order=2, min=0, max=1) @Description(shortDefinition="If this describes a specific package/container of the substance", formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." ) protected SubstanceInstanceComponent instance; /** * A substance can be composed of other substances. */ - @Child(name="ingredient", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name="ingredient", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Composition information about the substance", formalDefinition="A substance can be composed of other substances." ) protected List ingredient; @@ -580,16 +580,16 @@ public class Substance extends DomainResource { return ResourceType.Substance; } - @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="A component of the substance", type="reference" ) - public static final String SP_SUBSTANCE = "substance"; - @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="Amount of substance in the package", type="number" ) - public static final String SP_QUANTITY = "quantity"; - @SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance", type="token" ) - public static final String SP_TYPE = "type"; @SearchParamDefinition(name="identifier", path="Substance.instance.identifier", description="Identifier of the package/container", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="Amount of substance in the package", type="number" ) + public static final String SP_QUANTITY = "quantity"; + @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="A component of the substance", type="reference" ) + public static final String SP_SUBSTANCE = "substance"; @SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="When no longer valid to use", type="date" ) public static final String SP_EXPIRY = "expiry"; + @SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance", type="token" ) + public static final String SP_TYPE = "type"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java index 0a189f2a998..8a644638fe6 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -786,28 +786,28 @@ public class Supply extends DomainResource { /** * Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process. */ - @Child(name="kind", type={CodeableConcept.class}, order=-1, min=0, max=1) + @Child(name="kind", type={CodeableConcept.class}, order=0, min=0, max=1) @Description(shortDefinition="The kind of supply (central, non-stock, etc)", formalDefinition="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process." ) protected CodeableConcept kind; /** * Unique identifier for this supply request. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=1) @Description(shortDefinition="Unique identifier", formalDefinition="Unique identifier for this supply request." ) protected Identifier identifier; /** * Status of the supply request. */ - @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) + @Child(name="status", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="requested | dispensed | received | failed | cancelled", formalDefinition="Status of the supply request." ) protected Enumeration status; /** * The item that is requested to be supplied. */ - @Child(name="orderedItem", type={Medication.class, Substance.class, Device.class}, order=2, min=0, max=1) + @Child(name="orderedItem", type={Medication.class, Substance.class, Device.class}, order=3, min=0, max=1) @Description(shortDefinition="Medication, Substance, or Device requested to be supplied", formalDefinition="The item that is requested to be supplied." ) protected Reference orderedItem; @@ -819,7 +819,7 @@ public class Supply extends DomainResource { /** * A link to a resource representing the person whom the ordered item is for. */ - @Child(name="patient", type={Patient.class}, order=3, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=4, min=0, max=1) @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the ordered item is for." ) protected Reference patient; @@ -831,7 +831,7 @@ public class Supply extends DomainResource { /** * Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed. */ - @Child(name="dispense", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dispense", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Supply details", formalDefinition="Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed." ) protected List dispense; @@ -1114,20 +1114,20 @@ public class Supply extends DomainResource { return ResourceType.Supply; } - @SearchParamDefinition(name="patient", path="Supply.patient", description="Patient for whom the item is supplied", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="status", path="Supply.status", description="requested | dispensed | received | failed | cancelled", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="dispenseid", path="Supply.dispense.identifier", description="External identifier", type="token" ) - public static final String SP_DISPENSEID = "dispenseid"; @SearchParamDefinition(name="identifier", path="Supply.identifier", description="Unique identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="supplier", path="Supply.dispense.supplier", description="Dispenser", type="reference" ) - public static final String SP_SUPPLIER = "supplier"; @SearchParamDefinition(name="kind", path="Supply.kind", description="The kind of supply (central, non-stock, etc)", type="token" ) public static final String SP_KIND = "kind"; + @SearchParamDefinition(name="patient", path="Supply.patient", description="Patient for whom the item is supplied", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="supplier", path="Supply.dispense.supplier", description="Dispenser", type="reference" ) + public static final String SP_SUPPLIER = "supplier"; + @SearchParamDefinition(name="dispenseid", path="Supply.dispense.identifier", description="External identifier", type="token" ) + public static final String SP_DISPENSEID = "dispenseid"; @SearchParamDefinition(name="dispensestatus", path="Supply.dispense.status", description="in-progress | dispensed | abandoned", type="token" ) public static final String SP_DISPENSESTATUS = "dispensestatus"; + @SearchParamDefinition(name="status", path="Supply.status", description="requested | dispensed | received | failed | cancelled", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java index 5469626d87d..847498e28e4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -257,35 +257,35 @@ public class SupportingDocumentation extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=1, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer, organization or Provider who is target of the submission. */ - @Child(name="target", type={Organization.class, Practitioner.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class, Practitioner.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer or Provider", formalDefinition="The Insurer, organization or Provider who is target of the submission." ) protected Reference target; @@ -297,7 +297,7 @@ public class SupportingDocumentation extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -309,7 +309,7 @@ public class SupportingDocumentation extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -321,7 +321,7 @@ public class SupportingDocumentation extends DomainResource { /** * Original request. */ - @Child(name="request", type={}, order=6, min=0, max=1) + @Child(name="request", type={}, order=7, min=0, max=1) @Description(shortDefinition="Request reference", formalDefinition="Original request." ) protected Reference request; @@ -333,7 +333,7 @@ public class SupportingDocumentation extends DomainResource { /** * Original response. */ - @Child(name="response", type={}, order=7, min=0, max=1) + @Child(name="response", type={}, order=8, min=0, max=1) @Description(shortDefinition="Response reference", formalDefinition="Original response." ) protected Reference response; @@ -345,7 +345,7 @@ public class SupportingDocumentation extends DomainResource { /** * Person who created the submission. */ - @Child(name="author", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name="author", type={Practitioner.class}, order=9, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the submission." ) protected Reference author; @@ -357,7 +357,7 @@ public class SupportingDocumentation extends DomainResource { /** * The patient who is directly or indirectly the subject of the supporting information. */ - @Child(name="subject", type={Patient.class}, order=9, min=0, max=1) + @Child(name="subject", type={Patient.class}, order=10, min=0, max=1) @Description(shortDefinition="Patient", formalDefinition="The patient who is directly or indirectly the subject of the supporting information." ) protected Reference subject; @@ -369,7 +369,7 @@ public class SupportingDocumentation extends DomainResource { /** * Supporting Files. */ - @Child(name="detail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name="detail", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Supporting Files", formalDefinition="Supporting Files." ) protected List detail; @@ -912,14 +912,14 @@ public class SupportingDocumentation extends DomainResource { return ResourceType.SupportingDocumentation; } - @SearchParamDefinition(name="author", path="SupportingDocumentation.author", description="The person who generated this resource", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="patient", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="subject", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) - public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="identifier", path="SupportingDocumentation.identifier", description="The business identifier of the Eligibility", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="author", path="SupportingDocumentation.author", description="The person who generated this resource", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="subject", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java index 6f0588f971c..0ab9c9d254f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java @@ -35,7 +35,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * Represents a Time datatype, per the FHIR specification. A time is a specification of hours and minutes (and optionally milliseconds), with NO date and NO timezone information attached. It is * expressed as a string in the form HH:mm:ss[.SSSS] */ -@DatatypeDef(name="Time") +@DatatypeDef(name="time") public class TimeType extends PrimitiveType { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java index 646bd40df3f..561425f34e4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java @@ -29,23 +29,22 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import java.util.*; +import java.math.*; +import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.DatatypeDef; import org.hl7.fhir.instance.model.annotations.Description; +import org.hl7.fhir.instance.model.annotations.DatatypeDef; import org.hl7.fhir.instance.model.api.IDatatypeElement; /** * Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur. */ @DatatypeDef(name="Timing") -public class Timing extends Type implements ICompositeType { +public class Timing extends Type implements ICompositeType { public enum EventTiming { /** @@ -764,14 +763,14 @@ public class Timing extends Type implements ICompositeType { /** * Identifies specific time periods when the event should occur. */ - @Child(name="event", type={Period.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="event", type={Period.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="When the event occurs", formalDefinition="Identifies specific time periods when the event should occur." ) protected List event; /** * Identifies a repeating pattern to the intended time periods. */ - @Child(name="repeat", type={}, order=0, min=0, max=1) + @Child(name="repeat", type={}, order=1, min=0, max=1) @Description(shortDefinition="Only if there is none or one event", formalDefinition="Identifies a repeating pattern to the intended time periods." ) protected TimingRepeatComponent repeat; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java index 9caf208b98c..4f0fa1aad09 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2514,112 +2514,112 @@ public class ValueSet extends DomainResource { /** * The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={UriType.class}, order=-1, min=0, max=1) + @Child(name="identifier", type={UriType.class}, order=0, min=0, max=1) @Description(shortDefinition="Globally unique logical id for value set", formalDefinition="The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected UriType identifier; /** * The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=0, min=0, max=1) + @Child(name="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the value set", formalDefinition="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name describing the value set. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name="name", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Informal name for this value set", formalDefinition="A free text natural language name describing the value set." ) protected StringType name; /** * If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. */ - @Child(name="immutable", type={BooleanType.class}, order=2, min=0, max=1) + @Child(name="immutable", type={BooleanType.class}, order=3, min=0, max=1) @Description(shortDefinition="Indicates whether or not any change to the content logical definition may occur", formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change." ) protected BooleanType immutable; /** * The name of the individual or organization that published the value set. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) + @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the value set." ) protected StringType publisher; /** * Contacts of the publisher to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name="description", type={StringType.class}, order=6, min=0, max=1) @Description(shortDefinition="Human language description of the value set", formalDefinition="A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set." ) protected StringType description; /** * A copyright statement relating to the value set and/or its contents. These are generally legal restrictions on the use and publishing of the value set. */ - @Child(name="copyright", type={StringType.class}, order=6, min=0, max=1) + @Child(name="copyright", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Publishing restrictions for the value set", formalDefinition="A copyright statement relating to the value set and/or its contents. These are generally legal restrictions on the use and publishing of the value set." ) protected StringType copyright; /** * The status of the value set. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the value set." ) protected Enumeration status; /** * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * Whether this is intended to be used with an extensible binding or not. */ - @Child(name="extensible", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name="extensible", type={BooleanType.class}, order=10, min=0, max=1) @Description(shortDefinition="Whether this is intended to be used with an extensible binding", formalDefinition="Whether this is intended to be used with an extensible binding or not." ) protected BooleanType extensible; /** * The date that the value set status was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name="date", type={DateTimeType.class}, order=11, min=0, max=1) @Description(shortDefinition="Date for given status", formalDefinition="The date that the value set status was last changed." ) protected DateTimeType date; /** * If a Stability Date is expanded by evaluating the Content Logical Definition using the current version of all referenced code system(s) and value sets as of the Stability Date. */ - @Child(name="stableDate", type={DateType.class}, order=11, min=0, max=1) + @Child(name="stableDate", type={DateType.class}, order=12, min=0, max=1) @Description(shortDefinition="Fixed date for the version of all referenced code systems and value sets", formalDefinition="If a Stability Date is expanded by evaluating the Content Logical Definition using the current version of all referenced code system(s) and value sets as of the Stability Date." ) protected DateType stableDate; /** * When value set defines its own codes. */ - @Child(name="define", type={}, order=12, min=0, max=1) + @Child(name="define", type={}, order=13, min=0, max=1) @Description(shortDefinition="When value set defines its own codes", formalDefinition="When value set defines its own codes." ) protected ValueSetDefineComponent define; /** * When value set includes codes from elsewhere. */ - @Child(name="compose", type={}, order=13, min=0, max=1) + @Child(name="compose", type={}, order=14, min=0, max=1) @Description(shortDefinition="When value set includes codes from elsewhere", formalDefinition="When value set includes codes from elsewhere." ) protected ValueSetComposeComponent compose; /** * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. */ - @Child(name="expansion", type={}, order=14, min=0, max=1) + @Child(name="expansion", type={}, order=15, min=0, max=1) @Description(shortDefinition="Used when the value set is 'expanded'", formalDefinition="A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." ) protected ValueSetExpansionComponent expansion; @@ -3402,26 +3402,26 @@ public class ValueSet extends DomainResource { return ResourceType.ValueSet; } - @SearchParamDefinition(name="system", path="ValueSet.define.system", description="The system for any codes defined by this value set", type="token" ) - public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="code", path="ValueSet.define.concept.code", description="A code defined in the value set", type="token" ) - public static final String SP_CODE = "code"; @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier of the value set", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="token" ) public static final String SP_REFERENCE = "reference"; + @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier of the value set", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="system", path="ValueSet.define.system", description="The system for any codes defined by this value set", type="token" ) + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="code", path="ValueSet.define.concept.code", description="A code defined in the value set", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set", type="string" ) + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" ) public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) + public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" ) public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java index 50785cd903a..4083960c221 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -2688,35 +2688,35 @@ public class VisionClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=0, min=0, max=1) + @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=3, min=0, max=1) + @Child(name="target", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class VisionClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class VisionClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class VisionClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=6, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=7, min=0, max=1) + @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=8, min=0, max=1) + @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class VisionClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=10, min=0, max=1) + @Child(name="facility", type={Location.class}, order=11, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,7 +2797,7 @@ public class VisionClaim extends DomainResource { /** * Prescription to support the dispensing of glasses or contact lenses. */ - @Child(name="prescription", type={VisionPrescription.class}, order=11, min=0, max=1) + @Child(name="prescription", type={VisionPrescription.class}, order=12, min=0, max=1) @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of glasses or contact lenses." ) protected Reference prescription; @@ -2809,14 +2809,14 @@ public class VisionClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=12, min=0, max=1) + @Child(name="payee", type={}, order=13, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) + @Child(name="referral", type={ReferralRequest.class}, order=14, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2828,21 +2828,21 @@ public class VisionClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name="diagnosis", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name="condition", type={Coding.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) + @Child(name="patient", type={Patient.class}, order=17, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2854,56 +2854,56 @@ public class VisionClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name="coverage", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name="exception", type={Coding.class}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=19, min=0, max=1) + @Child(name="school", type={StringType.class}, order=20, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) + @Child(name="accident", type={DateType.class}, order=21, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) + @Child(name="accidentType", type={Coding.class}, order=22, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name="interventionException", type={Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name="item", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name="additionalMaterials", type={Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3997,14 +3997,14 @@ public class VisionClaim extends DomainResource { return ResourceType.VisionClaim; } + @SearchParamDefinition(name="identifier", path="VisionClaim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="use", path="VisionClaim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="VisionClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="VisionClaim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="use", path="VisionClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; - @SearchParamDefinition(name="identifier", path="VisionClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java index c5fb9918ffd..515ceefc532 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Sat, Feb 14, 2015 16:12-0500 for FHIR v0.4.0 +// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 import java.util.*; @@ -1100,21 +1100,21 @@ public class VisionPrescription extends DomainResource { /** * Business identifier which may be used by other parties to reference or identify the prescription. */ - @Child(name="identifier", type={Identifier.class}, order=-1, min=0, max=Child.MAX_UNLIMITED) + @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Business identifier which may be used by other parties to reference or identify the prescription." ) protected List identifier; /** * The date (and perhaps time) when the prescription was written. */ - @Child(name="dateWritten", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name="dateWritten", type={DateTimeType.class}, order=1, min=0, max=1) @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) protected DateTimeType dateWritten; /** * A link to a resource representing the person to whom the Vision products will be supplied. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name="patient", type={Patient.class}, order=2, min=0, max=1) @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the Vision products will be supplied." ) protected Reference patient; @@ -1126,7 +1126,7 @@ public class VisionPrescription extends DomainResource { /** * The healthcare professional responsible for authorizing the prescription. */ - @Child(name="prescriber", type={Practitioner.class}, order=2, min=0, max=1) + @Child(name="prescriber", type={Practitioner.class}, order=3, min=0, max=1) @Description(shortDefinition="Who authorizes the Vision product", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) protected Reference prescriber; @@ -1138,7 +1138,7 @@ public class VisionPrescription extends DomainResource { /** * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. */ - @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) + @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) protected Reference encounter; @@ -1150,14 +1150,14 @@ public class VisionPrescription extends DomainResource { /** * Can be the reason or the indication for writing the prescription. */ - @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=4, min=0, max=1) + @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=5, min=0, max=1) @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) protected Type reason; /** * Deals with details of the dispense part of the supply specification. */ - @Child(name="dispense", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name="dispense", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Vision supply authorization", formalDefinition="Deals with details of the dispense part of the supply specification." ) protected List dispense; @@ -1515,14 +1515,14 @@ public class VisionPrescription extends DomainResource { return ResourceType.VisionPrescription; } - @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) - public static final String SP_DATEWRITTEN = "datewritten"; - @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="identifier", path="VisionPrescription.identifier", description="Return prescriptions with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) + public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java new file mode 100644 index 00000000000..65a64de79d7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java @@ -0,0 +1,153 @@ +package ca.uhn.fhir.model; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.hl7.fhir.instance.model.Address; +import org.hl7.fhir.instance.model.Base; +import org.hl7.fhir.instance.model.BooleanType; +import org.hl7.fhir.instance.model.Bundle; +import org.hl7.fhir.instance.model.Coding; +import org.hl7.fhir.instance.model.DecimalType; +import org.hl7.fhir.instance.model.Extension; +import org.hl7.fhir.instance.model.IBase; +import org.hl7.fhir.instance.model.ICompositeType; +import org.hl7.fhir.instance.model.IPrimitiveType; +import org.hl7.fhir.instance.model.IdType; +import org.hl7.fhir.instance.model.IntegerType; +import org.hl7.fhir.instance.model.Meta; +import org.hl7.fhir.instance.model.Narrative; +import org.hl7.fhir.instance.model.PrimitiveType; +import org.hl7.fhir.instance.model.Reference; +import org.hl7.fhir.instance.model.Resource; +import org.hl7.fhir.instance.model.Timing; +import org.hl7.fhir.instance.model.Type; +import org.hl7.fhir.instance.model.annotations.Block; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseDecimalDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype; +import org.hl7.fhir.instance.model.api.ICoding; +import org.hl7.fhir.instance.model.api.IDatatypeElement; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IMetaType; +import org.hl7.fhir.instance.model.api.INarrative; +import org.hl7.fhir.instance.model.api.IReference; +import org.junit.Test; + +public class ModelInheritanceTest { + + /** + *
    +	 * Other changes:
    +	 * 
    +	 * Reference:
    +	 *  * Add "resource" field, plus constructors and getter/setters for that field
    +	 *  
    +	 * Narrative:
    +	 *  * Add getValueAsDiv and setValueAsDiv
    +	 *  
    +	 * XhtmlParser and XhtmlEncoder:
    +	 *  * Do we need a better exception declaration?
    +	 *  
    +	 * ElementDefinition
    +	 *  * Backbone elements (eg .ElementDefinitionSlicingComponent) do not extend BackboneElement or have a @Block annotation for some reason
    +	 * 
    + */ + + @Test + public void testType() { + assertTrue(IBaseDatatype.class.isAssignableFrom(Type.class)); + } + + /** + * This one should apply to all composite types + */ + @Test + public void testAddress() { + assertTrue(ICompositeType.class.isAssignableFrom(Address.class)); + } + + @Test + public void testBase() { + assertTrue(IBase.class.isAssignableFrom(Base.class)); + } + + /** + * Should be "implements IBaseExtension" + */ + @Test + public void testExtension() { + assertTrue(IBaseExtension.class.isAssignableFrom(Extension.class)); + } + + @Test + public void testNarrative() { + assertTrue(INarrative.class.isAssignableFrom(Narrative.class)); + } + + @Test + public void testBooleanType() { + assertTrue(IBaseBooleanDatatype.class.isAssignableFrom(BooleanType.class)); + } + + @Test + public void testDecimalType() { + assertTrue(IBaseDecimalDatatype.class.isAssignableFrom(DecimalType.class)); + } + + @Test + public void testIntegerType() { + assertTrue(IBaseIntegerDatatype.class.isAssignableFrom(IntegerType.class)); + } + + @Test + public void testPrimitiveType() { + assertTrue(IPrimitiveType.class.isAssignableFrom(PrimitiveType.class)); + } + + @Test + public void testResource() { + assertTrue(IAnyResource.class.isAssignableFrom(Resource.class)); + } + + @Test + public void testBundle() { + assertTrue(IBaseBundle.class.isAssignableFrom(Bundle.class)); + } + + public void testIdType() { + assertTrue(IIdType.class.isAssignableFrom(IdType.class)); + } + + @Test + public void testReference() { + assertTrue(IReference.class.isAssignableFrom(Reference.class)); + } + + @Test + public void testMeta() { + assertTrue(IMetaType.class.isAssignableFrom(Meta.class)); + } + + @Test + public void testBackboneElement() { + assertTrue(IBackboneElement.class.isAssignableFrom(IBackboneElement.class)); + } + + @Test + public void testCoding() { + assertTrue(ICoding.class.isAssignableFrom(Coding.class)); + } + + @Test + public void testTiming_TimingRepeatComponent() { + assertTrue(IDatatypeElement.class.isAssignableFrom(Timing.TimingRepeatComponent.class)); + assertNotNull(Timing.TimingRepeatComponent.class.getAnnotation(Block.class)); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java index ab17e1cb13a..f7ba4972007 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java @@ -103,7 +103,7 @@ public class ContainedResourceEncodingTest { this.author = new Practitioner(); this.author.setId((UUID.randomUUID().toString())); this.author.addIdentifier().setSystem("DoctorID").setValue("4711"); - this.author.addRole().addCoding().setCode("doctor"); + this.author.addPractitionerRole().getRole().addCoding().setCode("doctor"); this.author.setName(new HumanName().addFamily("Mueller").addGiven("Klaus").addPrefix("Prof. Dr.")); } @@ -173,7 +173,7 @@ public class ContainedResourceEncodingTest { CodeableConcept obsName = new CodeableConcept(); obsName.setText("name"); - observation.setName(obsName); + observation.setCode(obsName); Reference result = dr.addResult(); result.setResource(observation); @@ -184,7 +184,7 @@ public class ContainedResourceEncodingTest { Practitioner p = new Practitioner(); p.setId((UUID.randomUUID().toString())); p.addIdentifier().setSystem("DoctorID").setValue("4711"); - p.addRole().setText("Doctor"); + p.addPractitionerRole().getRole().setText("Doctor"); p.setName(new HumanName().addFamily("Mueller").addGiven("Klaus").addPrefix("Prof. Dr.")); performer.setResource(p); @@ -212,7 +212,7 @@ public class ContainedResourceEncodingTest { CodeableConcept obsName = new CodeableConcept(); obsName.setText("name"); - observation.setName(obsName); + observation.setCode(obsName); Reference result = dr.addResult(); result.setResource(observation); @@ -223,7 +223,7 @@ public class ContainedResourceEncodingTest { Practitioner p = new Practitioner(); // no idDt on practitioner p p.addIdentifier().setSystem("DoctorID").setValue("4711"); - p.addRole().setText("Doctor"); + p.addPractitionerRole().getRole().setText("Doctor"); p.setName(new HumanName().addFamily("Mueller").addGiven("Klaus").addPrefix("Prof. Dr.")); performer.setResource(p); diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index 6e84670378e..54e9bedcf2e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -24,6 +24,7 @@ import org.hl7.fhir.instance.model.Binary; import org.hl7.fhir.instance.model.Bundle; import org.hl7.fhir.instance.model.Bundle.BundleEntryComponent; import org.hl7.fhir.instance.model.Conformance; +import org.hl7.fhir.instance.model.DateTimeType; import org.hl7.fhir.instance.model.DecimalType; import org.hl7.fhir.instance.model.DiagnosticReport; import org.hl7.fhir.instance.model.Extension; @@ -32,6 +33,7 @@ import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.InstantType; import org.hl7.fhir.instance.model.List_; +import org.hl7.fhir.instance.model.Identifier.IdentifierUse; import org.hl7.fhir.instance.model.Narrative.NarrativeStatus; import org.hl7.fhir.instance.model.Observation; import org.hl7.fhir.instance.model.Organization; @@ -63,7 +65,7 @@ public class JsonParserTest { Patient p = new Patient(); p.addIdentifier().setSystem("foo").setValue("bar"); p.getText().setStatus(NarrativeStatus.GENERATED); - p.getText().setDiv("
    hello
    "); + p.getText().setDivAsString("
    hello
    "); Bundle b = new Bundle(); b.setTotal(123); @@ -73,7 +75,7 @@ public class JsonParserTest { ourLog.info(out); assertThat(out, containsString("
    hello
    ")); - p.getText().setDiv("hello"); + p.getText().setDivAsString("hello"); out = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(b); ourLog.info(out); // Backslashes need to be escaped because they are in a JSON value @@ -262,14 +264,14 @@ public class JsonParserTest { public void testNestedContainedResources() { Observation A = new Observation(); - A.getName().setText("A"); + A.getCode().setText("A"); Observation B = new Observation(); - B.getName().setText("B"); + B.getCode().setText("B"); A.addRelated().setTarget(new Reference(B)); Observation C = new Observation(); - C.getName().setText("C"); + C.getCode().setText("C"); B.addRelated().setTarget(new Reference(C)); String str = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(A); @@ -285,13 +287,13 @@ public class JsonParserTest { assertEquals(-1, idx1); Observation obs = ourCtx.newJsonParser().parseResource(Observation.class, str); - assertEquals("A", obs.getName().getTextElement().getValue()); + assertEquals("A", obs.getCode().getTextElement().getValue()); Observation obsB = (Observation) obs.getRelated().get(0).getTarget().getResource(); - assertEquals("B", obsB.getName().getTextElement().getValue()); + assertEquals("B", obsB.getCode().getTextElement().getValue()); Observation obsC = (Observation) obsB.getRelated().get(0).getTarget().getResource(); - assertEquals("C", obsC.getName().getTextElement().getValue()); + assertEquals("C", obsC.getCode().getTextElement().getValue()); } @@ -470,13 +472,13 @@ public class JsonParserTest { // Create an organization, note that the organization does not have an ID Organization org = new Organization(); org.getNameElement().setValue("Contained Test Organization"); - org.getText().setDiv("
    FOOBAR
    "); + org.getText().setDivAsString("
    FOOBAR
    "); // Create a patient Patient patient = new Patient(); patient.setId("Patient/1333"); patient.addIdentifier().setSystem("urn:mrns").setValue( "253345"); - patient.getText().setDiv("
    BARFOO
    "); + patient.getText().setDivAsString("
    BARFOO
    "); patient.getManagingOrganization().setResource(org); String encoded = parser.encodeResourceToString(patient); @@ -597,7 +599,7 @@ public class JsonParserTest { DiagnosticReport rpt = new DiagnosticReport(); Specimen spm = new Specimen(); - rpt.getText().setDiv("AAA"); + rpt.getText().setDivAsString("AAA"); rpt.addSpecimen().setResource(spm); IParser p = new FhirContext(DiagnosticReport.class).newJsonParser().setPrettyPrint(true); @@ -677,6 +679,7 @@ public class JsonParserTest { code.setDisplay("someDisplay"); code.addExtension().setUrl("urn:alt").setValue( new StringType("alt name")); + String encoded = ourCtx.newJsonParser().encodeResourceToString(valueSet); ourLog.info(encoded); @@ -687,6 +690,59 @@ public class JsonParserTest { } + + @Test + public void testMoreExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + Extension ext = new Extension(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeType("2011-01-02T11:13:15")); + + // Add the extension to the resource + patient.getExtension().add(ext); + // END SNIPPET: resourceExtension + + // START SNIPPET: resourceStringExtension + HumanName name = patient.addName(); + name.addFamily("Shmoe"); + StringType given = name.addGivenElement(); + given.setValue("Joe"); + Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given")); + given.getExtension().add(ext2); + + StringType given2 = name.addGivenElement(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.getExtension().add(given2ext); + given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD")); + // END SNIPPET: resourceStringExtension + + // START SNIPPET: subExtension + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.getExtension().add(parent); + + Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + parent.getExtension().add(child1); + + Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + parent.getExtension().add(child2); + // END SNIPPET: subExtension + + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); + assertThat(enc, containsString("")); + assertThat( + enc, + containsString("")); + assertThat(enc, containsString("")); + } + + @Test public void testEncodeExtensionWithResourceContent() { IParser parser = new FhirContext().newJsonParser(); @@ -940,7 +996,7 @@ public class JsonParserTest { Reference reference = res.getResult().get(1); Observation obs = (Observation) reference.getResource(); - assertEquals("789-8", obs.getName().getCoding().get(0).getCode()); + assertEquals("789-8", obs.getCode().getCoding().get(0).getCode()); } @BeforeClass diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index b4a6b5ef65b..fa45b0174f3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -10,9 +10,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; import java.io.IOException; import java.io.InputStreamReader; @@ -51,11 +48,9 @@ import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.Identifier; import org.hl7.fhir.instance.model.Identifier.IdentifierUse; import org.hl7.fhir.instance.model.InstantType; -import org.hl7.fhir.instance.model.List_; import org.hl7.fhir.instance.model.Narrative.NarrativeStatus; import org.hl7.fhir.instance.model.Observation; import org.hl7.fhir.instance.model.Organization; -import org.hl7.fhir.instance.model.Organization.AdministrativeGender; import org.hl7.fhir.instance.model.Patient; import org.hl7.fhir.instance.model.Profile; import org.hl7.fhir.instance.model.Reference; @@ -147,13 +142,13 @@ public class XmlParserTest { // Create an organization, note that the organization does not have an ID Organization org = new Organization(); org.getNameElement().setValue("Contained Test Organization"); - org.getText().setDiv("
    FOOBAR
    "); + org.getText().setDivAsString("
    FOOBAR
    "); // Create a patient Patient patient = new Patient(); patient.setId("Patient/1333"); patient.addIdentifier().setSystem("urn:mrns").setValue( "253345"); - patient.getText().setDiv("
    BARFOO
    "); + patient.getText().setDivAsString("
    BARFOO
    "); patient.getManagingOrganization().setResource(org); String encoded = parser.encodeResourceToString(patient); @@ -412,7 +407,7 @@ public class XmlParserTest { DiagnosticReport rpt = new DiagnosticReport(); Specimen spm = new Specimen(); spm.addIdentifier().setSystem("urn").setValue( "123"); - rpt.getText().setDiv("AAA"); + rpt.getText().setDivAsString("AAA"); rpt.addSpecimen().setResource(spm); IParser p = ourCtx.newXmlParser().setPrettyPrint(true); @@ -508,7 +503,7 @@ public class XmlParserTest { Patient p = new Patient(); p.addIdentifier().setSystem("foo").setValue("bar"); p.getText().setStatus(NarrativeStatus.GENERATED); - p.getText().setDiv("
    hello
    "); + p.getText().setDivAsString("
    hello
    "); Bundle b = new Bundle(); b.setTotal(123); @@ -518,7 +513,7 @@ public class XmlParserTest { ourLog.info(out); assertThat(out, containsString("
    hello
    ")); - p.getText().setDiv("hello"); + p.getText().setDivAsString("hello"); out = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(b); ourLog.info(out); assertThat(out, containsString("hello")); @@ -529,7 +524,7 @@ public class XmlParserTest { public void testEncodePrettyPrint() throws Exception { Patient patient = new Patient(); - patient.getText().setDiv("
    \n hello
    \n  LINE1\n  LINE2
    \n\n\n\n
    "); + patient.getText().setDivAsString("
    \n hello
    \n  LINE1\n  LINE2
    \n\n\n\n
    "); patient.addName().addFamily("Family").addGiven("Given"); //@formatter:off @@ -901,6 +896,12 @@ public class XmlParserTest { given.setValue("Joe"); Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given")); given.getExtension().add(ext2); + + StringType given2 = name.addGivenElement(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.getExtension().add(given2ext); + given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD")); // END SNIPPET: resourceStringExtension // START SNIPPET: subExtension @@ -918,11 +919,11 @@ public class XmlParserTest { ourLog.info(output); String enc = ourCtx.newXmlParser().encodeResourceToString(patient); - assertThat(enc, containsString("")); + assertThat(enc, containsString("")); assertThat( enc, - containsString("")); - assertThat(enc, containsString("")); + containsString("")); + assertThat(enc, containsString("")); } @Test @@ -975,10 +976,10 @@ public class XmlParserTest { public void testDuplicateContainedResources() { Observation resA = new Observation(); - resA.getName().setText("A"); + resA.getCode().setText("A"); Observation resB = new Observation(); - resB.getName().setText("B"); + resB.getCode().setText("B"); resB.addRelated().setTarget(new Reference(resA)); resB.addRelated().setTarget(new Reference(resA)); @@ -994,14 +995,14 @@ public class XmlParserTest { public void testNestedContainedResources() { Observation A = new Observation(); - A.getName().setText("A"); + A.getCode().setText("A"); Observation B = new Observation(); - B.getName().setText("B"); + B.getCode().setText("B"); A.addRelated().setTarget(new Reference(B)); Observation C = new Observation(); - C.getName().setText("C"); + C.getCode().setText("C"); B.addRelated().setTarget(new Reference(C)); String str = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(A); @@ -1017,13 +1018,13 @@ public class XmlParserTest { assertEquals(-1, idx1); Observation obs = ourCtx.newXmlParser().parseResource(Observation.class, str); - assertEquals("A", obs.getName().getText()); + assertEquals("A", obs.getCode().getText()); Observation obsB = (Observation) obs.getRelated().get(0).getTarget().getResource(); - assertEquals("B", obsB.getName().getText()); + assertEquals("B", obsB.getCode().getText()); Observation obsC = (Observation) obsB.getRelated().get(0).getTarget().getResource(); - assertEquals("C", obsC.getName().getText()); + assertEquals("C", obsC.getCode().getText()); } @@ -1057,7 +1058,7 @@ public class XmlParserTest { Observation obs = (Observation) result0.getResource(); assertNotNull(obs); - assertEquals("718-7", obs.getName().getCoding().get(0).getCode()); + assertEquals("718-7", obs.getCode().getCoding().get(0).getCode()); } From e6405c99fbb3f960924ef4fc143958fa38fa0892 Mon Sep 17 00:00:00 2001 From: mochaholic Date: Wed, 18 Feb 2015 17:00:40 -0700 Subject: [PATCH 02/12] Added (commented-out) mysql configs to hapi-fhir-server-database-config.xml and the corresponding class to facilitate mysql-based deployment. --- .../java/ca/uhn/fhirtest/MySqlServer.java | 20 +++++++++++++ .../hapi-fhir-server-database-config.xml | 28 ++++++++++++++++--- 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/MySqlServer.java diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/MySqlServer.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/MySqlServer.java new file mode 100644 index 00000000000..31610b254cd --- /dev/null +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/MySqlServer.java @@ -0,0 +1,20 @@ +package ca.uhn.fhirtest; + +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.InitializingBean; + +/** + * Created by mochaholic on 18/02/2015. + */ +public class MySqlServer implements InitializingBean, DisposableBean { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(MySqlServer.class); + + @Override + public void destroy() throws Exception { + } + + @Override + public void afterPropertiesSet() throws Exception { + } + +} \ No newline at end of file diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml index 32b386941d4..80719eaa17a 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml @@ -1,7 +1,8 @@ + + + @@ -36,7 +43,19 @@ - + + + + @@ -47,6 +66,7 @@ +
    From 31d4dcdb90d244f1bae3a03c71945652054ce84d Mon Sep 17 00:00:00 2001 From: mochaholic Date: Thu, 19 Feb 2015 18:14:02 -0700 Subject: [PATCH 03/12] Added preliminary support for DSTU2-style security labels. --- .../java/ca/uhn/fhir/context/FhirContext.java | 18 ++++ .../model/api/ResourceMetadataKeyEnum.java | 31 +++++++ .../java/ca/uhn/fhir/parser/JsonParser.java | 44 +++++++-- .../java/ca/uhn/fhir/parser/ParserState.java | 92 +++++++++++++++++-- .../java/ca/uhn/fhir/parser/XmlParser.java | 38 +++++++- 5 files changed, 206 insertions(+), 17 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index e7f909fdaaa..2105d49a6e6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -28,6 +28,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.text.WordUtils; import org.hl7.fhir.instance.model.IBase; @@ -131,6 +132,23 @@ public class FhirContext { return getLocalizer().getMessage(FhirContext.class, "unknownResourceName", theResourceName, theVersion); } + public Class getCodingDtImplementation() { + FhirVersionEnum myVersionEnum = myVersion.getVersion(); + try { + + if (myVersionEnum.isEquivalentTo(FhirVersionEnum.DSTU2)) { + return (Class) Class.forName("ca.uhn.fhir.model.dstu2.composite.CodingDt"); + } else if (myVersionEnum.isEquivalentTo(FhirVersionEnum.DSTU1)) { + return (Class) Class.forName("ca.uhn.fhir.model.dstu.composite.CodingDt"); + + } else { + throw new IllegalStateException("No implementation found for BaseCodingDt in this FHIR Version." + myVersionEnum.toString()); + } + } catch (ClassNotFoundException e) { + throw new IllegalStateException("No implementation found for BaseCodingDt.", e); + } + } + /** * Returns the scanned runtime model for the given type. This is an advanced feature which is generally only needed * for extending the core library. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java index 0cf0e4389b1..c77128a1ce7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java @@ -28,6 +28,7 @@ import java.util.Date; import java.util.List; import java.util.Map; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; import org.apache.commons.lang3.StringUtils; import ca.uhn.fhir.model.primitive.DecimalDt; @@ -62,6 +63,36 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; */ public abstract class ResourceMetadataKeyEnum { + public static final ResourceMetadataKeyEnum> SECURITY_LABELS = new ResourceMetadataKeyEnum>("SECURITY_LABELS") { + @Override + public List get(IResource resource) { + Object obj = resource.getResourceMetadata().get(SECURITY_LABELS); + if (obj == null) { + return null; + } else { + try { + List securityLabels = (List) obj; + if (securityLabels.isEmpty()) + return null; + else + return securityLabels; + } catch (ClassCastException e) { + throw new InternalErrorException("Found an object of type '" + obj.getClass().getCanonicalName() + "' in resource metadata for key SECURITY_LABELS - Expected " + + BaseCodingDt.class.getCanonicalName()); + + } + + } + } + + @Override + public void put(IResource iResource, List labels) { + iResource.getResourceMetadata().put(SECURITY_LABELS, labels); + } + + }; + + /** * If present and populated with a date/time (as an instance of {@link InstantDt}), this value is an indication that the resource is in the deleted state. This key is only used in a limited number * of scenarios, such as POSTing transaction bundles to a server, or returning resource history. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index 7c11fae1054..e3f7b256e12 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -47,6 +47,8 @@ import javax.json.stream.JsonGenerator; import javax.json.stream.JsonGeneratorFactory; import javax.json.stream.JsonParsingException; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; +import ca.uhn.fhir.model.primitive.*; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.hl7.fhir.instance.model.IBase; @@ -85,12 +87,6 @@ import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.BaseBinary; -import ca.uhn.fhir.model.primitive.BooleanDt; -import ca.uhn.fhir.model.primitive.DecimalDt; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.IntegerDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.util.ElementUtil; import ca.uhn.fhir.util.UrlUtil; @@ -652,7 +648,41 @@ public class JsonParser extends BaseParser implements IParser { theEventWriter.writeStartObject("meta"); writeOptionalTagWithTextNode(theEventWriter, "versionId", resource.getId().getVersionIdPart()); writeOptionalTagWithTextNode(theEventWriter, "lastUpdated", ResourceMetadataKeyEnum.UPDATED.get(resource)); - theEventWriter.writeEnd(); + + Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS); + if (securityLabelRawObj != null) { + List securityLabels = (List) securityLabelRawObj; + if (!securityLabels.isEmpty()) { + theEventWriter.writeStartArray("security"); + + for (BaseCodingDt securityLabel : securityLabels) { + theEventWriter.writeStartObject(); + + UriDt system = securityLabel.getSystemElement(); + if (system != null && !system.isEmpty()) + writeOptionalTagWithTextNode(theEventWriter, "system", system.getValueAsString()); + + CodeDt code = securityLabel.getCodeElement(); + + if (code != null && !code.isEmpty()) + writeOptionalTagWithTextNode(theEventWriter, "code", code.getValueAsString()); + + StringDt display = securityLabel.getDisplayElement(); + if (display != null && !display.isEmpty()) + writeOptionalTagWithTextNode(theEventWriter, "display", display.getValueAsString()); + + /*todo: handle version + StringDt version = securityLabel.getVersion(); + if (version != null && ! version.isEmpty()) + writeOptionalTagWithTextNode(theEventWriter, "version", version.getValueAsString()); + */ + theEventWriter.writeEnd(); //end the individual security label + } + theEventWriter.writeEnd(); //end security labels array + } + } + + theEventWriter.writeEnd(); //end meta } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 1df2a0c1b1b..752e60ba0e9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -30,13 +30,13 @@ import java.util.Map; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.hl7.fhir.instance.model.IBase; import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.ICompositeType; import org.hl7.fhir.instance.model.IPrimitiveType; -import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseElement; import org.hl7.fhir.instance.model.api.IReference; @@ -48,29 +48,24 @@ import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition; -import ca.uhn.fhir.context.RuntimeElemContainedResources; import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition; import ca.uhn.fhir.context.RuntimePrimitiveDatatypeNarrativeDefinition; import ca.uhn.fhir.context.RuntimeResourceBlockDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.RuntimeResourceReferenceDefinition; import ca.uhn.fhir.model.api.BaseBundle; import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.BundleEntry; import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.ICompositeElement; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IIdentifiableElement; import ca.uhn.fhir.model.api.IPrimitiveDatatype; import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.Tag; import ca.uhn.fhir.model.api.TagList; -import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.BaseBinary; import ca.uhn.fhir.model.base.resource.ResourceMetadataMap; @@ -1641,6 +1636,75 @@ class ParserState { } + + private class CodingSubElementState extends BaseState { + BaseCodingDt myCoding; + + String thePartWeAreAt; + + public CodingSubElementState(PreResourceState thePreResourceState, BaseCodingDt codingDt, String whichPartAreWeAt) { + super(thePreResourceState); + myCoding = codingDt; + thePartWeAreAt = whichPartAreWeAt; + } + + @Override + public void endingElement() throws DataFormatException { + pop(); + } + + @Override + public void attributeValue(String theName, String theValue) throws DataFormatException { + if ("value".equals(theName)) { + if ("system".equals(thePartWeAreAt)) + myCoding.setSystem(theValue); + else if ("code".equals(thePartWeAreAt)) + myCoding.setCode(theValue); + else if ("display".equals(thePartWeAreAt)) + myCoding.setDisplay(theValue); + else if ("version".equals(thePartWeAreAt)) { + /* + todo: handle version properly when BaseCodingDt is fixed to support version. For now, we just swallow version in order to avoid throwing a DataFormat exception. + + myCoding.setVersion(theValue); + */ + } else + throw new DataFormatException("Unexpected element '" + theValue + "' found in 'security' element"); + } else { + throw new DataFormatException("Unexpected attribute '" + theName + "' found in '" + thePartWeAreAt + "' element"); + } + } + + @Override + public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException { + throw new DataFormatException("Unexpected element '" + theLocalPart + "' found in 'system' element"); + + } + } + + + private class CodingElementState extends BaseState { + BaseCodingDt myCoding; + + + public CodingElementState(ParserState.PreResourceState thePreResourceState, BaseCodingDt codingDt) { + super(thePreResourceState); + myCoding = codingDt; + } + + @Override + public void endingElement() throws DataFormatException { + pop(); + } + + + @Override + public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException { + push(new CodingSubElementState(getPreResourceState(), myCoding, theLocalPart)); + } + + } + private class MetaElementState extends BaseState { private ResourceMetadataMap myMap; @@ -1664,6 +1728,22 @@ class ParserState { InstantDt updated = new InstantDt(); push(new PrimitiveState(getPreResourceState(), updated)); myMap.put(ResourceMetadataKeyEnum.UPDATED, updated); + } else if (theLocalPart.equals("security")) { + List securityLabels = (List) myMap.get(ResourceMetadataKeyEnum.SECURITY_LABELS); + if (securityLabels == null) { + securityLabels = new ArrayList(); + myMap.put(ResourceMetadataKeyEnum.SECURITY_LABELS, securityLabels); + } + BaseCodingDt securityLabel; + try { + securityLabel = myContext.getCodingDtImplementation().newInstance(); + } catch (InstantiationException e) { + throw new DataFormatException("Error parsing element 'security' ", e); + } catch (IllegalAccessException e) { + throw new DataFormatException("Error parsing element 'security' ", e); + } + push(new CodingElementState(getPreResourceState(), securityLabel)); + securityLabels.add(securityLabel); } else { throw new DataFormatException("Unexpected element '" + theLocalPart + "' found in 'meta' element"); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index f3d3fcd4bd6..40800549f0f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -44,6 +44,8 @@ import javax.xml.stream.events.Namespace; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; +import ca.uhn.fhir.model.primitive.*; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.IBase; import org.hl7.fhir.instance.model.IBaseResource; @@ -76,10 +78,6 @@ import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.BaseBinary; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.model.primitive.StringDt; -import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.rest.method.BaseMethodBinding; import ca.uhn.fhir.util.NonPrettyPrintWriterWrapper; @@ -719,6 +717,38 @@ public class XmlParser extends BaseParser implements IParser { if (updated != null) { writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString()); } + + Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS); + if (securityLabelRawObj != null) { + List securityLabels = (List) securityLabelRawObj; + if (!securityLabels.isEmpty()) { + + for (BaseCodingDt securityLabel : securityLabels) { + theEventWriter.writeStartElement("security"); + + UriDt system = securityLabel.getSystemElement(); + if (system != null && !system.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "system", system.getValueAsString()); + + CodeDt code = securityLabel.getCodeElement(); + if (code != null && !code.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "code", code.getValueAsString()); + + StringDt display = securityLabel.getDisplayElement(); + if (display != null && !display.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "display", display.getValueAsString()); + + /*todo: handle version + StringDt version = securityLabel.getVersion(); + if (version != null && ! version.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "version", version.getValueAsString()); + */ + theEventWriter.writeEndElement(); + } + + } + } + theEventWriter.writeEndElement(); } From 0f012603012c47d66f8a1378cd263e0db82a93f5 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Fri, 20 Feb 2015 17:34:13 -0500 Subject: [PATCH 04/12] Get extensions working for HL7.org structures --- .../main/java/example/ExampleProviders.java | 20 ++ .../java/example/PagingPatientProvider.java | 28 +- hapi-fhir-base/pom.xml | 63 ---- .../BaseRuntimeChildDatatypeDefinition.java | 4 +- ...BaseRuntimeElementCompositeDefinition.java | 3 - .../context/BaseRuntimeElementDefinition.java | 5 +- .../ca/uhn/fhir/context/ModelScanner.java | 8 +- ...imeChildEnumerationDatatypeDefinition.java | 58 ++++ ...ntimeChildPrimitiveDatatypeDefinition.java | 2 + .../ca/uhn/fhir/model/api/BaseElement.java | 3 +- .../ca/uhn/fhir/model/api/ExtensionDt.java | 42 ++- .../java/ca/uhn/fhir/model/api/IDatatype.java | 4 +- .../api/ISupportsUndeclaredExtensions.java | 6 +- .../java/ca/uhn/fhir/model/api/TagList.java | 4 +- .../uhn/fhir/model/api/annotation/Child.java | 27 ++ .../composite/BaseResourceReferenceDt.java | 6 +- .../java/ca/uhn/fhir/parser/JsonParser.java | 274 +++++++----------- .../java/ca/uhn/fhir/parser/ParserState.java | 55 +++- .../java/ca/uhn/fhir/parser/XmlParser.java | 125 ++++---- .../fhir/rest/method/BaseMethodBinding.java | 19 +- .../instance/model/api/IBaseEnumFactory.java | 25 ++ .../instance/model/api/IBaseExtension.java | 4 + .../model/api/IBaseHasExtensions.java | 11 + .../model/api/IBaseHasModifierExtensions.java | 11 + .../parser/MultiVersionJsonParserTest.java | 2 +- .../uhn/fhir/testmindeps/ValidatorTest.java | 35 +-- .../ca/uhn/fhir/jpa/demo/JpaServerDemo.java | 3 +- .../java/ca/uhn/fhir/model/dev/FhirDev.java | 4 +- .../ca/uhn/fhir/model/dstu/FhirDstu1.java | 3 - .../ca/uhn/fhir/parser/JsonParserTest.java | 138 ++++++++- .../ca/uhn/fhir/parser/XmlParserTest.java | 94 +++++- .../ca/uhn/fhir/model/dstu2/FhirDstu2.java | 2 + .../ca/uhn/fhir/parser/JsonParserTest.java | 216 +++++++------- .../ca/uhn/fhir/parser/XmlParserTest.java | 108 ++++++- .../ca/uhn/fhir/rest/server/IncludeTest.java | 17 -- .../validation/ResourceValidatorTest.java | 2 +- .../hl7/fhir/instance/FhirDstu2Hl7Org.java | 3 + .../fhir/instance/model/BackboneElement.java | 4 +- .../fhir/instance/model/DomainResource.java | 4 +- .../org/hl7/fhir/instance/model/Element.java | 3 +- .../hl7/fhir/instance/model/EnumFactory.java | 4 +- .../hl7/fhir/instance/model/Enumeration.java | 11 + .../hl7/fhir/instance/model/Extension.java | 9 +- .../hl7/fhir/instance/model/Identifier.java | 2 +- .../fhir/instance/model/PrimitiveType.java | 3 +- .../instance/model/annotations/Child.java | 26 ++ .../uhn/fhir/model/ModelInheritanceTest.java | 35 ++- .../ca/uhn/fhir/parser/JsonParserTest.java | 130 ++++++++- .../ca/uhn/fhir/parser/XmlParserTest.java | 78 +++-- .../java/ca/uhn/fhir/model/dev/FhirDev.java | 7 + .../ca/uhn/fhir/model/dstu/FhirDstu1.java | 6 + .../ca/uhn/fhir/model/dstu2/FhirDstu2.java | 6 + src/site/xdoc/doc_rest_server.xml | 23 ++ 53 files changed, 1254 insertions(+), 531 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java create mode 100644 hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java create mode 100644 hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java create mode 100644 hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java diff --git a/examples/src/main/java/example/ExampleProviders.java b/examples/src/main/java/example/ExampleProviders.java index a55c5b30610..e3c17420884 100644 --- a/examples/src/main/java/example/ExampleProviders.java +++ b/examples/src/main/java/example/ExampleProviders.java @@ -8,6 +8,7 @@ import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.rest.annotation.RequiredParam; import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.server.HardcodedServerAddressStrategy; import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.RestfulServer; @@ -36,6 +37,7 @@ public class PlainProvider { //START SNIPPET: plainProviderServer public class ExampleServlet extends RestfulServer { + /** Constructor */ public ExampleServlet() { /* * Plain providers are passed to the server in the same way @@ -54,5 +56,23 @@ public class ExampleServlet extends RestfulServer { } //END SNIPPET: plainProviderServer +//START SNIPPET: addressStrategy +public class MyServlet extends RestfulServer { + + /** Constructor */ + public MyServlet() { + + String serverBaseUrl = "http://foo.com/fhir"; + setServerAddressStrategy(new HardcodedServerAddressStrategy(serverBaseUrl)); + + // ...add some resource providers, etc... + List resourceProviders = new ArrayList(); + setResourceProviders(resourceProviders); + } + + } +//END SNIPPET: addressStrategy + + } diff --git a/examples/src/main/java/example/PagingPatientProvider.java b/examples/src/main/java/example/PagingPatientProvider.java index d1cb53a1708..0e4de55f57a 100644 --- a/examples/src/main/java/example/PagingPatientProvider.java +++ b/examples/src/main/java/example/PagingPatientProvider.java @@ -12,6 +12,7 @@ import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IResourceProvider; +@SuppressWarnings("null") //START SNIPPET: provider public class PagingPatientProvider implements IResourceProvider { @@ -21,11 +22,22 @@ public class PagingPatientProvider implements IResourceProvider { @Search public IBundleProvider search(@RequiredParam(name = Patient.SP_FAMILY) StringParam theFamily) { final InstantDt searchTime = InstantDt.withCurrentTime(); - final List matchingResourceIds = findIdsByFamily(theFamily); + /* + * First, we'll search the database for a set of database row IDs that + * match the given search criteria. That way we can keep just the + * row IDs around, and load the actual resources on demand later + * as the client pages through them. + */ + final List matchingResourceIds = null; // <-- implement this + + /* + * Return a bundle provider which can page through the IDs and + * return the resources that go with them. + */ return new IBundleProvider() { - @Override + @Override public int size() { return matchingResourceIds.size(); } @@ -33,7 +45,7 @@ public class PagingPatientProvider implements IResourceProvider { @Override public List getResources(int theFromIndex, int theToIndex) { int end = Math.max(theToIndex, matchingResourceIds.size() - 1); - List idsToReturn = matchingResourceIds.subList(theFromIndex, end); + List idsToReturn = matchingResourceIds.subList(theFromIndex, end); return loadResourcesByIds(idsToReturn); } @@ -44,18 +56,10 @@ public class PagingPatientProvider implements IResourceProvider { }; } - /** - * Get a list of resource IDs which match a given family name - */ - private List findIdsByFamily(StringParam theFamily) { - // .. implement this search against the database .. - return null; - } - /** * Load a list of patient resources given their IDs */ - private List loadResourcesByIds(List theFamily) { + private List loadResourcesByIds(List theIdsToReturn) { // .. implement this search against the database .. return null; } diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 45697b18602..b7664d67257 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -195,69 +195,6 @@ - - ANDROID - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu - 0.9-SNAPSHOT - - - org.slf4j - slf4j-android - ${slf4j_version} - - - - - - org.apache.maven.plugins - maven-shade-plugin - 1.4 - - - package - - shade - - - false - true - - - - ca.uhn.hapi.fhir:hapi-fhir-structures-dstu - ca.uhn.hapi.fhir:hapi-fhir-structures-dstu - org.glassfish:javax.json - org.codehaus.woodstox:woodstox-core-asl - javax.xml.stream:stax-api - org.codehaus.woodstox:stax2-api - org.slf4j:slf4j* - org.apache.commons:* - org.apache.httpcomponents:* - - - - - javax.xml.stream - ca.uhn.fhir.repackage.javax.xml.stream - - - javax.json - ca.uhn.fhir.repackage.javax.json - - - - - - - - - - diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java index c0f780870e6..7328cff0b9c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java @@ -21,6 +21,7 @@ package ca.uhn.fhir.context; */ import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.Collections; import java.util.Map; import java.util.Set; @@ -28,7 +29,6 @@ import java.util.Set; import org.hl7.fhir.instance.model.IBase; import ca.uhn.fhir.model.api.ICodeEnum; -import ca.uhn.fhir.model.api.IDatatype; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; @@ -41,7 +41,7 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class theDatatype) { super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName); - assert theDatatype != IDatatype.class; // should use RuntimeChildAny + assert Modifier.isInterface(theDatatype.getModifiers()) == false : "Type of " + theDatatype + " shouldn't be here"; // should use RuntimeChildAny myDatatype = theDatatype; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java index 68ed38095bb..806f9296be8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementCompositeDefinition.java @@ -45,9 +45,6 @@ public abstract class BaseRuntimeElementCompositeDefinition ext if (theNext == null) { throw new NullPointerException(); } -// if (theNext.getValidChildNames().contains("performetPractitioner")) { -// throw new NullPointerException(); -// } if (theNext.getExtensionUrl() != null) { throw new IllegalArgumentException("Shouldn't haven an extension URL, use addExtension instead"); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java index d1735113aea..df594b2bd84 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java @@ -29,6 +29,7 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.IBase; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; import ca.uhn.fhir.model.api.IValueSetEnumBinder; @@ -102,8 +103,10 @@ public abstract class BaseRuntimeElementDefinition { try { if (theArgument == null) { return getImplementingClass().newInstance(); - } else { + } else if (theArgument instanceof IValueSetEnumBinder) { return getImplementingClass().getConstructor(IValueSetEnumBinder.class).newInstance(theArgument); + }else { + return getImplementingClass().getConstructor(IBaseEnumFactory.class).newInstance(theArgument); } } catch (InstantiationException e) { throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index 893fc0d7481..4dc9edef6d9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -55,6 +55,7 @@ import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBackboneElement; import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IDatatypeElement; import org.hl7.fhir.instance.model.api.IDomainResource; @@ -555,7 +556,7 @@ class ModelScanner { RuntimeChildResourceBlockDefinition def = new RuntimeChildResourceBlockDefinition(next, childAnnotation, descriptionAnnotation, elementName, blockDef); orderMap.put(order, def); - } else if (IDatatype.class.equals(nextElementType) || IElement.class.equals(nextElementType) || "org.hl7.fhir.instance.model.Type".equals(nextElementType.getName())) { + } else if (IDatatype.class.equals(nextElementType) || IElement.class.equals(nextElementType) || "org.hl7.fhir.instance.model.Type".equals(nextElementType.getName()) || IBaseDatatype.class.equals(nextElementType)) { RuntimeChildAny def = new RuntimeChildAny(next, elementName, childAnnotation, descriptionAnnotation); orderMap.put(order, def); @@ -565,10 +566,13 @@ class ModelScanner { addScanAlso(nextDatatype); BaseRuntimeChildDatatypeDefinition def; - if (IPrimitiveDatatype.class.isAssignableFrom(nextElementType)) { + if (IPrimitiveType.class.isAssignableFrom(nextElementType)) { if (nextElementType.equals(BoundCodeDt.class)) { IValueSetEnumBinder> binder = getBoundCodeBinder(next); def = new RuntimeChildPrimitiveBoundCodeDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype, binder); + } else if (childAnnotation.enumFactory().getSimpleName().equals("NoEnumFactory") == false) { + Class> enumFactory = childAnnotation.enumFactory(); + def = new RuntimeChildEnumerationDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype, enumFactory); } else { def = new RuntimeChildPrimitiveDatatypeDefinition(next, elementName, descriptionAnnotation, childAnnotation, nextDatatype); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java new file mode 100644 index 00000000000..dc659f3b826 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java @@ -0,0 +1,58 @@ +package ca.uhn.fhir.context; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.lang.reflect.Field; + +import org.hl7.fhir.instance.model.IBase; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; + +public class RuntimeChildEnumerationDatatypeDefinition extends RuntimeChildPrimitiveDatatypeDefinition { + + private Class> myBinderType; + private volatile IBaseEnumFactory myBinder; + + public RuntimeChildEnumerationDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class theDatatype, Class> theBinderType) { + super(theField, theElementName, theDescriptionAnnotation, theChildAnnotation, theDatatype); + + myBinderType = theBinderType; + } + + @Override + public IBaseEnumFactory getInstanceConstructorArguments() { + IBaseEnumFactory retVal = myBinder; + if (retVal == null) { + try { + retVal = myBinderType.newInstance(); + } catch (InstantiationException e) { + throw new IllegalStateException("Failed to instantiate " + myBinderType, e); + } catch (IllegalAccessException e) { + throw new IllegalStateException("Failed to instantiate " + myBinderType, e); + } + myBinder = retVal; + } + return retVal; + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java index efdb23180ed..ef5a7ecdefe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java @@ -32,5 +32,7 @@ public class RuntimeChildPrimitiveDatatypeDefinition extends BaseRuntimeChildDat public RuntimeChildPrimitiveDatatypeDefinition(Field theField, String theElementName, Description theDescriptionAnnotation, Child theChildAnnotation, Class theDatatype) { super(theField, theElementName, theChildAnnotation, theDescriptionAnnotation, theDatatype); } + + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java index 266231cca0c..c86d26bf293 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBaseDatatype; public abstract class BaseElement implements IElement, ISupportsUndeclaredExtensions { @@ -32,7 +33,7 @@ public abstract class BaseElement implements IElement, ISupportsUndeclaredExtens private List myUndeclaredModifierExtensions; @Override - public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue) { + public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IBaseDatatype theValue) { Validate.notEmpty(theUrl, "URL must be populated"); Validate.notNull(theValue, "Value must not be null"); ExtensionDt retVal = new ExtensionDt(theIsModifier, theUrl, theValue); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java index 479bfbdef24..95a4374e695 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java @@ -24,13 +24,15 @@ import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.Validate; +import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.primitive.StringDt; @DatatypeDef(name="Extension") -public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDatatype { +public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDatatype, IBaseExtension { private boolean myModifier; @@ -38,7 +40,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa private StringDt myUrl; @Child(name="value", type=IDatatype.class, order=1, min=0, max=1) - private IElement myValue; + private IBaseDatatype myValue; public ExtensionDt() { } @@ -54,7 +56,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa myUrl = new StringDt(theUrl); } - public ExtensionDt(boolean theIsModifier, String theUrl, IDatatype theValue) { + public ExtensionDt(boolean theIsModifier, String theUrl, IBaseDatatype theValue) { Validate.notEmpty(theUrl, "URL must be populated"); Validate.notNull(theValue, "Value must not be null"); @@ -63,15 +65,25 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa myValue=theValue; } - public StringDt getUrl() { - if (myUrl==null) { - myUrl=new StringDt(); - } - return myUrl; + /** + * Returns the URL for this extension. + *

    + * Note that before HAPI 0.9 this method returned a {@link StringDt} but as of + * HAPI 0.9 this method returns a plain string. This was changed because it does not make sense to use a StringDt here + * since the URL itself can not contain extensions and it was therefore misleading. + *

    + */ + public String getUrl() { + return myUrl != null ? myUrl.getValue() : null; } + /** + * Retained for backward compatibility + * + * @see ExtensionDt#getUrl() + */ public String getUrlAsString() { - return getUrl().getValue(); + return getUrl(); } /** @@ -81,7 +93,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa * {@link #getUndeclaredModifierExtensions()} to retrieve the child extensions. *

    */ - public IElement getValue() { + public IBaseDatatype getValue() { return myValue; } @@ -117,7 +129,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa } public ExtensionDt setUrl(String theUrl) { - myUrl = new StringDt(theUrl); + myUrl = theUrl != null ? new StringDt(theUrl) : myUrl; return this; } @@ -126,8 +138,9 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa return this; } - public void setValue(IElement theValue) { + public ExtensionDt setValue(IBaseDatatype theValue) { myValue = theValue; + return this; } @Override @@ -135,4 +148,9 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa return new ArrayList(); } + @Override + public List getExtension() { + return getAllUndeclaredExtensions(); + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java index 7b67dfdb40f..a42c6721fbb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java @@ -1,5 +1,7 @@ package ca.uhn.fhir.model.api; +import org.hl7.fhir.instance.model.api.IBaseDatatype; + /* * #%L * HAPI FHIR - Core Library @@ -20,6 +22,6 @@ package ca.uhn.fhir.model.api; * #L% */ -public interface IDatatype extends IElement { +public interface IDatatype extends IElement, IBaseDatatype { } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java index cc8c858055a..1c34760264b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java @@ -22,6 +22,8 @@ package ca.uhn.fhir.model.api; import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseDatatype; + public interface ISupportsUndeclaredExtensions extends IElement { /** @@ -52,7 +54,7 @@ public interface ISupportsUndeclaredExtensions extends IElement { *
  • {@link ExtensionDt#setUrl(String) URL}
  • *
  • And one of: *
      - *
    • {@link ExtensionDt#setValue(IElement) A datatype value}
    • + *
    • {@link ExtensionDt#setValue(IBaseDatatype) A datatype value}
    • *
    • {@link #addUndeclaredExtension(ExtensionDt) Further sub-extensions}
    • *
    * @@ -64,7 +66,7 @@ public interface ISupportsUndeclaredExtensions extends IElement { /** * Adds an extension to this object */ - ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue); + ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IBaseDatatype theValue); /** * Adds an extension to this object. This method is intended for use when diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java index 110e23a2c80..a0ae718023d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java @@ -28,6 +28,8 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import org.hl7.fhir.instance.model.IBase; + /** * A collection of tags present on a single resource. TagList is backed by a {@link LinkedHashSet}, so the order of added tags will be consistent, but duplicates will not be preserved. * @@ -35,7 +37,7 @@ import java.util.Set; * Thread safety: This class is not thread safe *

    */ -public class TagList implements Set, Serializable { +public class TagList implements Set, Serializable, IBase { public static final String ATTR_CATEGORY = "category"; public static final String ELEMENT_NAME = "TagList"; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java index 7bc22405846..3e80a0c0203 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java @@ -24,6 +24,9 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import java.util.Enumeration; + +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; import ca.uhn.fhir.model.api.IElement; @@ -97,4 +100,28 @@ public @interface Child { // */ // String replaces() default ""; + /** + * For children which accept an {@link Enumeration} as the type, this + * field indicates the type to use for the enum factory + */ + Class> enumFactory() default NoEnumFactory.class; + + public static class NoEnumFactory implements IBaseEnumFactory> { + + private NoEnumFactory() { + // non instantiable + } + + @Override + public Enum fromCode(String theCodeString) throws IllegalArgumentException { + return null; + } + + @Override + public String toCode(Enum theCode) { + return null; + } + + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java index 6a92afa8f80..37186c7c505 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseResourceReferenceDt.java @@ -22,14 +22,12 @@ package ca.uhn.fhir.model.base.composite; import java.io.IOException; import java.io.Reader; -import java.util.List; - -import javax.json.JsonValue; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; +import org.hl7.fhir.instance.model.api.IBaseDatatype; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.BaseIdentifiableElement; @@ -40,7 +38,7 @@ import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.client.BaseClient; import ca.uhn.fhir.rest.client.api.IRestfulClient; -public abstract class BaseResourceReferenceDt extends BaseIdentifiableElement { +public abstract class BaseResourceReferenceDt extends BaseIdentifiableElement implements IBaseDatatype { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseResourceReferenceDt.class); private IResource myResource; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index 7c11fae1054..6ebb02a9352 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -20,7 +20,9 @@ package ca.uhn.fhir.parser; * #L% */ -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.io.IOException; import java.io.Reader; @@ -54,7 +56,11 @@ import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; +import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseDecimalDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; @@ -85,7 +91,6 @@ import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.BaseBinary; -import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IntegerDt; @@ -127,7 +132,7 @@ public class JsonParser extends BaseParser implements IParser { myContext = theContext; } - private void addToHeldExtensions(int valueIdx, List ext, ArrayList> list) { + private void addToHeldExtensions(int valueIdx, List> ext, ArrayList> list, boolean theIsModifier) { if (ext.size() > 0) { list.ensureCapacity(valueIdx); while (list.size() <= valueIdx) { @@ -136,8 +141,8 @@ public class JsonParser extends BaseParser implements IParser { if (list.get(valueIdx) == null) { list.set(valueIdx, new ArrayList()); } - for (ExtensionDt next : ext) { - list.get(valueIdx).add(new HeldExtension(next)); + for (IBaseExtension next : ext) { + list.get(valueIdx).add(new HeldExtension(next, theIsModifier)); } } } @@ -283,7 +288,7 @@ public class JsonParser extends BaseParser implements IParser { RuntimeResourceDefinition resDef = myContext.getResourceDefinition(resource); encodeResourceToJsonStreamWriter(resDef, resource, theEventWriter, "resource", false); } - + if (nextEntry.getSearchMode().isEmpty() == false || nextEntry.getScore().isEmpty() == false) { theEventWriter.writeStartObject("search"); writeOptionalTagWithTextNode(theEventWriter, "mode", nextEntry.getSearchMode().getValueAsString()); @@ -325,7 +330,6 @@ public class JsonParser extends BaseParser implements IParser { // // writeAuthor(nextEntry, theEventWriter); - if (nextEntry.getSummary().isEmpty() == false) { theEventWriter.write("summary", nextEntry.getSummary().getValueAsString()); } @@ -411,8 +415,7 @@ public class JsonParser extends BaseParser implements IParser { } case CONTAINED_RESOURCES: { /* - * Disabled per #103 - * ContainedDt value = (ContainedDt) theNextValue; for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { + * Disabled per #103 ContainedDt value = (ContainedDt) theNextValue; for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { * continue; } encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true, fixContainedResourceId(next.getId().getValue())); } */ List containedResources = getContainedResources().getContainedResources(); @@ -460,11 +463,15 @@ public class JsonParser extends BaseParser implements IParser { private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theNextValue, JsonGenerator theEventWriter, List theChildren, boolean theIsSubElementWithinResource) throws IOException { for (BaseRuntimeChildDefinition nextChild : theChildren) { + if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) { + continue; + } + if (nextChild instanceof RuntimeChildNarrativeDefinition) { INarrativeGenerator gen = myContext.getNarrativeGenerator(); if (gen != null) { - BaseNarrativeDt narr = ((IResource)theResource).getText(); + BaseNarrativeDt narr = ((IResource) theResource).getText(); gen.generateNarrative(theResDef.getResourceProfile(), theResource, narr); if (narr != null) { RuntimeChildNarrativeDefinition child = (RuntimeChildNarrativeDefinition) nextChild; @@ -540,12 +547,25 @@ public class JsonParser extends BaseParser implements IParser { encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childDef, null, theIsSubElementWithinResource); } - if (nextValue instanceof ISupportsUndeclaredExtensions && primitive) { - List ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredExtensions(); - addToHeldExtensions(valueIdx, ext, extensions); + if (primitive) { + if (nextValue instanceof ISupportsUndeclaredExtensions) { + List ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredExtensions(); + addToHeldExtensions(valueIdx, ext, extensions,false); - ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredModifierExtensions(); - addToHeldExtensions(valueIdx, ext, modifierExtensions); + ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredModifierExtensions(); + addToHeldExtensions(valueIdx, ext, modifierExtensions,true); + }else { + if (nextValue instanceof IBaseHasExtensions) { + IBaseHasExtensions element = (IBaseHasExtensions) nextValue; + List> ext = element.getExtension(); + addToHeldExtensions(valueIdx, ext, extensions, false); + } + if (nextValue instanceof IBaseHasModifierExtensions) { + IBaseHasModifierExtensions element = (IBaseHasModifierExtensions) nextValue; + List> ext = element.getModifierExtension(); + addToHeldExtensions(valueIdx, ext, extensions, true); + } + } } } @@ -663,7 +683,7 @@ public class JsonParser extends BaseParser implements IParser { } else { encodeCompositeElementToStreamWriter(theResDef, theResource, theResource, theEventWriter, resDef, theIsSubElementWithinResource); } - + theEventWriter.writeEnd(); } @@ -751,22 +771,44 @@ public class JsonParser extends BaseParser implements IParser { } } - private void extractUndeclaredExtensions(IBase theResource, List extensions, List modifierExtensions) { - if (theResource instanceof ISupportsUndeclaredExtensions) { - List ext = ((ISupportsUndeclaredExtensions) theResource).getUndeclaredExtensions(); + private void extractUndeclaredExtensions(IBase theElement, List extensions, List modifierExtensions) { + if (theElement instanceof ISupportsUndeclaredExtensions) { + ISupportsUndeclaredExtensions element = (ISupportsUndeclaredExtensions) theElement; + List ext = element.getUndeclaredExtensions(); for (ExtensionDt next : ext) { if (next == null || next.isEmpty()) { continue; } - extensions.add(new HeldExtension(next)); + extensions.add(new HeldExtension(next, false)); } - ext = ((ISupportsUndeclaredExtensions) theResource).getUndeclaredModifierExtensions(); + ext = element.getUndeclaredModifierExtensions(); for (ExtensionDt next : ext) { if (next == null || next.isEmpty()) { continue; } - modifierExtensions.add(new HeldExtension(next)); + modifierExtensions.add(new HeldExtension(next, true)); + } + } else { + if (theElement instanceof IBaseHasExtensions) { + IBaseHasExtensions element = (IBaseHasExtensions) theElement; + List> ext = element.getExtension(); + for (IBaseExtension next : ext) { + if (next == null || next.isEmpty()) { + continue; + } + extensions.add(new HeldExtension(next, false)); + } + } + if (theElement instanceof IBaseHasModifierExtensions) { + IBaseHasModifierExtensions element = (IBaseHasModifierExtensions) theElement; + List> ext = element.getModifierExtension(); + for (IBaseExtension next : ext) { + if (next == null || next.isEmpty()) { + continue; + } + modifierExtensions.add(new HeldExtension(next, true)); + } } } } @@ -788,16 +830,15 @@ public class JsonParser extends BaseParser implements IParser { return; } - boolean newerThanDstu1 = myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1); JsonObject alternate = (JsonObject) theAlternateVal; for (Entry nextEntry : alternate.entrySet()) { String nextKey = nextEntry.getKey(); JsonValue nextVal = nextEntry.getValue(); - if (!newerThanDstu1 && "extension".equals(nextKey)) { + if ("extension".equals(nextKey)) { boolean isModifier = false; JsonArray array = (JsonArray) nextEntry.getValue(); parseExtension(theState, array, isModifier); - } else if (!newerThanDstu1 && "modifierExtension".equals(nextKey)) { + } else if ("modifierExtension".equals(nextKey)) { boolean isModifier = true; JsonArray array = (JsonArray) nextEntry.getValue(); parseExtension(theState, array, isModifier); @@ -811,12 +852,6 @@ public class JsonParser extends BaseParser implements IParser { default: break; } - } else if (newerThanDstu1) { - if (nextKey.indexOf(':') > -1 && newerThanDstu1) { - JsonArray array = (JsonArray) nextEntry.getValue(); - parseExtensionInDstu2Style(false, theState, null, nextKey, array); - continue; - } } } } @@ -935,7 +970,6 @@ public class JsonParser extends BaseParser implements IParser { private void parseChildren(JsonObject theObject, ParserState theState) { String elementId = null; - boolean newerThanDstu1 = myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1); for (String nextName : theObject.keySet()) { if ("resourceType".equals(nextName)) { continue; @@ -948,29 +982,16 @@ public class JsonParser extends BaseParser implements IParser { // _id is incorrect, but some early examples in the FHIR spec used it elementId = theObject.getString(nextName); continue; - } else if (!newerThanDstu1 && "extension".equals(nextName)) { + } else if ("extension".equals(nextName)) { JsonArray array = theObject.getJsonArray(nextName); parseExtension(theState, array, false); continue; - } else if (!newerThanDstu1 && "modifierExtension".equals(nextName)) { + } else if ("modifierExtension".equals(nextName)) { JsonArray array = theObject.getJsonArray(nextName); parseExtension(theState, array, true); continue; - } else if (newerThanDstu1 && "modifier".equals(nextName)) { - JsonObject obj = theObject.getJsonObject(nextName); - for (String nextUrl : obj.keySet()) { - JsonArray array = obj.getJsonArray(nextUrl); - parseExtensionInDstu2Style(true, theState, null, nextUrl, array); - } - continue; } else if (nextName.charAt(0) == '_') { continue; - } else { - if (newerThanDstu1 && nextName.indexOf(':') > -1) { - JsonArray array = theObject.getJsonArray(nextName); - parseExtensionInDstu2Style(false, theState, null, nextName, array); - continue; - } } JsonValue nextVal = theObject.get(nextName); @@ -1210,42 +1231,18 @@ public class JsonParser extends BaseParser implements IParser { private void writeExtensionsAsDirectChild(IBaseResource theResource, JsonGenerator theEventWriter, RuntimeResourceDefinition resDef, List extensions, List modifierExtensions, String theParentExtensionUrl) throws IOException { if (extensions.isEmpty() == false) { - if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { - Collections.sort(extensions); - String currentlyWritingExtensionUrl = null; - for (HeldExtension next : extensions) { - currentlyWritingExtensionUrl = next.writeExtensionInDstu2Format(resDef, theResource, theEventWriter, currentlyWritingExtensionUrl, theParentExtensionUrl); - } - if (currentlyWritingExtensionUrl != null) { - theEventWriter.writeEnd(); - } - } else { - theEventWriter.writeStartArray("extension"); - for (HeldExtension next : extensions) { - next.write(resDef, theResource, theEventWriter); - } - theEventWriter.writeEnd(); + theEventWriter.writeStartArray("extension"); + for (HeldExtension next : extensions) { + next.write(resDef, theResource, theEventWriter); } + theEventWriter.writeEnd(); } if (modifierExtensions.isEmpty() == false) { - if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { - Collections.sort(modifierExtensions); - theEventWriter.writeStartObject("modifier"); - String currentlyWritingExtensionUrl = null; - for (HeldExtension next : modifierExtensions) { - currentlyWritingExtensionUrl = next.writeExtensionInDstu2Format(resDef, theResource, theEventWriter, currentlyWritingExtensionUrl, theParentExtensionUrl); - } - if (currentlyWritingExtensionUrl != null) { - theEventWriter.writeEnd(); - } - theEventWriter.writeEnd(); - } else { - theEventWriter.writeStartArray("modifierExtension"); - for (HeldExtension next : modifierExtensions) { - next.write(resDef, theResource, theEventWriter); - } - theEventWriter.writeEnd(); + theEventWriter.writeStartArray("modifierExtension"); + for (HeldExtension next : modifierExtensions) { + next.write(resDef, theResource, theEventWriter); } + theEventWriter.writeEnd(); } } @@ -1283,14 +1280,6 @@ public class JsonParser extends BaseParser implements IParser { } } - private void writeTagWithTextNode(JsonGenerator theEventWriter, String theElementName, String theValue) { - if (theValue != null && !theValue.isEmpty()) { - theEventWriter.write(theElementName, theValue); - } else { - theEventWriter.writeNull(theElementName); - } - } - private void writeTagWithTextNode(JsonGenerator theEventWriter, String theElementName, StringDt theStringDt) { if (StringUtils.isNotBlank(theStringDt.getValue())) { theEventWriter.write(theElementName, theStringDt.getValue()); @@ -1303,12 +1292,14 @@ public class JsonParser extends BaseParser implements IParser { private class HeldExtension implements Comparable { private RuntimeChildDeclaredExtensionDefinition myDef; - private ExtensionDt myUndeclaredExtension; + private IBaseExtension myUndeclaredExtension; private IBase myValue; + private boolean myModifier; - public HeldExtension(ExtensionDt theUndeclaredExtension) { + public HeldExtension(IBaseExtension theUndeclaredExtension, boolean theModifier) { assert theUndeclaredExtension != null; myUndeclaredExtension = theUndeclaredExtension; + myModifier = theModifier; } public HeldExtension(RuntimeChildDeclaredExtensionDefinition theDef, IBase theValue) { @@ -1337,66 +1328,38 @@ public class JsonParser extends BaseParser implements IParser { } } - public String writeExtensionInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, String theCurrentlyWritingExtensionUrl, - String theParentExtensionUrl) throws IOException { - if (myUndeclaredExtension != null) { - return writeUndeclaredExtInDstu2Format(theResDef, theResource, theEventWriter, myUndeclaredExtension, theCurrentlyWritingExtensionUrl, theParentExtensionUrl); - } else { - String extensionUrl = myDef.getExtensionUrl(); - checkIfNewExtensionUrlArrayIsNeeded(theEventWriter, extensionUrl, theCurrentlyWritingExtensionUrl, theParentExtensionUrl); - - theEventWriter.writeStartObject(); - - BaseRuntimeElementDefinition def = myDef.getChildElementDefinitionByDatatype(myValue.getClass()); - if (def.getChildType() == ChildTypeEnum.RESOURCE_BLOCK) { - extractAndWriteExtensionsAsDirectChild(myValue, theEventWriter, def, theResDef, theResource, extensionUrl); - } else { - String childName = myDef.getChildNameByDatatype(myValue.getClass()); - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, myValue, def, childName, false); - } - - theEventWriter.writeEnd(); - - return extensionUrl; - } - } - - private void checkIfNewExtensionUrlArrayIsNeeded(JsonGenerator theEventWriter, String theExtensionUrl, String theCurrentlyWritingExtensionUrl, String theParentExtensionUrl) { - if (StringUtils.equals(theCurrentlyWritingExtensionUrl, theExtensionUrl) == false) { - if (isNotBlank(theCurrentlyWritingExtensionUrl)) { - theEventWriter.writeEnd(); - } - - String urlToWrite = UrlUtil.constructRelativeUrl(theParentExtensionUrl, theExtensionUrl); - theEventWriter.writeStartArray(urlToWrite); - } - } - - private void writeUndeclaredExtInDstu1Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, ExtensionDt ext) throws IOException { - IElement value = ext.getValue(); - String extensionUrl = ext.getUrl().getValue(); + private void writeUndeclaredExtInDstu1Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, IBaseExtension ext) throws IOException { + IBaseDatatype value = ext.getValue(); + String extensionUrl = ext.getUrl(); theEventWriter.writeStartObject(); theEventWriter.write("url", extensionUrl); boolean noValue = value == null || value.isEmpty(); - if (noValue && ext.getAllUndeclaredExtensions().isEmpty()) { + if (noValue && ext.getExtension().isEmpty()) { ourLog.debug("Extension with URL[{}] has no value", extensionUrl); } else if (noValue) { - theEventWriter.writeStartArray("extension"); + if (myModifier) { + theEventWriter.writeStartArray("modifierExtension"); + }else { + theEventWriter.writeStartArray("extension"); + } - for (ExtensionDt next : ext.getUndeclaredExtensions()) { - writeUndeclaredExtInDstu1Format(theResDef, theResource, theEventWriter, next); + for (Object next : ext.getExtension()) { + writeUndeclaredExtInDstu1Format(theResDef, theResource, theEventWriter, (IBaseExtension) next); } theEventWriter.writeEnd(); } else { RuntimeChildUndeclaredExtensionDefinition extDef = myContext.getRuntimeChildUndeclaredExtensionDefinition(); String childName = extDef.getChildNameByDatatype(value.getClass()); if (childName == null) { + childName = "value" + myContext.getElementDefinition(value.getClass()).getName(); + } + BaseRuntimeElementDefinition childDef = myContext.getElementDefinition(value.getClass()); + if (childDef == null) { throw new ConfigurationException("Unable to encode extension, unregognized child element type: " + value.getClass().getCanonicalName()); } - BaseRuntimeElementDefinition childDef = extDef.getChildElementDefinitionByDatatype(value.getClass()); encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, value, childDef, childName, true); } @@ -1405,53 +1368,10 @@ public class JsonParser extends BaseParser implements IParser { theEventWriter.writeEnd(); } - private String writeUndeclaredExtInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, ExtensionDt ext, - String theCurrentlyWritingExtensionUrl, String theParentExtensionUrl) throws IOException { - IElement value = ext.getValue(); - String extensionUrl = ext.getUrl().getValue(); - - checkIfNewExtensionUrlArrayIsNeeded(theEventWriter, extensionUrl, theCurrentlyWritingExtensionUrl, theParentExtensionUrl); - theEventWriter.writeStartObject(); - - boolean noValue = value == null || value.isEmpty(); - if (noValue && ext.getAllUndeclaredExtensions().isEmpty()) { - - ourLog.debug("Extension with URL[{}] has no value", extensionUrl); - - } else if (noValue) { - - BaseRuntimeElementDefinition elemDef = null; - RuntimeResourceDefinition resDef = myContext.getResourceDefinition(theResource); - extractAndWriteExtensionsAsDirectChild(ext, theEventWriter, elemDef, resDef, theResource, extensionUrl); - - } else { - - RuntimeChildUndeclaredExtensionDefinition extDef = myContext.getRuntimeChildUndeclaredExtensionDefinition(); - String childName = extDef.getChildNameByDatatype(value.getClass()); - BaseRuntimeElementDefinition childDef; - if (childName == null) { - childDef = myContext.getElementDefinition(value.getClass()); - if (childDef == null) { - throw new ConfigurationException("Unable to encode extension, unrecognized child element type: " + value.getClass().getCanonicalName()); - } else { - childName = RuntimeChildUndeclaredExtensionDefinition.createExtensionChildName(childDef); - } - } else { - childDef = extDef.getChildElementDefinitionByDatatype(value.getClass()); - } - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, value, childDef, childName, true); - - } - - theEventWriter.writeEnd(); - - return extensionUrl; - } - @Override public int compareTo(HeldExtension theArg0) { - String url1 = myDef != null ? myDef.getExtensionUrl() : myUndeclaredExtension.getUrlAsString(); - String url2 = theArg0.myDef != null ? theArg0.myDef.getExtensionUrl() : theArg0.myUndeclaredExtension.getUrlAsString(); + String url1 = myDef != null ? myDef.getExtensionUrl() : myUndeclaredExtension.getUrl(); + String url2 = theArg0.myDef != null ? theArg0.myDef.getExtensionUrl() : theArg0.myUndeclaredExtension.getUrl(); url1 = defaultString(url1); url2 = defaultString(url2); return url1.compareTo(url2); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 1df2a0c1b1b..e234453da87 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -37,7 +37,11 @@ import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.ICompositeType; import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseElement; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IReference; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; @@ -61,6 +65,7 @@ import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ICompositeDatatype; import ca.uhn.fhir.model.api.ICompositeElement; import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IExtension; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IIdentifiableElement; import ca.uhn.fhir.model.api.IPrimitiveDatatype; @@ -819,11 +824,29 @@ class ParserState { ExtensionState newState = new ExtensionState(myPreResourceState, newExtension); push(newState); } else { - throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr); + if (theIsModifier == false) { + if (getCurrentElement() instanceof IBaseHasExtensions) { + IBaseExtension ext = ((IBaseHasExtensions)getCurrentElement()).addExtension(); + ext.setUrl(theUrlAttr); + ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext); + push(newState); + } else { + throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr); + } + }else { + if (getCurrentElement() instanceof IBaseHasModifierExtensions) { + IBaseExtension ext = ((IBaseHasModifierExtensions)getCurrentElement()).addModifierExtension(); + ext.setUrl(theUrlAttr); + ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext); + push(newState); + } else { + throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr); + } + } } } - protected Object getCurrentElement() { + protected IBase getCurrentElement() { return null; } @@ -879,7 +902,7 @@ class ParserState { if ("id".equals(theName)) { if (myInstance instanceof IIdentifiableElement) { ((IIdentifiableElement) myInstance).setElementSpecificId((theValue)); - } else if (myInstance instanceof IBaseResource) { + } else { (myInstance).setId(new IdDt(theValue)); } } else if ("contentType".equals(theName)) { @@ -1578,16 +1601,16 @@ class ParserState { private class ExtensionState extends BaseState { - private ExtensionDt myExtension; + private IBaseExtension myExtension; - public ExtensionState(PreResourceState thePreResourceState, ExtensionDt theExtension) { + public ExtensionState(PreResourceState thePreResourceState, IBaseExtension theExtension) { super(thePreResourceState); myExtension = theExtension; } @Override public void endingElement() throws DataFormatException { - if (myExtension.getValue() != null && myExtension.getUndeclaredExtensions().size() > 0) { + if (myExtension.getValue() != null && myExtension.getExtension().size() > 0) { throw new DataFormatException("Extension must not have both a value and other contained extensions"); } pop(); @@ -1612,7 +1635,7 @@ class ParserState { case PRIMITIVE_DATATYPE: { RuntimePrimitiveDatatypeDefinition primitiveTarget = (RuntimePrimitiveDatatypeDefinition) target; IPrimitiveType newChildInstance = primitiveTarget.newInstance(); - myExtension.setValue((IElement) newChildInstance); + myExtension.setValue(newChildInstance); PrimitiveState newState = new PrimitiveState(getPreResourceState(), newChildInstance); push(newState); return; @@ -1635,7 +1658,7 @@ class ParserState { } @Override - protected IElement getCurrentElement() { + protected IBaseExtension getCurrentElement() { return myExtension; } @@ -1805,6 +1828,15 @@ class ParserState { super(theResourceType); } + @SuppressWarnings("unchecked") + @Override + public void wereBack() { + super.wereBack(); + if (myTarget == null) { + myObject = (T) getCurrentElement(); + } + } + @Override public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException { super.enteringNewElement(theNamespaceURI, theLocalPart); @@ -1953,7 +1985,7 @@ class ParserState { } @Override - protected TagList getCurrentElement() { + protected IBase getCurrentElement() { return myTagList; } @@ -2237,6 +2269,11 @@ class ParserState { pop(); } + @Override + protected IBase getCurrentElement() { + return myTagList; + } + @Override public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException { if (TagList.ATTR_CATEGORY.equals(theLocalPart)) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index 1e050b3ecd9..4a3f95d9794 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -27,8 +27,10 @@ import java.io.Reader; import java.io.StringWriter; import java.io.Writer; import java.util.ArrayList; +import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.ListIterator; import javax.xml.namespace.QName; import javax.xml.stream.FactoryConfigurationError; @@ -49,6 +51,10 @@ import org.hl7.fhir.instance.model.IBase; import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.INarrative; @@ -171,7 +177,6 @@ public class XmlParser extends BaseParser implements IParser { throw new DataFormatException("Extension element has no 'url' attribute"); } parserState.enteringNewElementExtension(elem, urlAttr.getValue(), true); - } else { String elementName = elem.getName().getLocalPart(); @@ -433,8 +438,8 @@ public class XmlParser extends BaseParser implements IParser { theEventWriter.close(); } - private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, - BaseRuntimeElementDefinition childDef, String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition childDef, + String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException { if (nextValue.isEmpty()) { if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) { // We still want to go in.. @@ -450,7 +455,7 @@ public class XmlParser extends BaseParser implements IParser { if (value != null) { theEventWriter.writeStartElement(childName); theEventWriter.writeAttribute("value", value); - encodeExtensionsIfPresent(theResDef, theResource, theEventWriter, nextValue, theIncludedResource); + encodeExtensionsIfPresent(theResource, theEventWriter, nextValue, theIncludedResource); theEventWriter.writeEndElement(); } break; @@ -462,7 +467,7 @@ public class XmlParser extends BaseParser implements IParser { theEventWriter.writeAttribute("url", theExtensionUrl); } BaseRuntimeElementCompositeDefinition childCompositeDef = (BaseRuntimeElementCompositeDefinition) childDef; - encodeCompositeElementToStreamWriter(theResDef, theResource, nextValue, theEventWriter, childCompositeDef, theIncludedResource); + encodeCompositeElementToStreamWriter(theResource, nextValue, theEventWriter, childCompositeDef, theIncludedResource); theEventWriter.writeEndElement(); break; } @@ -512,21 +517,26 @@ public class XmlParser extends BaseParser implements IParser { } - private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, - List children, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + private void encodeCompositeElementChildrenToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List children, + boolean theIncludedResource) throws XMLStreamException, DataFormatException { for (BaseRuntimeChildDefinition nextChild : children) { + if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) { + continue; + } + if (nextChild instanceof RuntimeChildNarrativeDefinition && !theIncludedResource) { INarrativeGenerator gen = myContext.getNarrativeGenerator(); if (theResource instanceof IResource) { BaseNarrativeDt narr = ((IResource) theResource).getText(); if (gen != null && narr.isEmpty()) { - gen.generateNarrative(theResDef.getResourceProfile(), theResource, narr); + String resourceProfile = myContext.getResourceDefinition(theResource).getResourceProfile(); + gen.generateNarrative(resourceProfile, theResource, narr); } if (narr.isEmpty() == false) { RuntimeChildNarrativeDefinition child = (RuntimeChildNarrativeDefinition) nextChild; String childName = nextChild.getChildNameByDatatype(child.getDatatype()); BaseRuntimeElementDefinition type = child.getChildByName(childName); - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, narr, childName, type, null, theIncludedResource); + encodeChildElementToStreamWriter(theResource, theEventWriter, narr, childName, type, null, theIncludedResource); continue; } } else { @@ -534,13 +544,14 @@ public class XmlParser extends BaseParser implements IParser { BaseNarrativeDt narr2 = null; if (gen != null && narr1.isEmpty()) { // TODO: need to implement this - gen.generateNarrative(theResDef.getResourceProfile(), theResource, null); + String resourceProfile = myContext.getResourceDefinition(theResource).getResourceProfile(); + gen.generateNarrative(resourceProfile, theResource, null); } if (narr2 != null) { RuntimeChildNarrativeDefinition child = (RuntimeChildNarrativeDefinition) nextChild; String childName = nextChild.getChildNameByDatatype(child.getDatatype()); BaseRuntimeElementDefinition type = child.getChildByName(childName); - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, narr2, childName, type, null, theIncludedResource); + encodeChildElementToStreamWriter(theResource, theEventWriter, narr2, childName, type, null, theIncludedResource); continue; } } @@ -563,11 +574,11 @@ public class XmlParser extends BaseParser implements IParser { super.throwExceptionForUnknownChildType(nextChild, type); } - if (nextValue instanceof ExtensionDt) { - - extensionUrl = ((ExtensionDt) nextValue).getUrlAsString(); - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource); - + if (nextValue instanceof IBaseExtension && myContext.getVersion().getVersion() == FhirVersionEnum.DSTU1) { + // This is called for the Query resource in DSTU1 only + extensionUrl = ((IBaseExtension) nextValue).getUrl(); + encodeChildElementToStreamWriter(theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource); + } else if (extensionUrl != null && childName.equals("extension") == false) { RuntimeChildDeclaredExtensionDefinition extDef = (RuntimeChildDeclaredExtensionDefinition) nextChild; if (extDef.isModifier()) { @@ -577,31 +588,48 @@ public class XmlParser extends BaseParser implements IParser { } theEventWriter.writeAttribute("url", extensionUrl); - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childName, childDef, null, theIncludedResource); + encodeChildElementToStreamWriter(theResource, theEventWriter, nextValue, childName, childDef, null, theIncludedResource); theEventWriter.writeEndElement(); } else if (nextChild instanceof RuntimeChildNarrativeDefinition && theIncludedResource) { // suppress narratives from contained resources } else { - encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource); + encodeChildElementToStreamWriter(theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource); } } } } - private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, - BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { - encodeExtensionsIfPresent(theResDef, theResource, theEventWriter, theElement, theIncludedResource); - encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getExtensions(), theIncludedResource); - encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren(), theIncludedResource); + private void encodeCompositeElementToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition theElementDefinition, + boolean theIncludedResource) throws XMLStreamException, DataFormatException { + encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource); + encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getExtensions(), theIncludedResource); + encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getChildren(), theIncludedResource); } - private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, IBase theElement, boolean theIncludedResource) - throws XMLStreamException, DataFormatException { + private void encodeExtensionsIfPresent(IBaseResource theResource, XMLStreamWriter theWriter, IBase theElement, boolean theIncludedResource) throws XMLStreamException, DataFormatException { if (theElement instanceof ISupportsUndeclaredExtensions) { ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement; - encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource); - encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredModifierExtensions(), "modifierExtension", theIncludedResource); + encodeUndeclaredExtensions(theResource, theWriter, toBaseExtensionList(res.getUndeclaredExtensions()), "extension", theIncludedResource); + encodeUndeclaredExtensions(theResource, theWriter, toBaseExtensionList(res.getUndeclaredModifierExtensions()), "modifierExtension", theIncludedResource); } + if (theElement instanceof IBaseHasExtensions) { + IBaseHasExtensions res = (IBaseHasExtensions) theElement; + encodeUndeclaredExtensions(theResource, theWriter, res.getExtension(), "extension", theIncludedResource); + } + if (theElement instanceof IBaseHasModifierExtensions) { + IBaseHasModifierExtensions res = (IBaseHasModifierExtensions) theElement; + encodeUndeclaredExtensions(theResource, theWriter, res.getModifierExtension(), "modifierExtension", theIncludedResource); + } + } + + /** + * This is just to work around the fact that casting java.util.List to java.util.List> seems to be + * rejected by the compiler some of the time. + */ + private > List> toBaseExtensionList(final List theList) { + List> retVal = new ArrayList>(theList.size()); + retVal.addAll(theList); + return retVal; } private void encodeResourceReferenceToStreamWriter(XMLStreamWriter theEventWriter, BaseResourceReferenceDt theRef) throws XMLStreamException { @@ -638,12 +666,12 @@ public class XmlParser extends BaseParser implements IParser { postExtensionChildren.add(next); } } - encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, preExtensionChildren, theIncludedResource); + encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, preExtensionChildren, theIncludedResource); - encodeExtensionsIfPresent(theResDef, theResource, theEventWriter, theElement, theIncludedResource); - encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getExtensions(), theIncludedResource); + encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource); + encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, resDef.getExtensions(), theIncludedResource); - encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, postExtensionChildren, theIncludedResource); + encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, postExtensionChildren, theIncludedResource); } @@ -706,7 +734,7 @@ public class XmlParser extends BaseParser implements IParser { if (theResource instanceof IAnyResource) { // HL7.org Structures - encodeCompositeElementToStreamWriter(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + encodeCompositeElementToStreamWriter(theResource, theResource, theEventWriter, resDef, theContainedResource); } else { @@ -753,7 +781,7 @@ public class XmlParser extends BaseParser implements IParser { } theEventWriter.writeCharacters(bin.getContentAsBase64()); } else { - encodeCompositeElementToStreamWriter(resDef, theResource, theResource, theEventWriter, resDef, theContainedResource); + encodeCompositeElementToStreamWriter(theResource, theResource, theEventWriter, resDef, theContainedResource); } } @@ -794,25 +822,20 @@ public class XmlParser extends BaseParser implements IParser { } } - private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IBaseResource theResource, XMLStreamWriter theWriter, List theExtensions, String tagName, - boolean theIncludedResource) throws XMLStreamException, DataFormatException { - for (ExtensionDt next : theExtensions) { + private void encodeUndeclaredExtensions(IBaseResource theResource, XMLStreamWriter theWriter, List> theExtensions, String tagName, boolean theIncludedResource) + throws XMLStreamException, DataFormatException { + for (IBaseExtension next : theExtensions) { + if (next == null) { + continue; + } + theWriter.writeStartElement(tagName); - theWriter.writeAttribute("url", next.getUrl().getValue()); + + String url = next.getUrl(); + theWriter.writeAttribute("url", url); if (next.getValue() != null) { - IElement value = next.getValue(); - // RuntimeChildUndeclaredExtensionDefinition extDef = - // myContext.getRuntimeChildUndeclaredExtensionDefinition(); - // String childName = extDef.getChildNameByDatatype(nextValue.getClass()); - // if (childName == null) { - // throw new ConfigurationException("Unable to encode extension, unregognized child element type: " + - // nextValue.getClass().getCanonicalName()); - // } - // BaseRuntimeElementDefinition childDef = - // extDef.getChildElementDefinitionByDatatype(nextValue.getClass()); - // - // + IBaseDatatype value = next.getValue(); RuntimeChildUndeclaredExtensionDefinition extDef = myContext.getRuntimeChildUndeclaredExtensionDefinition(); String childName = extDef.getChildNameByDatatype(value.getClass()); BaseRuntimeElementDefinition childDef; @@ -826,11 +849,11 @@ public class XmlParser extends BaseParser implements IParser { } else { childDef = extDef.getChildElementDefinitionByDatatype(value.getClass()); } - encodeChildElementToStreamWriter(theResDef, theResource, theWriter, value, childName, childDef, null, theIncludedResource); + encodeChildElementToStreamWriter(theResource, theWriter, value, childName, childDef, null, theIncludedResource); } // child extensions - encodeExtensionsIfPresent(theResDef, theResource, theWriter, next, theIncludedResource); + encodeExtensionsIfPresent(theResource, theWriter, next, theIncludedResource); theWriter.writeEndElement(); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java index d595ae49665..27868f5d46d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java @@ -26,15 +26,12 @@ import java.io.IOException; import java.io.Reader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import java.util.TreeSet; -import ca.uhn.fhir.rest.annotation.*; - import org.apache.commons.io.IOUtils; import org.hl7.fhir.instance.model.IBaseResource; @@ -47,6 +44,18 @@ import ca.uhn.fhir.model.base.resource.BaseOperationOutcome; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.rest.annotation.AddTags; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.DeleteTags; +import ca.uhn.fhir.rest.annotation.GetTags; +import ca.uhn.fhir.rest.annotation.History; +import ca.uhn.fhir.rest.annotation.Metadata; +import ca.uhn.fhir.rest.annotation.Read; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.annotation.Transaction; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.annotation.Validate; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.client.BaseHttpClientInvocation; import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException; @@ -61,9 +70,9 @@ import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; -import ca.uhn.fhir.rest.server.exceptions.ResourceVersionNotSpecifiedException; import ca.uhn.fhir.rest.server.exceptions.UnclassifiedServerFailureException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.ReflectionUtil; @@ -217,7 +226,7 @@ public abstract class BaseMethodBinding implements IClientResponseHandler ex = new ResourceVersionConflictException("Server responded with HTTP 409"); break; case Constants.STATUS_HTTP_412_PRECONDITION_FAILED: - ex = new ResourceVersionNotSpecifiedException("Server responded with HTTP 412"); + ex = new PreconditionFailedException("Server responded with HTTP 412"); break; case Constants.STATUS_HTTP_422_UNPROCESSABLE_ENTITY: IParser parser = createAppropriateParserForParsingResponse(theResponseMimeType, theResponseReader, theStatusCode); diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java new file mode 100644 index 00000000000..ab56defe694 --- /dev/null +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java @@ -0,0 +1,25 @@ +package org.hl7.fhir.instance.model.api; + +public interface IBaseEnumFactory> { + + /** + * Read an enumeration value from the string that represents it on the XML or JSON + * + * @param codeString + * the value found in the XML or JSON + * @return the enumeration value + * @throws IllegalArgumentException + * is the value is not known + */ + public T fromCode(String codeString) throws IllegalArgumentException; + + /** + * Get the XML/JSON representation for an enumerated value + * + * @param code + * - the enumeration value + * @return the XML/JSON representation + */ + public String toCode(T code); + +} diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java index d48da6dd004..0d0dbf01aec 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java @@ -11,5 +11,9 @@ public interface IBaseExtension extends ICompositeType { String getUrl(); IBaseDatatype getValue(); + + T setUrl(String theUrl); + T setValue(IBaseDatatype theValue); + } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java new file mode 100644 index 00000000000..257b7466478 --- /dev/null +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java @@ -0,0 +1,11 @@ +package org.hl7.fhir.instance.model.api; + +import java.util.List; + +public interface IBaseHasExtensions { + + public List> getExtension(); + + public IBaseExtension addExtension(); + +} diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java new file mode 100644 index 00000000000..23cba0358a3 --- /dev/null +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java @@ -0,0 +1,11 @@ +package org.hl7.fhir.instance.model.api; + +import java.util.List; + +public interface IBaseHasModifierExtensions { + + public List> getModifierExtension(); + + public IBaseExtension addModifierExtension(); + +} diff --git a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java index a51236d25ff..113baa19ce1 100644 --- a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java +++ b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java @@ -22,7 +22,7 @@ public class MultiVersionJsonParserTest { String str = FhirContext.forDstu2().newJsonParser().encodeResourceToString(p); ourLog.info(str); - assertThat(str,StringContains.containsString("{\"resourceType\":\"Patient\",\"http://foo#ext\":[{\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}")); + assertThat(str,StringContains.containsString("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#ext\",\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}")); } } diff --git a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java index 0a591bc2443..f83848dd45b 100644 --- a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java +++ b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java @@ -9,22 +9,23 @@ import ca.uhn.fhir.validation.FhirValidator; public class ValidatorTest { - @Test - public void testValidator() { - - FhirContext ctx = new FhirContext(); - FhirValidator val = ctx.newValidator(); - - // Phloc is not onthe classpath - assertTrue(val.isValidateAgainstStandardSchema()); - assertFalse(val.isValidateAgainstStandardSchematron()); + @Test + public void testValidator() { + + FhirContext ctx = new FhirContext(); + FhirValidator val = ctx.newValidator(); + + // Phloc is not onthe classpath + assertTrue(val.isValidateAgainstStandardSchema()); + assertFalse(val.isValidateAgainstStandardSchematron()); + + try { + val.setValidateAgainstStandardSchematron(true); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("Phloc-schematron library not found on classpath, can not enable perform schematron validation", e.getMessage()); + } + + } - try { val.setValidateAgainstStandardSchematron(true); - fail(); - } catch (IllegalArgumentException e) { - assertEquals("Phloc-schematron library not found on classpath, can not enable perform schematron validation", e.getMessage()); - } - - } - } diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java index 731afbca793..5775f0ce6c1 100644 --- a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java +++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java @@ -9,6 +9,7 @@ import org.springframework.web.context.WebApplicationContext; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.provider.JpaSystemProviderDstu1; +import ca.uhn.fhir.jpa.provider.JpaSystemProviderDstu2; import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; import ca.uhn.fhir.rest.server.ETagSupportEnum; import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; @@ -48,7 +49,7 @@ public class JpaServerDemo extends RestfulServer { * The system provider implements non-resource-type methods, such as * transaction, and global history. */ - JpaSystemProviderDstu1 systemProvider = myAppCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu1.class); + JpaSystemProviderDstu2 systemProvider = myAppCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu2.class); setPlainProviders(systemProvider); /* diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index 72731a1c9c1..3c94a4bf79d 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -23,10 +23,12 @@ package ca.uhn.fhir.model.dev; import java.io.InputStream; import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.base.composite.BaseContainedDt; @@ -102,6 +104,4 @@ public class FhirDev implements IFhirVersion { return ContainedDt.class; } - - } diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index 36713dc4a1b..e271fca91e4 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -57,7 +57,6 @@ import ca.uhn.fhir.context.RuntimeResourceBlockDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeResourceReferenceDefinition; import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IDatatype; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IPrimitiveDatatype; import ca.uhn.fhir.model.api.IResource; @@ -378,6 +377,4 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } - - } diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index 77de4d8cff5..9a924807c49 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -1,9 +1,15 @@ package ca.uhn.fhir.parser; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; -import static org.mockito.Matchers.*; -import static org.mockito.Mockito.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; import java.io.IOException; import java.io.OutputStreamWriter; @@ -24,8 +30,6 @@ import org.hamcrest.text.StringContainsInOrder; import org.hl7.fhir.instance.model.IBaseResource; import org.junit.BeforeClass; import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Matchers; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; @@ -41,7 +45,6 @@ import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.dstu.composite.AddressDt; import ca.uhn.fhir.model.dstu.composite.HumanNameDt; -import ca.uhn.fhir.model.dstu.composite.NarrativeDt; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.resource.Binary; import ca.uhn.fhir.model.dstu.resource.Conformance; @@ -59,7 +62,10 @@ import ca.uhn.fhir.model.dstu.resource.ValueSet; import ca.uhn.fhir.model.dstu.resource.ValueSet.Define; import ca.uhn.fhir.model.dstu.resource.ValueSet.DefineConcept; import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; @@ -94,6 +100,120 @@ public class JsonParserTest { } + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + ExtensionDt ext = new ExtensionDt(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + patient.addUndeclaredExtension(ext); + + ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); + patient.addUndeclaredExtension(parent); + ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + parent.addUndeclaredExtension(child1); + ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + parent.addUndeclaredExtension(child2); + + ExtensionDt modExt = new ExtensionDt(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateDt("1995-01-02")); + modExt.setModifier(true); + patient.addUndeclaredExtension(modExt); + + HumanNameDt name = patient.addName(); + name.addFamily("Blah"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + ExtensionDt ext2 = new ExtensionDt().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + ExtensionDt given2ext = new ExtensionDt().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + given2ext.addUndeclaredExtension(new ExtensionDt().setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD"))); + + String output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newJsonParser().encodeResourceToString(patient); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" + )); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + + "],")); + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + + "}")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + ext = parsed.getUndeclaredExtensions().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + + parent = patient.getUndeclaredExtensions().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + + modExt = parsed.getUndeclaredModifierExtensions().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + ExtensionDt given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + + } + + + /** * #65 */ @@ -1136,7 +1256,7 @@ public class JsonParserTest { List undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getUndeclaredExtensions(); ExtensionDt undeclaredExtension = undeclaredExtensions.get(0); - assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl().getValue()); + assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl()); ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToWriter(obs, new OutputStreamWriter(System.out)); @@ -1184,7 +1304,7 @@ public class JsonParserTest { List undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getUndeclaredExtensions(); ExtensionDt undeclaredExtension = undeclaredExtensions.get(0); - assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl().getValue()); + assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl()); IParser jsonParser = fhirCtx.newJsonParser().setPrettyPrint(true); String encoded = jsonParser.encodeResourceToString(obs); diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index def9035d86c..5e154491072 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -67,6 +67,7 @@ import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; import ca.uhn.fhir.model.dstu.valueset.DocumentReferenceStatusEnum; import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; @@ -151,6 +152,95 @@ public class XmlParserTest { } + + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + ExtensionDt ext = new ExtensionDt(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + patient.addUndeclaredExtension(ext); + + ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); + patient.addUndeclaredExtension(parent); + ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + parent.addUndeclaredExtension(child1); + ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + parent.addUndeclaredExtension(child2); + + ExtensionDt modExt = new ExtensionDt(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateDt("1995-01-02")); + modExt.setModifier(true); + patient.addUndeclaredExtension(modExt); + + HumanNameDt name = patient.addName(); + name.addFamily("Blah"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + ExtensionDt ext2 = new ExtensionDt().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + ExtensionDt given2ext = new ExtensionDt().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + given2ext.addUndeclaredExtension(new ExtensionDt().setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD"))); + + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + assertThat( + enc, + containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + ext = parsed.getUndeclaredExtensions().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + + parent = patient.getUndeclaredExtensions().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + + modExt = parsed.getUndeclaredModifierExtensions().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + ExtensionDt given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + + } + + @Test public void testEncodeBundle() throws InterruptedException { Bundle b = new Bundle(); @@ -1490,7 +1580,7 @@ public class XmlParserTest { List undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getUndeclaredExtensions(); ExtensionDt undeclaredExtension = undeclaredExtensions.get(0); - assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl().getValue()); + assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl()); ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToWriter(obs, new OutputStreamWriter(System.out)); @@ -1545,7 +1635,7 @@ public class XmlParserTest { List undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getUndeclaredExtensions(); ExtensionDt undeclaredExtension = undeclaredExtensions.get(0); - assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl().getValue()); + assertEquals("http://hl7.org/fhir/Profile/iso-21090#qualifier", undeclaredExtension.getUrl()); fhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToWriter(obs, new OutputStreamWriter(System.out)); diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index c57c7d8fd14..615c4e8bce2 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -23,10 +23,12 @@ package ca.uhn.fhir.model.dstu2; import java.io.InputStream; import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.IDatatype; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index cf7b148df43..e41c511eddc 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -13,6 +13,7 @@ import net.sf.json.JSONSerializer; import net.sf.json.JsonConfig; import org.apache.commons.io.IOUtils; +import org.hamcrest.Matchers; import org.junit.Test; import ca.uhn.fhir.context.ConfigurationException; @@ -20,13 +21,16 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; import ca.uhn.fhir.model.dstu2.resource.Binary; import ca.uhn.fhir.model.dstu2.resource.MedicationPrescription; import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.dstu2.resource.QuestionnaireAnswers; +import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.StringDt; @@ -65,6 +69,120 @@ public class JsonParserTest { //@formatter:on } + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + ExtensionDt ext = new ExtensionDt(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + patient.addUndeclaredExtension(ext); + + ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); + patient.addUndeclaredExtension(parent); + ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + parent.addUndeclaredExtension(child1); + ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + parent.addUndeclaredExtension(child2); + + ExtensionDt modExt = new ExtensionDt(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateDt("1995-01-02")); + modExt.setModifier(true); + patient.addUndeclaredExtension(modExt); + + HumanNameDt name = patient.addName(); + name.addFamily("Blah"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + ExtensionDt ext2 = new ExtensionDt().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + ExtensionDt given2ext = new ExtensionDt().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + given2ext.addUndeclaredExtension(new ExtensionDt().setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD"))); + + String output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newJsonParser().encodeResourceToString(patient); + assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" + )); + assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + + "],")); + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + + "}")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + ext = parsed.getUndeclaredExtensions().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + + parent = patient.getUndeclaredExtensions().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + + modExt = parsed.getUndeclaredModifierExtensions().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + ExtensionDt given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + + } + + + /** * #65 */ @@ -77,7 +195,7 @@ public class JsonParserTest { String encoded = ourCtx.newJsonParser().setPrettyPrint(false).encodeResourceToString(parsed); ourLog.info(encoded); - assertThat(encoded, containsString("{\"linkId\":\"value123\",\"_linkId\":{\"http://123\":[{\"valueString\":\"HELLO\"}]}}")); + assertThat(encoded, containsString("{\"linkId\":\"value123\",\"_linkId\":{\"extension\":[{\"url\":\"http://123\",\"valueString\":\"HELLO\"}]}}")); } @@ -244,102 +362,6 @@ public class JsonParserTest { } - @Test - public void testParseAndEncodeNewExtensionFormat() { - - //@formatter:off - String resource = "{\n" + - " \"resourceType\" : \"Patient\",\n" + - " \"http://acme.org/fhir/ExtensionDefinition/trial-status\" : [{\n" + - " \"code\" : [{ \"valueCode\" : \"unsure\" }],\n" + - " \"date\" : [{ \"valueDate\" : \"2009-03-14\" }], \n" + - " \"registrar\" : [{ \"valueReference\" : {\n" + - " \"reference\" : \"Practitioner/example\"\n" + - " }\n" + - " }]\n" + - " }],\n" + - " \"modifier\" : { \n" + - " \"http://example.org/fhir/ExtensionDefinition/some-kind-of-modifier\" : [{\n" + - " \"valueBoolean\" : true\n" + - " }]\n" + - " }," + - " \"name\" : [{\n" + - " \"family\": [\n" + - " \"du\",\n" + - " \"Marché\"\n" + - " ],\n" + - " \"_family\": [\n" + - " {\n" + - " \"http://hl7.org/fhir/ExtensionDefinition/iso21090-EN-qualifier\": [\n" + - " {\n" + - " \"valueCode\": \"VV\"\n" + - " }\n" + - " ]\n" + - " },\n" + - " null\n" + - " ],\n" + - " \"given\": [\n" + - " \"Bénédicte\"\n" + - " ]\n" + - " }],\n" + - " \"gender\" : \"M\"\n" + - "}"; - //@formatter:on - -// ourLog.info(resource); - - Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, resource); - - // Modifier extension - assertEquals(1, parsed.getUndeclaredExtensionsByUrl("http://example.org/fhir/ExtensionDefinition/some-kind-of-modifier").size()); - assertTrue( parsed.getUndeclaredExtensionsByUrl("http://example.org/fhir/ExtensionDefinition/some-kind-of-modifier").get(0).isModifier()); - assertEquals(BooleanDt.class, parsed.getUndeclaredExtensionsByUrl("http://example.org/fhir/ExtensionDefinition/some-kind-of-modifier").get(0).getValueAsPrimitive().getClass()); - assertEquals("true", parsed.getUndeclaredExtensionsByUrl("http://example.org/fhir/ExtensionDefinition/some-kind-of-modifier").get(0).getValueAsPrimitive().getValueAsString()); - - // Gender - assertEquals("M",parsed.getGender()); - assertEquals(1, parsed.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/trial-status").size()); - - // Trial status - ExtensionDt ext = parsed.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/trial-status").get(0); - assertNull(ext.getValue()); - assertEquals(1, ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/code").size()); - assertEquals(CodeDt.class, ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/code").get(0).getValue().getClass()); - assertEquals("unsure", ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/code").get(0).getValueAsPrimitive().getValueAsString()); - assertEquals(1, ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/date").size()); - assertEquals(DateDt.class, ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/date").get(0).getValue().getClass()); - assertEquals("2009-03-14", ext.getUndeclaredExtensionsByUrl("http://acme.org/fhir/ExtensionDefinition/date").get(0).getValueAsPrimitive().getValueAsString()); - - // Name - assertEquals(1, parsed.getName().size()); - assertEquals(2, parsed.getName().get(0).getFamily().size()); - assertEquals("du Marché", parsed.getName().get(0).getFamilyAsSingleString()); - assertEquals(1, parsed.getName().get(0).getGiven().size()); - assertEquals("Bénédicte", parsed.getName().get(0).getGivenAsSingleString()); - - // Patient.name[0].family extensions - assertEquals(1, parsed.getNameFirstRep().getFamily().get(0).getUndeclaredExtensionsByUrl("http://hl7.org/fhir/ExtensionDefinition/iso21090-EN-qualifier").size()); - assertEquals(CodeDt.class, parsed.getNameFirstRep().getFamily().get(0).getUndeclaredExtensionsByUrl("http://hl7.org/fhir/ExtensionDefinition/iso21090-EN-qualifier").get(0).getValueAsPrimitive().getClass()); - assertEquals("VV", parsed.getNameFirstRep().getFamily().get(0).getUndeclaredExtensionsByUrl("http://hl7.org/fhir/ExtensionDefinition/iso21090-EN-qualifier").get(0).getValueAsPrimitive().getValueAsString()); - - /* - * Now re-encode - */ - String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); - ourLog.info(encoded); - - JSON expected = JSONSerializer.toJSON(resource.trim()); - JSON actual = JSONSerializer.toJSON(encoded.trim()); - - String exp = expected.toString().replace("\\r\\n", "\\n"); // .replace("§", "§"); - String act = actual.toString().replace("\\r\\n", "\\n"); - - ourLog.info("Expected: {}", exp); - ourLog.info("Actual : {}", act); - - assertEquals(exp, act); - - } @Test public void testParseAndEncodeBundleWithDeletedEntry() { diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index 392e1425786..f93e9f862c4 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -1,7 +1,13 @@ package ca.uhn.fhir.parser; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.emptyOrNullString; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import java.io.StringReader; @@ -13,8 +19,10 @@ import org.junit.Test; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Bundle; +import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.dstu2.composite.DurationDt; +import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance; import ca.uhn.fhir.model.dstu2.resource.Binary; import ca.uhn.fhir.model.dstu2.resource.Composition; @@ -22,7 +30,11 @@ import ca.uhn.fhir.model.dstu2.resource.Encounter; import ca.uhn.fhir.model.dstu2.resource.MedicationPrescription; import ca.uhn.fhir.model.dstu2.resource.Organization; import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.StringDt; public class XmlParserTest { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(XmlParserTest.class); @@ -89,7 +101,8 @@ public class XmlParserTest { public void testParseAndEncodeBundleNewStyle() throws Exception { String content = IOUtils.toString(XmlParserTest.class.getResourceAsStream("/bundle-example.xml")); - ca.uhn.fhir.model.dstu2.resource.Bundle parsed = ourCtx.newXmlParser().parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, content); + IParser newXmlParser = ourCtx.newXmlParser(); + ca.uhn.fhir.model.dstu2.resource.Bundle parsed = newXmlParser.parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, content); assertEquals("http://example.com/base/Bundle/example/_history/1", parsed.getId().getValue()); assertEquals("1", parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.VERSION)); assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); @@ -275,4 +288,93 @@ public class XmlParserTest { assertEquals(2, parsed.getContained().getContainedResources().size()); } + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + ExtensionDt ext = new ExtensionDt(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + patient.addUndeclaredExtension(ext); + + ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); + patient.addUndeclaredExtension(parent); + ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + parent.addUndeclaredExtension(child1); + ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + parent.addUndeclaredExtension(child2); + + ExtensionDt modExt = new ExtensionDt(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateDt("1995-01-02")); + modExt.setModifier(true); + patient.addUndeclaredExtension(modExt); + + HumanNameDt name = patient.addName(); + name.addFamily("Blah"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + ExtensionDt ext2 = new ExtensionDt().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + ExtensionDt given2ext = new ExtensionDt().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + given2ext.addUndeclaredExtension(new ExtensionDt().setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD"))); + + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + assertThat( + enc, + containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + ext = parsed.getUndeclaredExtensions().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + + parent = patient.getUndeclaredExtensions().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + + modExt = parsed.getUndeclaredModifierExtensions().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + ExtensionDt given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + + } + + + } diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java index ac37009394b..e0b35e711b4 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/IncludeTest.java @@ -475,21 +475,4 @@ public class IncludeTest { } - public static void main(String[] args) { - - Organization org = new Organization(); - org.setId("Organization/65546"); - org.getNameElement().setValue("Contained Test Organization"); - - Patient patient = new Patient(); - patient.setId("Patient/1333"); - patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); - patient.getManagingOrganization().setResource(patient); - - System.out.println(new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); - - patient.getManagingOrganization().getReference(); - - } - } diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/validation/ResourceValidatorTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/validation/ResourceValidatorTest.java index de90f1a85d4..e95587dfcbb 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/validation/ResourceValidatorTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/validation/ResourceValidatorTest.java @@ -27,7 +27,7 @@ import ca.uhn.fhir.model.primitive.DateTimeDt; public class ResourceValidatorTest { - private static FhirContext ourCtx = new FhirContext(); + private static FhirContext ourCtx = FhirContext.forDstu2(); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceValidatorTest.class); @SuppressWarnings("deprecation") diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java index b43f57f2985..c007c5a0e57 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java @@ -26,12 +26,15 @@ import java.util.ArrayList; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.conf.ServerConformanceProvider; import org.hl7.fhir.instance.conf.ServerProfileProvider; +import org.hl7.fhir.instance.model.Extension; import org.hl7.fhir.instance.model.Profile; import org.hl7.fhir.instance.model.Reference; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.base.composite.BaseContainedDt; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java index 7c1cbede262..8558a11dcc6 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java @@ -37,11 +37,13 @@ import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.annotations.DatatypeDef; import org.hl7.fhir.instance.model.api.IBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; /** * Base definition for all elements that are defined inside a resource - but not those in a data type. */ @DatatypeDef(name="BackboneElement") -public abstract class BackboneElement extends Element implements IBackboneElement { +public abstract class BackboneElement extends Element implements IBackboneElement, IBaseHasExtensions, IBaseHasModifierExtensions { /** * May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java index 74fa55b4636..0cdcebb4a41 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java @@ -38,11 +38,13 @@ import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; /** * A resource that includes narrative, extensions, and contained resources. */ @ResourceDef(name="DomainResource", profile="http://hl7.org/fhir/Profile/DomainResource") -public abstract class DomainResource extends Resource { +public abstract class DomainResource extends Resource implements IBaseHasExtensions, IBaseHasModifierExtensions { /** * A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java index b6841533751..732337bccc2 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java @@ -37,10 +37,11 @@ import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; import org.hl7.fhir.instance.model.annotations.DatatypeDef; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; /** * Base definition for all elements in a resource. */ -public abstract class Element extends Base { +public abstract class Element extends Base implements IBaseHasExtensions { /** * unique id for the element within a resource (for internal references). diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnumFactory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnumFactory.java index dc27717ca51..c722c39e25e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnumFactory.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnumFactory.java @@ -1,5 +1,7 @@ package org.hl7.fhir.instance.model; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; + /* Copyright (c) 2011+, HL7, Inc @@ -33,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. /** * Helper class to help manage generic enumerated types */ -public interface EnumFactory> { +public interface EnumFactory> extends IBaseEnumFactory { /** * Read an enumeration value from the string that represents it on the XML or JSON diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumeration.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumeration.java index 6eaa8ebd3d9..c0ed0894587 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumeration.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumeration.java @@ -1,6 +1,7 @@ package org.hl7.fhir.instance.model; import org.hl7.fhir.instance.model.annotations.DatatypeDef; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; /* Copyright (c) 2011+, HL7, Inc @@ -50,6 +51,16 @@ public class Enumeration> extends PrimitiveType { myEnumFactory = theEnumFactory; } + /** + * Constructor + */ + public Enumeration(IBaseEnumFactory theEnumFactory) { + if (theEnumFactory == null) + throw new IllegalArgumentException("An enumeration factory must be provided"); + myEnumFactory = (EnumFactory) theEnumFactory; + } + + /** * Constructor */ diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java index 22d10a27fc3..8d10bb2c5bc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java @@ -36,12 +36,14 @@ import java.util.List; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.DatatypeDef; import org.hl7.fhir.instance.model.annotations.Description; +import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; /** * Optional Extensions Element - found in all resources. */ @DatatypeDef(name="Extension") -public class Extension extends Element implements IBaseExtension { +public class Extension extends Element implements IBaseExtension, IBaseHasExtensions { /** * Source of the definition for the extension code - a logical name or a URL. @@ -175,6 +177,11 @@ public class Extension extends Element implements IBaseExtension { ; } + @Override + public Extension setValue(IBaseDatatype theValue) { + return setValue((Type)theValue); + } + } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java index 49bcfad5ba0..c749600981c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java @@ -146,7 +146,7 @@ public class Identifier extends Type implements ICompositeType { /** * The purpose of this identifier. */ - @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) + @Child(name="use", type={CodeType.class}, order=0, min=0, max=1, enumFactory=IdentifierUseEnumFactory.class) @Description(shortDefinition="usual | official | temp | secondary (If known)", formalDefinition="The purpose of this identifier." ) protected Enumeration use; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PrimitiveType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PrimitiveType.java index d58917a643d..8344292e9e0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PrimitiveType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PrimitiveType.java @@ -2,8 +2,9 @@ package org.hl7.fhir.instance.model; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; -public abstract class PrimitiveType extends Type implements IPrimitiveType { +public abstract class PrimitiveType extends Type implements IPrimitiveType, IBaseHasExtensions { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java index 97fac708847..bb0cda27e09 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java @@ -34,7 +34,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.hl7.fhir.instance.model.Enumeration; import org.hl7.fhir.instance.model.IBase; +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; /** * Field annotation for fields within resource and datatype definitions, indicating @@ -96,6 +98,12 @@ public @interface Child { */ Class[] type() default {}; + /** + * For children which accept an {@link Enumeration} as the type, this + * field indicates the type to use for the enum factory + */ + Class> enumFactory() default NoEnumFactory.class; + // Not implemented // /** // * This value is used when extending a built-in model class and defining a @@ -105,5 +113,23 @@ public @interface Child { // * HumanNameDt which adds extensions of your choosing) you could do that using a replacement field. // */ // String replaces() default ""; + + public static class NoEnumFactory implements IBaseEnumFactory> { + + private NoEnumFactory() { + // non instantiable + } + @Override + public Enum fromCode(String theCodeString) throws IllegalArgumentException { + return null; + } + + @Override + public String toCode(Enum theCode) { + return null; + } + + } + } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java index 65a64de79d7..e695285dde4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java @@ -1,19 +1,24 @@ package ca.uhn.fhir.model; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.hl7.fhir.instance.model.Address; +import org.hl7.fhir.instance.model.BackboneElement; import org.hl7.fhir.instance.model.Base; import org.hl7.fhir.instance.model.BooleanType; import org.hl7.fhir.instance.model.Bundle; import org.hl7.fhir.instance.model.Coding; import org.hl7.fhir.instance.model.DecimalType; +import org.hl7.fhir.instance.model.DomainResource; +import org.hl7.fhir.instance.model.Element; import org.hl7.fhir.instance.model.Extension; import org.hl7.fhir.instance.model.IBase; import org.hl7.fhir.instance.model.ICompositeType; import org.hl7.fhir.instance.model.IPrimitiveType; import org.hl7.fhir.instance.model.IdType; +import org.hl7.fhir.instance.model.Identifier; import org.hl7.fhir.instance.model.IntegerType; import org.hl7.fhir.instance.model.Meta; import org.hl7.fhir.instance.model.Narrative; @@ -22,7 +27,9 @@ import org.hl7.fhir.instance.model.Reference; import org.hl7.fhir.instance.model.Resource; import org.hl7.fhir.instance.model.Timing; import org.hl7.fhir.instance.model.Type; +import org.hl7.fhir.instance.model.Identifier.IdentifierUseEnumFactory; import org.hl7.fhir.instance.model.annotations.Block; +import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; @@ -30,6 +37,8 @@ import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseDecimalDatatype; import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype; import org.hl7.fhir.instance.model.api.ICoding; import org.hl7.fhir.instance.model.api.IDatatypeElement; @@ -56,6 +65,9 @@ public class ModelInheritanceTest { * * ElementDefinition * * Backbone elements (eg .ElementDefinitionSlicingComponent) do not extend BackboneElement or have a @Block annotation for some reason + * + * Extension + * * Should URL not be StringType since it can't take extensions? * */ @@ -76,13 +88,20 @@ public class ModelInheritanceTest { public void testBase() { assertTrue(IBase.class.isAssignableFrom(Base.class)); } + + public void testIdentifierUse() throws Exception { + Child child = Identifier.class.getField("use").getAnnotation(Child.class); + assertEquals(IdentifierUseEnumFactory.class, child.enumFactory()); + } + /** * Should be "implements IBaseExtension" */ @Test public void testExtension() { assertTrue(IBaseExtension.class.isAssignableFrom(Extension.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(Extension.class)); } @Test @@ -108,6 +127,7 @@ public class ModelInheritanceTest { @Test public void testPrimitiveType() { assertTrue(IPrimitiveType.class.isAssignableFrom(PrimitiveType.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(PrimitiveType.class)); } @Test @@ -136,7 +156,20 @@ public class ModelInheritanceTest { @Test public void testBackboneElement() { - assertTrue(IBackboneElement.class.isAssignableFrom(IBackboneElement.class)); + assertTrue(IBackboneElement.class.isAssignableFrom(BackboneElement.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(BackboneElement.class)); + assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(BackboneElement.class)); + } + + @Test + public void testElement() { + assertTrue(IBaseHasExtensions.class.isAssignableFrom(Element.class)); + } + + @Test + public void testDomainResource() { + assertTrue(IBaseHasExtensions.class.isAssignableFrom(DomainResource.class)); + assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(DomainResource.class)); } @Test diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index 54e9bedcf2e..881c80f8b41 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -1,7 +1,16 @@ package ca.uhn.fhir.parser; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.IOException; import java.io.OutputStreamWriter; @@ -25,15 +34,16 @@ import org.hl7.fhir.instance.model.Bundle; import org.hl7.fhir.instance.model.Bundle.BundleEntryComponent; import org.hl7.fhir.instance.model.Conformance; import org.hl7.fhir.instance.model.DateTimeType; +import org.hl7.fhir.instance.model.DateType; import org.hl7.fhir.instance.model.DecimalType; import org.hl7.fhir.instance.model.DiagnosticReport; import org.hl7.fhir.instance.model.Extension; import org.hl7.fhir.instance.model.HumanName; import org.hl7.fhir.instance.model.IBaseResource; import org.hl7.fhir.instance.model.IPrimitiveType; +import org.hl7.fhir.instance.model.Identifier.IdentifierUse; import org.hl7.fhir.instance.model.InstantType; import org.hl7.fhir.instance.model.List_; -import org.hl7.fhir.instance.model.Identifier.IdentifierUse; import org.hl7.fhir.instance.model.Narrative.NarrativeStatus; import org.hl7.fhir.instance.model.Observation; import org.hl7.fhir.instance.model.Organization; @@ -83,6 +93,119 @@ public class JsonParserTest { } + + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + Extension ext = new Extension(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeType("2011-01-02T11:13:15")); + patient.getExtension().add(ext); + + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.getExtension().add(parent); + Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + parent.getExtension().add(child1); + Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value2")); + parent.getExtension().add(child2); + + Extension modExt = new Extension(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateType("1995-01-02")); + patient.getModifierExtension().add(modExt); + + HumanName name = patient.addName(); + name.addFamily("Blah"); + StringType given = name.addGivenElement(); + given.setValue("Joe"); + Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given")); + given.getExtension().add(ext2); + + StringType given2 = name.addGivenElement(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.getExtension().add(given2ext); + given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD")); + + String output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newJsonParser().encodeResourceToString(patient); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" + )); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + + "],")); + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + + "}")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + ext = parsed.getExtension().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeType)ext.getValue()).getValueAsString()); + + parent = patient.getExtension().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringType)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringType)child2.getValue()).getValueAsString()); + + modExt = parsed.getModifierExtension().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateType)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getExtension().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringType)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getExtension().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + Extension given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringType)given2ext2.getValue()).getValue()); + + } + + @Test public void testEncodeNonContained() { Organization org = new Organization(); @@ -740,6 +863,7 @@ public class JsonParserTest { enc, containsString("")); assertThat(enc, containsString("")); + assertThat(enc, containsString("")); } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index fa45b0174f3..7c643b944bc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -37,6 +37,7 @@ import org.hl7.fhir.instance.model.Composition; import org.hl7.fhir.instance.model.Conformance; import org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent; import org.hl7.fhir.instance.model.DateTimeType; +import org.hl7.fhir.instance.model.DateType; import org.hl7.fhir.instance.model.DecimalType; import org.hl7.fhir.instance.model.DiagnosticReport; import org.hl7.fhir.instance.model.DocumentManifest; @@ -876,7 +877,7 @@ public class XmlParserTest { } @Test - public void testMoreExtensions() throws Exception { + public void testEncodeAndParseExtensions() throws Exception { Patient patient = new Patient(); patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135"); @@ -884,14 +885,22 @@ public class XmlParserTest { Extension ext = new Extension(); ext.setUrl("http://example.com/extensions#someext"); ext.setValue(new DateTimeType("2011-01-02T11:13:15")); - - // Add the extension to the resource patient.getExtension().add(ext); - // END SNIPPET: resourceExtension - // START SNIPPET: resourceStringExtension + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.getExtension().add(parent); + Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + parent.getExtension().add(child1); + Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value2")); + parent.getExtension().add(child2); + + Extension modExt = new Extension(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateType("1995-01-02")); + patient.getModifierExtension().add(modExt); + HumanName name = patient.addName(); - name.addFamily("Shmoe"); + name.addFamily("Blah"); StringType given = name.addGivenElement(); given.setValue("Joe"); Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given")); @@ -902,28 +911,55 @@ public class XmlParserTest { Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); given2.getExtension().add(given2ext); given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD")); - // END SNIPPET: resourceStringExtension - - // START SNIPPET: subExtension - Extension parent = new Extension().setUrl("http://example.com#parent"); - patient.getExtension().add(parent); - - Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); - parent.getExtension().add(child1); - - Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); - parent.getExtension().add(child2); - // END SNIPPET: subExtension String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); ourLog.info(output); String enc = ourCtx.newXmlParser().encodeResourceToString(patient); - assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); assertThat( enc, - containsString("")); - assertThat(enc, containsString("")); + containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + + /* + * Now parse this back + */ + + Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + ext = parsed.getExtension().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeType)ext.getValue()).getValueAsString()); + + parent = patient.getExtension().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals( "http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringType)child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals( "http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringType)child2.getValue()).getValueAsString()); + + modExt = parsed.getModifierExtension().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateType)modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getExtension().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringType)ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getExtension().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + Extension given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringType)given2ext2.getValue()).getValue()); + } @Test diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index 4ff8d686c22..4fc2a43ac68 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -24,6 +24,7 @@ import java.io.InputStream; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; @@ -107,5 +108,11 @@ public class FhirDev implements IFhirVersion { } + @Override + public IBaseExtension newExtension() { + return null; + } + + } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index 66bd2e7837f..d3b0383ada0 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -35,6 +35,7 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition; @@ -379,6 +380,11 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } + @Override + public IBaseExtension newExtension() { + return null; + } + } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 255585d26e8..54fc0759cb3 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -23,6 +23,7 @@ package ca.uhn.fhir.model.dstu2; import java.io.InputStream; import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; @@ -92,4 +93,9 @@ public class FhirDstu2 implements IFhirVersion { throw new UnsupportedOperationException(); } + @Override + public IBaseExtension newExtension() { + return null; + } + } diff --git a/src/site/xdoc/doc_rest_server.xml b/src/site/xdoc/doc_rest_server.xml index 9d24dda5776..7f18525bfc3 100644 --- a/src/site/xdoc/doc_rest_server.xml +++ b/src/site/xdoc/doc_rest_server.xml @@ -141,6 +141,29 @@ + +

    + The server will return data in a number of places that includes the + complete "identity" of a resource. Identity in this case refers to the + web address that a user can use to access the resource. +

    +

    + For instance, if your server is hosted at http://foo.com/fhir + and your resource provider returns a Patient resource with the ID "123", + the server should translate that ID to "http://foo.com/fhir/Patient/123". +

    +

    + The server will attempt to determine what the base URL should be based on + what the request it receives looks like, but if it is not getting + the right address you may wish to hardcode the base URL, as shown + in the following example: +

    + + + + +
    +

    From 315ad439e497f35565a263dc20bceeff41c32d67 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Mon, 23 Feb 2015 09:08:59 -0500 Subject: [PATCH 05/12] Work on adding conditional HTTP operations to client and JPA server --- .../java/ca/uhn/fhir/context/FhirContext.java | 28 +- .../ca/uhn/fhir/context/ModelScanner.java | 2 +- .../ca/uhn/fhir/model/primitive/IdDt.java | 19 + .../ca/uhn/fhir/rest/api/MethodOutcome.java | 3 +- .../ca/uhn/fhir/rest/client/BaseClient.java | 15 +- .../rest/client/BaseHttpClientInvocation.java | 3 + .../uhn/fhir/rest/client/GenericClient.java | 191 ++- .../ca/uhn/fhir/rest/gclient/IBaseQuery.java | 9 + .../uhn/fhir/rest/gclient/ICreateTyped.java | 16 + .../fhir/rest/gclient/ICreateWithQuery.java | 6 + .../rest/gclient/ICreateWithQueryTyped.java | 5 + .../ca/uhn/fhir/rest/gclient/IDelete.java | 18 +- .../fhir/rest/gclient/IDeleteWithQuery.java | 5 + .../rest/gclient/IDeleteWithQueryTyped.java | 5 + .../java/ca/uhn/fhir/rest/gclient/IQuery.java | 6 +- .../uhn/fhir/rest/gclient/IUpdateTyped.java | 16 + .../fhir/rest/gclient/IUpdateWithQuery.java | 6 + .../rest/gclient/IUpdateWithQueryTyped.java | 5 + .../BaseHttpClientInvocationWithContents.java | 86 +- .../fhir/rest/method/DeleteMethodBinding.java | 11 + .../method/HttpDeleteClientInvocation.java | 14 +- .../rest/method/HttpPostClientInvocation.java | 14 +- .../rest/method/HttpPutClientInvocation.java | 7 +- .../ca/uhn/fhir/rest/method/MethodUtil.java | 682 ++++---- .../ca/uhn/fhir/rest/server/Constants.java | 2 + .../ca/uhn/fhir/i18n/hapi-messages.properties | 17 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java | 227 ++- .../uhn/fhir/jpa/dao/BaseFhirSystemDao.java | 63 - .../ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java | 36 + .../ca/uhn/fhir/jpa/dao/FhirResourceDao.java | 1413 +++++++++-------- .../uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java | 701 +++++--- .../ca/uhn/fhir/jpa/dao/IFhirResourceDao.java | 46 +- .../java/ca/uhn/fhir/jpa/entity/ForcedId.java | 10 +- .../provider/JpaConformanceProviderDstu1.java | 5 +- .../provider/JpaConformanceProviderDstu2.java | 5 +- .../jpa/provider/JpaResourceProvider.java | 7 +- .../uhn/fhir/jpa/dao/FhirResourceDaoTest.java | 277 +++- .../fhir/jpa/dao/FhirSystemDaoDstu1Test.java | 414 +++++ .../fhir/jpa/dao/FhirSystemDaoDstu2Test.java | 681 ++++++++ .../uhn/fhir/jpa/dao/FhirSystemDaoTest.java | 899 ----------- .../provider/ResourceProviderDstu2Test.java | 1 - .../src/test/resources/bundle-dstu1.xml | 158 ++ .../rest/client/GenericClientTestDev.java | 74 - .../rest/client/GenericClientTestDstu2.java | 212 +++ .../rest/server/UpdateConditionalTest.java | 133 ++ 46 files changed, 4083 insertions(+), 2476 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java create mode 100644 hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java create mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java delete mode 100644 hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoTest.java create mode 100644 hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml delete mode 100644 hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDev.java create mode 100644 hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java create mode 100644 hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index e7f909fdaaa..109b3af1044 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -72,6 +72,7 @@ import ca.uhn.fhir.validation.FhirValidator; public class FhirContext { private static final List> EMPTY_LIST = Collections.emptyList(); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirContext.class); private volatile Map, BaseRuntimeElementDefinition> myClassToElementDefinition = Collections.emptyMap(); private volatile Map myIdToResourceDefinition = Collections.emptyMap(); private HapiLocalizer myLocalizer = new HapiLocalizer(); @@ -81,6 +82,7 @@ public class FhirContext { private volatile IRestfulClientFactory myRestfulClientFactory; private volatile RuntimeChildUndeclaredExtensionDefinition myRuntimeChildUndeclaredExtensionDefinition; private final IFhirVersion myVersion; + private Map>> myVersionToNameToResourceType = Collections.emptyMap(); /** @@ -123,7 +125,9 @@ public class FhirContext { } else { throw new IllegalStateException(getLocalizer().getMessage(FhirContext.class, "noStructures")); } - + + ourLog.info("Creating new FHIR context for FHIR version [{}]", myVersion.getVersion().name()); + scanResourceTypes(toElementList(theResourceTypes)); } @@ -176,7 +180,7 @@ public class FhirContext { if (Modifier.isAbstract(theResourceType.getModifiers())) { throw new IllegalArgumentException("Can not scan abstract or interface class (resource definitions must be concrete classes): " + theResourceType.getName()); } - + RuntimeResourceDefinition retVal = (RuntimeResourceDefinition) myClassToElementDefinition.get(theResourceType); if (retVal == null) { retVal = scanResourceType((Class) theResourceType); @@ -186,7 +190,7 @@ public class FhirContext { public RuntimeResourceDefinition getResourceDefinition(FhirVersionEnum theVersion, String theResourceName) { Validate.notNull(theVersion, "theVersion can not be null"); - + if (theVersion.equals(myVersion.getVersion())) { return getResourceDefinition(theResourceName); } @@ -195,18 +199,18 @@ public class FhirContext { if (nameToType == null) { nameToType = new HashMap>(); ModelScanner.scanVersionPropertyFile(null, nameToType, theVersion); - - Map>> newVersionToNameToResourceType = new HashMap>>(); + + Map>> newVersionToNameToResourceType = new HashMap>>(); newVersionToNameToResourceType.putAll(myVersionToNameToResourceType); newVersionToNameToResourceType.put(theVersion, nameToType); myVersionToNameToResourceType = newVersionToNameToResourceType; } - + Class resourceType = nameToType.get(theResourceName.toLowerCase()); - if (resourceType==null) { + if (resourceType == null) { throw new DataFormatException(createUnknownResourceNameError(theResourceName, theVersion)); } - + return getResourceDefinition(resourceType); } @@ -457,6 +461,10 @@ public class FhirContext { return new FhirContext(FhirVersionEnum.DSTU2); } + public static FhirContext forDstu2Hl7Org() { + return new FhirContext(FhirVersionEnum.DSTU2_HL7ORG); + } + private static Collection> toCollection(Class theResourceType) { ArrayList> retVal = new ArrayList>(1); retVal.add(theResourceType); @@ -475,8 +483,4 @@ public class FhirContext { return retVal; } - public static FhirContext forDstu2Hl7Org() { - return new FhirContext(FhirVersionEnum.DSTU2_HL7ORG); - } - } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index 4dc9edef6d9..f5b674d3754 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -216,7 +216,7 @@ class ModelScanner { long time = System.currentTimeMillis() - start; int size = myClassToElementDefinitions.size() - startSize; - ourLog.info("Done scanning FHIR library, found {} model entries in {}ms", size, time); + ourLog.debug("Done scanning FHIR library, found {} model entries in {}ms", size, time); } /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java index 706745e3dd0..a1e3aaf5a29 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java @@ -113,6 +113,18 @@ public class IdDt extends UriDt implements IPrimitiveDatatype { this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); } + /** + * Constructor + * + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theIdPart + * The ID (e.g. "123") + */ + public IdDt(String theResourceType, Long theIdPart) { + this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); + } + /** * Constructor * @@ -515,6 +527,13 @@ public class IdDt extends UriDt implements IPrimitiveDatatype { return theIdPart.toPlainString(); } + private static String toPlainStringWithNpeThrowIfNeeded(Long theIdPart) { + if (theIdPart == null) { + throw new NullPointerException("Long ID can not be null"); + } + return theIdPart.toString(); + } + @Override public boolean isEmpty() { return isBlank(getValue()); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java index 2bc08de2549..8f513af3020 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java @@ -146,8 +146,9 @@ public class MethodOutcome { * If not null, indicates whether the resource was created (as opposed to being updated). This is generally not needed, since the server can assume based on the method being called * whether the result was a creation or an update. However, it can be useful if you are implementing an update method that does a create if the ID doesn't already exist. */ - public void setCreated(Boolean theCreated) { + public MethodOutcome setCreated(Boolean theCreated) { myCreated = theCreated; + return this; } /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java index bf46e32ef0b..6a17c587097 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java @@ -182,9 +182,14 @@ public abstract class BaseClient { } try { - ContentType ct = ContentType.get(response.getEntity()); - String mimeType = ct != null ? ct.getMimeType() : null; - + String mimeType; + if (Constants.STATUS_HTTP_204_NO_CONTENT == response.getStatusLine().getStatusCode()) { + mimeType = null; + } else { + ContentType ct = ContentType.get(response.getEntity()); + mimeType = ct != null ? ct.getMimeType() : null; + } + Map> headers = new HashMap>(); if (response.getAllHeaders() != null) { for (Header next : response.getAllHeaders()) { @@ -398,7 +403,9 @@ public abstract class BaseClient { charset = ct.getCharset(); } if (charset == null) { - ourLog.warn("Response did not specify a charset."); + if (Constants.STATUS_HTTP_204_NO_CONTENT != theResponse.getStatusLine().getStatusCode()) { + ourLog.warn("Response did not specify a charset."); + } charset = Charset.forName("UTF-8"); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java index f28fdeaba2d..41cd049f4d5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java @@ -59,6 +59,9 @@ public abstract class BaseHttpClientInvocation { public abstract HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams, EncodingEnum theEncoding); protected static void appendExtraParamsWithQuestionMark(Map> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark) { + if (theExtraParams==null) { + return; + } boolean first = theWithQuestionMark; if (theExtraParams != null && theExtraParams.isEmpty() == false) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java index 6ffbd24f3a7..4306964d546 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java @@ -56,10 +56,14 @@ import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException; import ca.uhn.fhir.rest.gclient.IClientExecutable; import ca.uhn.fhir.rest.gclient.ICreate; import ca.uhn.fhir.rest.gclient.ICreateTyped; +import ca.uhn.fhir.rest.gclient.ICreateWithQuery; +import ca.uhn.fhir.rest.gclient.ICreateWithQueryTyped; import ca.uhn.fhir.rest.gclient.ICriterion; import ca.uhn.fhir.rest.gclient.ICriterionInternal; import ca.uhn.fhir.rest.gclient.IDelete; import ca.uhn.fhir.rest.gclient.IDeleteTyped; +import ca.uhn.fhir.rest.gclient.IDeleteWithQuery; +import ca.uhn.fhir.rest.gclient.IDeleteWithQueryTyped; import ca.uhn.fhir.rest.gclient.IGetPage; import ca.uhn.fhir.rest.gclient.IGetPageTyped; import ca.uhn.fhir.rest.gclient.IGetTags; @@ -76,6 +80,8 @@ import ca.uhn.fhir.rest.gclient.IUntypedQuery; import ca.uhn.fhir.rest.gclient.IUpdate; import ca.uhn.fhir.rest.gclient.IUpdateExecutable; import ca.uhn.fhir.rest.gclient.IUpdateTyped; +import ca.uhn.fhir.rest.gclient.IUpdateWithQuery; +import ca.uhn.fhir.rest.gclient.IUpdateWithQueryTyped; import ca.uhn.fhir.rest.method.DeleteMethodBinding; import ca.uhn.fhir.rest.method.HistoryMethodBinding; import ca.uhn.fhir.rest.method.HttpDeleteClientInvocation; @@ -237,10 +243,10 @@ public class GenericClient extends BaseClient implements IGenericClient { return new LoadPageInternal(); } -// @Override -// public T read(final Class theType, IdDt theId) { -// return doReadOrVRead(theType, theId, false, null, null); -// } + // @Override + // public T read(final Class theType, IdDt theId) { + // return doReadOrVRead(theType, theId, false, null, null); + // } @Override public T read(Class theType, String theId) { @@ -249,7 +255,7 @@ public class GenericClient extends BaseClient implements IGenericClient { @Override public T read(final Class theType, UriDt theUrl) { - IdDt id = theUrl instanceof IdDt ? ((IdDt)theUrl) : new IdDt(theUrl); + IdDt id = theUrl instanceof IdDt ? ((IdDt) theUrl) : new IdDt(theUrl); return doReadOrVRead(theType, id, false, null, null); } @@ -447,7 +453,7 @@ public class GenericClient extends BaseClient implements IGenericClient { if (theIfVersionMatches != null) { invocation.addHeader(Constants.HEADER_IF_NONE_MATCH, '"' + theIfVersionMatches + '"'); } - + ResourceResponseHandler binding = new ResourceResponseHandler(theType, id); if (theNotModifiedHandler == null) { @@ -475,18 +481,18 @@ public class GenericClient extends BaseClient implements IGenericClient { return vread(theType, resId); } + private static void addParam(Map> params, String parameterName, String parameterValue) { + if (!params.containsKey(parameterName)) { + params.put(parameterName, new ArrayList()); + } + params.get(parameterName).add(parameterValue); + } + private abstract class BaseClientExecutable, Y> implements IClientExecutable { private EncodingEnum myParamEncoding; private Boolean myPrettyPrint; private boolean myQueryLogRequestAndResponse; - protected void addParam(Map> params, String parameterName, String parameterValue) { - if (!params.containsKey(parameterName)) { - params.put(parameterName, new ArrayList()); - } - params.get(parameterName).add(parameterValue); - } - @SuppressWarnings("unchecked") @Override public T andLogRequestAndResponse(boolean theLogRequestAndResponse) { @@ -575,11 +581,13 @@ public class GenericClient extends BaseClient implements IGenericClient { } } - private class CreateInternal extends BaseClientExecutable implements ICreate, ICreateTyped { + private class CreateInternal extends BaseClientExecutable implements ICreate, ICreateTyped, ICreateWithQuery, ICreateWithQueryTyped { private String myId; private IResource myResource; private String myResourceBody; + private String mySearchUrl; + private CriterionList myCriterionList; @Override public MethodOutcome execute() { @@ -593,7 +601,14 @@ public class GenericClient extends BaseClient implements IGenericClient { myResourceBody = null; } - BaseHttpClientInvocation invocation = MethodUtil.createCreateInvocation(myResource, myResourceBody, myId, myContext); + BaseHttpClientInvocation invocation; + if (mySearchUrl != null) { + invocation = MethodUtil.createCreateInvocation(myResource, myResourceBody, myId, myContext, mySearchUrl); + } else if (myCriterionList != null) { + invocation = MethodUtil.createCreateInvocation(myResource, myResourceBody, myId, myContext, myCriterionList.toParamList()); + } else { + invocation = MethodUtil.createCreateInvocation(myResource, myResourceBody, myId, myContext); + } RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource); final String resourceName = def.getName(); @@ -631,15 +646,50 @@ public class GenericClient extends BaseClient implements IGenericClient { return this; } + @Override + public ICreateTyped conditionalByUrl(String theSearchUrl) { + mySearchUrl = theSearchUrl; + return this; + } + + @Override + public ICreateWithQuery conditional() { + myCriterionList = new CriterionList(); + return this; + } + + @Override + public ICreateWithQueryTyped where(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + + @Override + public ICreateWithQueryTyped and(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + } - private class DeleteInternal extends BaseClientExecutable implements IDelete, IDeleteTyped { + private class DeleteInternal extends BaseClientExecutable implements IDelete, IDeleteTyped, IDeleteWithQuery, IDeleteWithQueryTyped { private IdDt myId; + private String mySearchUrl; + private String myResourceType; + private CriterionList myCriterionList; @Override public BaseOperationOutcome execute() { - HttpDeleteClientInvocation invocation = DeleteMethodBinding.createDeleteInvocation(myId); + HttpDeleteClientInvocation invocation; + if (myId != null) { + invocation = DeleteMethodBinding.createDeleteInvocation(myId); + } else if (myCriterionList != null) { + Map> params = myCriterionList.toParamList(); + invocation = DeleteMethodBinding.createDeleteInvocation(myResourceType, params); + } else { + invocation = DeleteMethodBinding.createDeleteInvocation(mySearchUrl); + } OperationOutcomeResponseHandler binding = new OperationOutcomeResponseHandler(); Map> params = new HashMap>(); return invoke(params, binding, invocation); @@ -680,6 +730,56 @@ public class GenericClient extends BaseClient implements IGenericClient { myId = new IdDt(theResourceType, theLogicalId); return this; } + + @Override + public IDeleteTyped resourceConditionalByUrl(String theSearchUrl) { + Validate.notBlank(theSearchUrl, "theSearchUrl can not be blank/null"); + mySearchUrl = theSearchUrl; + return this; + } + + @Override + public IDeleteWithQuery resourceConditionalByType(String theResourceType) { + Validate.notBlank(theResourceType, "theResourceType can not be blank/null"); + if (myContext.getResourceDefinition(theResourceType) == null) { + throw new IllegalArgumentException("Unknown resource type: " + theResourceType); + } + myResourceType = theResourceType; + myCriterionList = new CriterionList(); + return this; + } + + @Override + public IDeleteWithQueryTyped where(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + + @Override + public IDeleteWithQueryTyped and(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + } + + private static class CriterionList extends ArrayList { + + private static final long serialVersionUID = 1L; + + public void populateParamList(Map> theParams) { + for (ICriterionInternal next : this) { + String parameterName = next.getParameterName(); + String parameterValue = next.getParameterValue(); + addParam(theParams, parameterName, parameterValue); + } + } + + public Map> toParamList() { + LinkedHashMap> retVal = new LinkedHashMap>(); + populateParamList(retVal); + return retVal; + } + } private class GetPageInternal extends BaseClientExecutable implements IGetPageTyped { @@ -996,7 +1096,7 @@ public class GenericClient extends BaseClient implements IGenericClient { private class SearchInternal extends BaseClientExecutable implements IQuery, IUntypedQuery { private String myCompartmentName; - private List myCriterion = new ArrayList(); + private CriterionList myCriterion = new CriterionList(); private List myInclude = new ArrayList(); private Integer myParamLimit; private String myResourceId; @@ -1025,11 +1125,7 @@ public class GenericClient extends BaseClient implements IGenericClient { // params.putAll(initial); // } - for (ICriterionInternal next : myCriterion) { - String parameterName = next.getParameterName(); - String parameterValue = next.getParameterValue(); - addParam(params, parameterName, parameterValue); - } + myCriterion.populateParamList(params); for (Include next : myInclude) { addParam(params, Constants.PARAM_INCLUDE, next.getValue()); @@ -1224,30 +1320,39 @@ public class GenericClient extends BaseClient implements IGenericClient { } - private class UpdateInternal extends BaseClientExecutable implements IUpdate, IUpdateTyped, IUpdateExecutable { + private class UpdateInternal extends BaseClientExecutable implements IUpdate, IUpdateTyped, IUpdateExecutable, IUpdateWithQuery, IUpdateWithQueryTyped { private IdDt myId; private IResource myResource; private String myResourceBody; + private String mySearchUrl; + private CriterionList myCriterionList; @Override public MethodOutcome execute() { if (myResource == null) { myResource = parseResourceBody(myResourceBody); } - if (myId == null) { - myId = myResource.getId(); - } - if (myId == null || myId.hasIdPart() == false) { - throw new InvalidRequestException("No ID supplied for resource to update, can not invoke server"); - } // If an explicit encoding is chosen, we will re-serialize to ensure the right encoding if (getParamEncoding() != null) { myResourceBody = null; } - BaseHttpClientInvocation invocation = MethodUtil.createUpdateInvocation(myResource, myResourceBody, myId, myContext); + BaseHttpClientInvocation invocation; + if (mySearchUrl != null) { + invocation = MethodUtil.createUpdateInvocation(myContext, myResource, myResourceBody, mySearchUrl); + } else if (myCriterionList != null) { + invocation = MethodUtil.createUpdateInvocation(myContext, myResource, myResourceBody, myCriterionList.toParamList()); + } else { + if (myId == null) { + myId = myResource.getId(); + } + if (myId == null || myId.hasIdPart() == false) { + throw new InvalidRequestException("No ID supplied for resource to update, can not invoke server"); + } + invocation = MethodUtil.createUpdateInvocation(myResource, myResourceBody, myId, myContext); + } RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource); final String resourceName = def.getName(); @@ -1297,6 +1402,30 @@ public class GenericClient extends BaseClient implements IGenericClient { return this; } + @Override + public IUpdateTyped conditionalByUrl(String theSearchUrl) { + mySearchUrl = theSearchUrl; + return this; + } + + @Override + public IUpdateWithQuery conditional() { + myCriterionList = new CriterionList(); + return this; + } + + @Override + public IUpdateWithQueryTyped where(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + + @Override + public IUpdateWithQueryTyped and(ICriterion theCriterion) { + myCriterionList.add((ICriterionInternal) theCriterion); + return this; + } + } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java new file mode 100644 index 00000000000..8084e5e204c --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java @@ -0,0 +1,9 @@ +package ca.uhn.fhir.rest.gclient; + +public interface IBaseQuery { + + T where(ICriterion theCriterion); + + T and(ICriterion theCriterion); + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java index 59516fffe3f..9bea778502a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java @@ -37,4 +37,20 @@ public interface ICreateTyped extends IClientExecutable[ResourceType]?[Parameters], + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 + * + * @since HAPI 0.9 / FHIR DSTU 2 + */ + ICreateTyped conditionalByUrl(String theSearchUrl); + + /** + * @since HAPI 0.9 / FHIR DSTU 2 + */ + ICreateWithQuery conditional(); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java new file mode 100644 index 00000000000..4b52e8818d8 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java @@ -0,0 +1,6 @@ +package ca.uhn.fhir.rest.gclient; + + +public interface ICreateWithQuery extends IBaseQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java new file mode 100644 index 00000000000..a0ca9af9843 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.rest.gclient; + +public interface ICreateWithQueryTyped extends ICreateTyped, ICreateWithQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java index 6c6106d49b2..866c7652ef8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java @@ -30,5 +30,21 @@ public interface IDelete { IDeleteTyped resourceById(IdDt theId); IDeleteTyped resourceById(String theResourceType, String theLogicalId); - + + /** + * Specifies that the delete should be performed as a conditional delete + * against a given search URL. + * + * @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters], + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 + * + * @since HAPI 0.9 / FHIR DSTU 2 + */ + IDeleteTyped resourceConditionalByUrl(String theSearchUrl); + + /** + * @since HAPI 0.9 / FHIR DSTU 2 + */ + IDeleteWithQuery resourceConditionalByType(String theResourceType); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java new file mode 100644 index 00000000000..060b0cdb077 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.rest.gclient; + +public interface IDeleteWithQuery extends IBaseQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java new file mode 100644 index 00000000000..83e04f3ca50 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.rest.gclient; + +public interface IDeleteWithQueryTyped extends IDeleteTyped, IDeleteWithQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java index 520befc4e3d..0e14d5cda70 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java @@ -24,11 +24,7 @@ import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.rest.method.SearchStyleEnum; -public interface IQuery extends IClientExecutable { - - IQuery where(ICriterion theCriterion); - - IQuery and(ICriterion theCriterion); +public interface IQuery extends IClientExecutable, IBaseQuery { IQuery include(Include theIncludeManagingorganization); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java index 0cd0693c990..e7f98612732 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java @@ -28,4 +28,20 @@ public interface IUpdateTyped extends IUpdateExecutable { IUpdateExecutable withId(String theId); + /** + * Specifies that the update should be performed as a conditional create + * against a given search URL. + * + * @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters], + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 + * + * @since HAPI 0.9 / FHIR DSTU 2 + */ + IUpdateTyped conditionalByUrl(String theSearchUrl); + + /** + * @since HAPI 0.9 / FHIR DSTU 2 + */ + IUpdateWithQuery conditional(); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java new file mode 100644 index 00000000000..2a6380cacd3 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java @@ -0,0 +1,6 @@ +package ca.uhn.fhir.rest.gclient; + + +public interface IUpdateWithQuery extends IBaseQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java new file mode 100644 index 00000000000..cb61b6786c4 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.rest.gclient; + +public interface IUpdateWithQueryTyped extends IUpdateTyped, IUpdateWithQuery { + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java index 1b3c0de5393..2fd3533802b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java @@ -143,29 +143,55 @@ abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvoca myBundleType = null; } + public BaseHttpClientInvocationWithContents(FhirContext theContext, String theContents, Map> theParams, String... theUrlPath) { + myContext = theContext; + myResource = null; + myTagList = null; + myUrlPath = StringUtils.join(theUrlPath, '/'); + myResources = null; + myBundle = null; + myContents = theContents; + myContentsIsBundle = false; + myParams = theParams; + myBundleType = null; + } + + public BaseHttpClientInvocationWithContents(FhirContext theContext, IResource theResource, Map> theParams, String... theUrlPath) { + myContext = theContext; + myResource = theResource; + myTagList = null; + myUrlPath = StringUtils.join(theUrlPath, '/'); + myResources = null; + myBundle = null; + myContents = null; + myContentsIsBundle = false; + myParams = theParams; + myBundleType = null; + } + @Override public HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams, EncodingEnum theEncoding) throws DataFormatException { - StringBuilder b = new StringBuilder(); + StringBuilder url = new StringBuilder(); if (myUrlPath == null) { - b.append(theUrlBase); + url.append(theUrlBase); } else { if (!myUrlPath.contains("://")) { - b.append(theUrlBase); + url.append(theUrlBase); if (!theUrlBase.endsWith("/")) { - b.append('/'); + url.append('/'); } } - b.append(myUrlPath); + url.append(myUrlPath); } - appendExtraParamsWithQuestionMark(theExtraParams, b, b.indexOf("?") == -1); - String url = b.toString(); + appendExtraParamsWithQuestionMark(theExtraParams, url, url.indexOf("?") == -1); if (myResource != null && BaseBinary.class.isAssignableFrom(myResource.getClass())) { BaseBinary binary = (BaseBinary) myResource; ByteArrayEntity entity = new ByteArrayEntity(binary.getContent(), ContentType.parse(binary.getContentType())); HttpRequestBase retVal = createRequest(url, entity); + addMatchHeaders(retVal, url); return retVal; } @@ -177,7 +203,7 @@ abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvoca if (myContents != null) { encoding = MethodUtil.detectEncoding(myContents); } - + if (encoding == EncodingEnum.JSON) { parser = myContext.newJsonParser(); } else { @@ -187,12 +213,12 @@ abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvoca AbstractHttpEntity entity; if (myParams != null) { - contentType= null; + contentType = null; List parameters = new ArrayList(); for (Entry> nextParam : myParams.entrySet()) { List value = nextParam.getValue(); - for(String s: value){ - parameters.add(new BasicNameValuePair(nextParam.getKey(), s)); + for (String s : value) { + parameters.add(new BasicNameValuePair(nextParam.getKey(), s)); } } try { @@ -228,6 +254,7 @@ abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvoca HttpRequestBase retVal = createRequest(url, entity); super.addHeadersToRequest(retVal); + addMatchHeaders(retVal, url); if (contentType != null) { retVal.addHeader(Constants.HEADER_CONTENT_TYPE, contentType + Constants.HEADER_SUFFIX_CT_UTF_8); @@ -236,6 +263,41 @@ abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvoca return retVal; } - protected abstract HttpRequestBase createRequest(String url, AbstractHttpEntity theEntity); + private void addMatchHeaders(HttpRequestBase theHttpRequest, StringBuilder theUrlBase) { + if (myIfNoneExistParams != null) { + StringBuilder b = newHeaderBuilder(theUrlBase); + appendExtraParamsWithQuestionMark(myIfNoneExistParams, b, b.indexOf("?") == -1); + theHttpRequest.addHeader(Constants.HEADER_IF_NONE_EXIST, b.toString()); + } + + if (myIfNoneExistString != null) { + StringBuilder b = newHeaderBuilder(theUrlBase); + b.append(b.indexOf("?") == -1 ? '?' : '&'); + b.append(myIfNoneExistString.substring(myIfNoneExistString.indexOf('?') + 1)); + theHttpRequest.addHeader(Constants.HEADER_IF_NONE_EXIST, b.toString()); + } + } + + private StringBuilder newHeaderBuilder(StringBuilder theUrlBase) { + StringBuilder b = new StringBuilder(); + b.append(theUrlBase); + if (theUrlBase.length() > 0 && theUrlBase.charAt(theUrlBase.length() - 1) == '/') { + b.deleteCharAt(b.length() - 1); + } + return b; + } + + protected abstract HttpRequestBase createRequest(StringBuilder theUrl, AbstractHttpEntity theEntity); + + private Map> myIfNoneExistParams; + private String myIfNoneExistString; + + public void setIfNoneExistParams(Map> theIfNoneExist) { + myIfNoneExistParams = theIfNoneExist; + } + + public void setIfNoneExistString(String theIfNoneExistString) { + myIfNoneExistString = theIfNoneExistString; + } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java index 4a01f4c87e1..ee07daf5205 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java @@ -22,6 +22,8 @@ package ca.uhn.fhir.rest.method; import java.lang.reflect.Method; import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.Set; import ca.uhn.fhir.context.ConfigurationException; @@ -154,5 +156,14 @@ public class DeleteMethodBinding extends BaseOutcomeReturningMethodBinding { return null; } + public static HttpDeleteClientInvocation createDeleteInvocation(String theSearchUrl) { + HttpDeleteClientInvocation retVal = new HttpDeleteClientInvocation(theSearchUrl); + return retVal; + } + + public static HttpDeleteClientInvocation createDeleteInvocation(String theResourceType, Map> theParams) { + return new HttpDeleteClientInvocation(theResourceType, theParams); + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpDeleteClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpDeleteClientInvocation.java index cc14fc917a0..3bee2d4770e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpDeleteClientInvocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpDeleteClientInvocation.java @@ -33,12 +33,22 @@ import ca.uhn.fhir.rest.server.EncodingEnum; public class HttpDeleteClientInvocation extends BaseHttpClientInvocation { private String myUrlPath; + private Map> myParams; public HttpDeleteClientInvocation(IdDt theId) { super(); myUrlPath = theId.toUnqualifiedVersionless().getValue(); } + public HttpDeleteClientInvocation(String theSearchUrl) { + myUrlPath = theSearchUrl; + } + + public HttpDeleteClientInvocation(String theResourceType, Map> theParams) { + myUrlPath = theResourceType; + myParams = theParams; + } + @Override public HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams, EncodingEnum theEncoding) { StringBuilder b = new StringBuilder(); @@ -48,12 +58,12 @@ public class HttpDeleteClientInvocation extends BaseHttpClientInvocation { } b.append(myUrlPath); - appendExtraParamsWithQuestionMark(theExtraParams, b,b.indexOf("?") == -1); + appendExtraParamsWithQuestionMark(myParams, b, b.indexOf("?") == -1); + appendExtraParamsWithQuestionMark(theExtraParams, b, b.indexOf("?") == -1); HttpDelete retVal = new HttpDelete(b.toString()); super.addHeadersToRequest(retVal); return retVal; } - } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPostClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPostClientInvocation.java index 97a8a152eaf..8dcb990f43e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPostClientInvocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPostClientInvocation.java @@ -34,38 +34,34 @@ import ca.uhn.fhir.model.valueset.BundleTypeEnum; public class HttpPostClientInvocation extends BaseHttpClientInvocationWithContents { + public HttpPostClientInvocation(FhirContext theContext, IResource theResource, String theUrlExtension) { super(theContext, theResource, theUrlExtension); } - public HttpPostClientInvocation(FhirContext theContext, TagList theTagList, String... theUrlExtension) { super(theContext, theTagList, theUrlExtension); } - public HttpPostClientInvocation(FhirContext theContext, List theResources, BundleTypeEnum theBundleType) { super(theContext, theResources, theBundleType); } - public HttpPostClientInvocation(FhirContext theContext, Bundle theBundle) { - super(theContext,theBundle); + super(theContext, theBundle); } public HttpPostClientInvocation(FhirContext theContext, String theContents, boolean theIsBundle, String theUrlExtension) { - super(theContext,theContents, theIsBundle, theUrlExtension); + super(theContext, theContents, theIsBundle, theUrlExtension); } - public HttpPostClientInvocation(FhirContext theContext, Map> theParams, String... theUrlExtension) { super(theContext, theParams, theUrlExtension); } - @Override - protected HttpPost createRequest(String url, AbstractHttpEntity theEntity) { - HttpPost retVal = new HttpPost(url); + protected HttpPost createRequest(StringBuilder theUrlBase, AbstractHttpEntity theEntity) { + HttpPost retVal = new HttpPost(theUrlBase.toString()); retVal.setEntity(theEntity); return retVal; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPutClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPutClientInvocation.java index 68822ca5c0b..e9f351c1100 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPutClientInvocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HttpPutClientInvocation.java @@ -34,15 +34,14 @@ public class HttpPutClientInvocation extends BaseHttpClientInvocationWithContent } public HttpPutClientInvocation(FhirContext theContext, String theContents, boolean theIsBundle, String theUrlExtension) { - super(theContext,theContents, theIsBundle, theUrlExtension); + super(theContext, theContents, theIsBundle, theUrlExtension); } @Override - protected HttpRequestBase createRequest(String url, AbstractHttpEntity theEntity) { - HttpPut retVal = new HttpPut(url); + protected HttpRequestBase createRequest(StringBuilder theUrl, AbstractHttpEntity theEntity) { + HttpPut retVal = new HttpPut(theUrl.toString()); retVal.setEntity(theEntity); return retVal; } - } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java index 5b5193b20d9..37c8d260672 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java @@ -5,14 +5,17 @@ import static org.apache.commons.lang3.StringUtils.*; import java.io.IOException; import java.io.PushbackReader; import java.io.Reader; +import java.io.UnsupportedEncodingException; import java.lang.annotation.Annotation; import java.lang.reflect.Method; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -95,9 +98,65 @@ import ca.uhn.fhir.util.ReflectionUtil; public class MethodUtil { private static final String LABEL = "label=\""; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(MethodUtil.class); + private static final String SCHEME = "scheme=\""; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(MethodUtil.class); + static void addTagsToPostOrPut(IResource resource, BaseHttpClientInvocation retVal) { + TagList list = (TagList) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.TAG_LIST); + if (list != null) { + for (Tag tag : list) { + if (StringUtils.isNotBlank(tag.getTerm())) { + retVal.addHeader(Constants.HEADER_CATEGORY, tag.toHeaderValue()); + } + } + } + } + + public static HttpGetClientInvocation createConformanceInvocation() { + return new HttpGetClientInvocation("metadata"); + } + + public static HttpPostClientInvocation createCreateInvocation(IResource theResource, FhirContext theContext) { + return createCreateInvocation(theResource, null, null, theContext); + } + + public static HttpPostClientInvocation createCreateInvocation(IResource theResource, String theResourceBody, String theId, FhirContext theContext) { + RuntimeResourceDefinition def = theContext.getResourceDefinition(theResource); + String resourceName = def.getName(); + + StringBuilder urlExtension = new StringBuilder(); + urlExtension.append(resourceName); + + if (StringUtils.isNotBlank(theId)) { + urlExtension.append('/'); + urlExtension.append(theId); + } + + HttpPostClientInvocation retVal; + if (StringUtils.isBlank(theResourceBody)) { + retVal = new HttpPostClientInvocation(theContext, theResource, urlExtension.toString()); + } else { + retVal = new HttpPostClientInvocation(theContext, theResourceBody, false, urlExtension.toString()); + } + addTagsToPostOrPut(theResource, retVal); + + // addContentTypeHeaderBasedOnDetectedType(retVal, theResourceBody); + + return retVal; + } + + public static HttpPostClientInvocation createCreateInvocation(IResource theResource, String theResourceBody, String theId, FhirContext theContext, Map> theIfNoneExistParams) { + HttpPostClientInvocation retVal = createCreateInvocation(theResource, theResourceBody, theId, theContext); + retVal.setIfNoneExistParams(theIfNoneExistParams); + return retVal; + } + + public static HttpPostClientInvocation createCreateInvocation(IResource theResource, String theResourceBody, String theId, FhirContext theContext, String theIfNoneExistUrl) { + HttpPostClientInvocation retVal = createCreateInvocation(theResource, theResourceBody, theId, theContext); + retVal.setIfNoneExistString(theIfNoneExistUrl); + return retVal; + } public static HttpPutClientInvocation createUpdateInvocation(IResource theResource, String theResourceBody, IdDt theId, FhirContext theContext) { String resourceName = theContext.getResourceDefinition(theResource).getName(); @@ -105,9 +164,9 @@ public class MethodUtil { urlBuilder.append(resourceName); urlBuilder.append('/'); urlBuilder.append(theId.getIdPart()); + String urlExtension = urlBuilder.toString(); HttpPutClientInvocation retVal; - String urlExtension = urlBuilder.toString(); if (StringUtils.isBlank(theResourceBody)) { retVal = new HttpPutClientInvocation(theContext, theResource, urlExtension); } else { @@ -135,203 +194,49 @@ public class MethodUtil { return retVal; } - public static void parseClientRequestResourceHeaders(IdDt theRequestedId, Map> theHeaders, IBaseResource resource) { - List lmHeaders = theHeaders.get(Constants.HEADER_LAST_MODIFIED_LOWERCASE); - if (lmHeaders != null && lmHeaders.size() > 0 && StringUtils.isNotBlank(lmHeaders.get(0))) { - String headerValue = lmHeaders.get(0); - Date headerDateValue; - try { - headerDateValue = DateUtils.parseDate(headerValue); - if (resource instanceof IResource) { - InstantDt lmValue = new InstantDt(headerDateValue); - ((IResource) resource).getResourceMetadata().put(ResourceMetadataKeyEnum.UPDATED, lmValue); - } else if (resource instanceof IAnyResource) { - ((IAnyResource) resource).getMeta().setLastUpdated(headerDateValue); - } - } catch (Exception e) { - ourLog.warn("Unable to parse date string '{}'. Error is: {}", headerValue, e.toString()); - } - } - - List clHeaders = theHeaders.get(Constants.HEADER_CONTENT_LOCATION_LC); - if (clHeaders != null && clHeaders.size() > 0 && StringUtils.isNotBlank(clHeaders.get(0))) { - String headerValue = clHeaders.get(0); - if (isNotBlank(headerValue)) { - new IdDt(headerValue).applyTo(resource); - } - } - - IdDt existing = IdDt.of(resource); - - List eTagHeaders = theHeaders.get(Constants.HEADER_ETAG_LC); - String eTagVersion = null; - if (eTagHeaders != null && eTagHeaders.size() > 0) { - eTagVersion = parseETagValue(eTagHeaders.get(0)); - } - if (isNotBlank(eTagVersion)) { - if (existing == null || existing.isEmpty()) { - if (theRequestedId != null) { - theRequestedId.withVersion(eTagVersion).applyTo(resource); - } - } else if (existing.hasVersionIdPart() == false) { - existing.withVersion(eTagVersion).applyTo(resource); - } - } else if (existing == null || existing.isEmpty()) { - if (theRequestedId != null) { - theRequestedId.applyTo(resource); - } - } - - List categoryHeaders = theHeaders.get(Constants.HEADER_CATEGORY_LC); - if (categoryHeaders != null && categoryHeaders.size() > 0 && StringUtils.isNotBlank(categoryHeaders.get(0))) { - TagList tagList = new TagList(); - for (String header : categoryHeaders) { - parseTagValue(tagList, header); - } - if (resource instanceof IResource) { - ResourceMetadataKeyEnum.TAG_LIST.put((IResource) resource, tagList); - } else if (resource instanceof IAnyResource) { - IMetaType meta = ((IAnyResource) resource).getMeta(); - for (Tag next : tagList) { - meta.addTag().setSystem(next.getScheme()).setCode(next.getTerm()).setDisplay(next.getLabel()); + public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, Map> theMatchParams) { + StringBuilder b = new StringBuilder(); + + String resourceType = theContext.getResourceDefinition(theResource).getName(); + b.append(resourceType); + + boolean haveQuestionMark=false; + for (Entry> nextEntry : theMatchParams.entrySet()) { + for (String nextValue : nextEntry.getValue()) { + b.append(haveQuestionMark ? '&' : '?'); + haveQuestionMark = true; + try { + b.append(URLEncoder.encode(nextEntry.getKey(), "UTF-8")); + b.append('='); + b.append(URLEncoder.encode(nextValue, "UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new ConfigurationException("UTF-8 not supported on this platform"); } } } - } - public static String parseETagValue(String value) { - String eTagVersion; - value = value.trim(); - if (value.length() > 1) { - if (value.charAt(value.length() - 1) == '"') { - if (value.charAt(0) == '"') { - eTagVersion = value.substring(1, value.length() - 1); - } else if (value.length() > 3 && value.charAt(0) == 'W' && value.charAt(1) == '/' && value.charAt(2) == '"') { - eTagVersion = value.substring(3, value.length() - 1); - } else { - eTagVersion = value; - } - } else { - eTagVersion = value; - } - } else { - eTagVersion = value; - } - return eTagVersion; - } - - public static void parseTagValue(TagList tagList, String nextTagComplete) { - StringBuilder next = new StringBuilder(nextTagComplete); - parseTagValue(tagList, nextTagComplete, next); - } - - private static void parseTagValue(TagList theTagList, String theCompleteHeaderValue, StringBuilder theBuffer) { - int firstSemicolon = theBuffer.indexOf(";"); - int deleteTo; - if (firstSemicolon == -1) { - firstSemicolon = theBuffer.indexOf(","); - if (firstSemicolon == -1) { - firstSemicolon = theBuffer.length(); - deleteTo = theBuffer.length(); - } else { - deleteTo = firstSemicolon; - } - } else { - deleteTo = firstSemicolon + 1; - } - - String term = theBuffer.substring(0, firstSemicolon); - String scheme = null; - String label = null; - if (isBlank(term)) { - return; - } - - theBuffer.delete(0, deleteTo); - while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') { - theBuffer.deleteCharAt(0); - } - - while (theBuffer.length() > 0) { - boolean foundSomething = false; - if (theBuffer.length() > SCHEME.length() && theBuffer.substring(0, SCHEME.length()).equals(SCHEME)) { - int closeIdx = theBuffer.indexOf("\"", SCHEME.length()); - scheme = theBuffer.substring(SCHEME.length(), closeIdx); - theBuffer.delete(0, closeIdx + 1); - foundSomething = true; - } - if (theBuffer.length() > LABEL.length() && theBuffer.substring(0, LABEL.length()).equals(LABEL)) { - int closeIdx = theBuffer.indexOf("\"", LABEL.length()); - label = theBuffer.substring(LABEL.length(), closeIdx); - theBuffer.delete(0, closeIdx + 1); - foundSomething = true; - } - // TODO: support enc2231-string as described in - // http://tools.ietf.org/html/draft-johnston-http-category-header-02 - // TODO: support multiple tags in one header as described in - // http://hl7.org/implement/standards/fhir/http.html#tags - - while (theBuffer.length() > 0 && (theBuffer.charAt(0) == ' ' || theBuffer.charAt(0) == ';')) { - theBuffer.deleteCharAt(0); - } - - if (!foundSomething) { - break; - } - } - - if (theBuffer.length() > 0 && theBuffer.charAt(0) == ',') { - theBuffer.deleteCharAt(0); - while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') { - theBuffer.deleteCharAt(0); - } - theTagList.add(new Tag(scheme, term, label)); - parseTagValue(theTagList, theCompleteHeaderValue, theBuffer); - } else { - theTagList.add(new Tag(scheme, term, label)); - } - - if (theBuffer.length() > 0) { - ourLog.warn("Ignoring extra text at the end of " + Constants.HEADER_CATEGORY + " tag '" + theBuffer.toString() + "' - Complete tag value was: " + theCompleteHeaderValue); - } - - } - - static void addTagsToPostOrPut(IResource resource, BaseHttpClientInvocation retVal) { - TagList list = (TagList) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.TAG_LIST); - if (list != null) { - for (Tag tag : list) { - if (StringUtils.isNotBlank(tag.getTerm())) { - retVal.addHeader(Constants.HEADER_CATEGORY, tag.toHeaderValue()); - } - } - } - } - - public static HttpPostClientInvocation createCreateInvocation(IResource theResource, FhirContext theContext) { - return createCreateInvocation(theResource, null, null, theContext); - } - - public static HttpPostClientInvocation createCreateInvocation(IResource theResource, String theResourceBody, String theId, FhirContext theContext) { - RuntimeResourceDefinition def = theContext.getResourceDefinition(theResource); - String resourceName = def.getName(); - - StringBuilder urlExtension = new StringBuilder(); - urlExtension.append(resourceName); - if (StringUtils.isNotBlank(theId)) { - urlExtension.append('/'); - urlExtension.append(theId); - } - - HttpPostClientInvocation retVal; + + HttpPutClientInvocation retVal; if (StringUtils.isBlank(theResourceBody)) { - retVal = new HttpPostClientInvocation(theContext, theResource, urlExtension.toString()); + retVal = new HttpPutClientInvocation(theContext, theResource, b.toString()); } else { - retVal = new HttpPostClientInvocation(theContext, theResourceBody, false, urlExtension.toString()); + retVal = new HttpPutClientInvocation(theContext, theResourceBody, false, b.toString()); } + addTagsToPostOrPut(theResource, retVal); - // addContentTypeHeaderBasedOnDetectedType(retVal, theResourceBody); + return retVal; + } + + public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, String theMatchUrl) { + HttpPutClientInvocation retVal; + if (StringUtils.isBlank(theResourceBody)) { + retVal = new HttpPutClientInvocation(theContext, theResource, theMatchUrl); + } else { + retVal = new HttpPutClientInvocation(theContext, theResourceBody, false,theMatchUrl); + } + + addTagsToPostOrPut(theResource, retVal); return retVal; } @@ -348,57 +253,21 @@ public class MethodUtil { return EncodingEnum.XML; } - public static HttpGetClientInvocation createConformanceInvocation() { - return new HttpGetClientInvocation("metadata"); - } - - public static MethodOutcome process2xxResponse(FhirContext theContext, String theResourceName, int theResponseStatusCode, String theResponseMimeType, Reader theResponseReader, Map> theHeaders) { - List locationHeaders = new ArrayList(); - List lh = theHeaders.get(Constants.HEADER_LOCATION_LC); - if (lh != null) { - locationHeaders.addAll(lh); - } - List clh = theHeaders.get(Constants.HEADER_CONTENT_LOCATION_LC); - if (clh != null) { - locationHeaders.addAll(clh); - } - - MethodOutcome retVal = new MethodOutcome(); - if (locationHeaders != null && locationHeaders.size() > 0) { - String locationHeader = locationHeaders.get(0); - BaseOutcomeReturningMethodBinding.parseContentLocation(retVal, theResourceName, locationHeader); - } - if (theResponseStatusCode != Constants.STATUS_HTTP_204_NO_CONTENT) { - EncodingEnum ct = EncodingEnum.forContentType(theResponseMimeType); - if (ct != null) { - PushbackReader reader = new PushbackReader(theResponseReader); - - try { - int firstByte = reader.read(); - if (firstByte == -1) { - BaseOutcomeReturningMethodBinding.ourLog.debug("No content in response, not going to read"); - reader = null; - } else { - reader.unread(firstByte); - } - } catch (IOException e) { - BaseOutcomeReturningMethodBinding.ourLog.debug("No content in response, not going to read", e); - reader = null; + public static void extractDescription(SearchParameter theParameter, Annotation[] theAnnotations) { + for (Annotation annotation : theAnnotations) { + if (annotation instanceof Description) { + Description desc = (Description) annotation; + if (isNotBlank(desc.formalDefinition())) { + theParameter.setDescription(desc.formalDefinition()); + } else { + theParameter.setDescription(desc.shortDefinition()); } - - if (reader != null) { - IParser parser = ct.newParser(theContext); - IResource outcome = parser.parseResource(reader); - if (outcome instanceof BaseOperationOutcome) { - retVal.setOperationOutcome((BaseOperationOutcome) outcome); - } - } - - } else { - BaseOutcomeReturningMethodBinding.ourLog.debug("Ignoring response content of type: {}", theResponseMimeType); } } - return retVal; + } + + public static Integer findIdParameterIndex(Method theMethod) { + return MethodUtil.findParamAnnotationIndex(theMethod, IdParam.class); } public static Integer findParamAnnotationIndex(Method theMethod, Class toFind) { @@ -416,38 +285,8 @@ public class MethodUtil { return null; } - public static void extractDescription(SearchParameter theParameter, Annotation[] theAnnotations) { - for (Annotation annotation : theAnnotations) { - if (annotation instanceof Description) { - Description desc = (Description) annotation; - if (isNotBlank(desc.formalDefinition())) { - theParameter.setDescription(desc.formalDefinition()); - } else { - theParameter.setDescription(desc.shortDefinition()); - } - } - } - } - - public static IQueryParameterOr singleton(final IQueryParameterType theParam) { - return new IQueryParameterOr() { - - @Override - public void setValuesAsQueryTokens(QualifiedParamList theParameters) { - if (theParameters.isEmpty()) { - return; - } - if (theParameters.size() > 1) { - throw new IllegalArgumentException("Type " + theParam.getClass().getCanonicalName() + " does not support multiple values"); - } - theParam.setValueAsQueryToken(theParameters.getQualifier(), theParameters.get(0)); - } - - @Override - public List getValuesAsQueryTokens() { - return Collections.singletonList(theParam); - } - }; + public static Integer findTagListParameterIndex(Method theMethod) { + return MethodUtil.findParamAnnotationIndex(theMethod, TagListParam.class); } @SuppressWarnings("deprecation") @@ -455,46 +294,6 @@ public class MethodUtil { return MethodUtil.findParamAnnotationIndex(theMethod, VersionIdParam.class); } - public static Integer findIdParameterIndex(Method theMethod) { - return MethodUtil.findParamAnnotationIndex(theMethod, IdParam.class); - } - - public static Integer findTagListParameterIndex(Method theMethod) { - return MethodUtil.findParamAnnotationIndex(theMethod, TagListParam.class); - } - - /** - * This is a utility method intended provided to help the JPA module. - */ - public static IQueryParameterAnd parseQueryParams(RuntimeSearchParam theParamDef, String theUnqualifiedParamName, List theParameters) { - QueryParameterAndBinder binder = null; - switch (theParamDef.getParamType()) { - case COMPOSITE: - throw new UnsupportedOperationException(); - case DATE: - binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.>emptyList()); - break; - case NUMBER: - binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.>emptyList()); - break; - case QUANTITY: - binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.>emptyList()); - break; - case REFERENCE: - binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.>emptyList()); - break; - case STRING: - binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.>emptyList()); - break; - case TOKEN: - binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.>emptyList()); - break; - } - - return binder.parse(theUnqualifiedParamName, theParameters); - } - - @SuppressWarnings("unchecked") public static List getResourceParameters(FhirContext theContext, Method theMethod, Object theProvider) { List parameters = new ArrayList(); @@ -612,4 +411,267 @@ public class MethodUtil { return parameters; } + public static void parseClientRequestResourceHeaders(IdDt theRequestedId, Map> theHeaders, IBaseResource resource) { + List lmHeaders = theHeaders.get(Constants.HEADER_LAST_MODIFIED_LOWERCASE); + if (lmHeaders != null && lmHeaders.size() > 0 && StringUtils.isNotBlank(lmHeaders.get(0))) { + String headerValue = lmHeaders.get(0); + Date headerDateValue; + try { + headerDateValue = DateUtils.parseDate(headerValue); + if (resource instanceof IResource) { + InstantDt lmValue = new InstantDt(headerDateValue); + ((IResource) resource).getResourceMetadata().put(ResourceMetadataKeyEnum.UPDATED, lmValue); + } else if (resource instanceof IAnyResource) { + ((IAnyResource) resource).getMeta().setLastUpdated(headerDateValue); + } + } catch (Exception e) { + ourLog.warn("Unable to parse date string '{}'. Error is: {}", headerValue, e.toString()); + } + } + + List clHeaders = theHeaders.get(Constants.HEADER_CONTENT_LOCATION_LC); + if (clHeaders != null && clHeaders.size() > 0 && StringUtils.isNotBlank(clHeaders.get(0))) { + String headerValue = clHeaders.get(0); + if (isNotBlank(headerValue)) { + new IdDt(headerValue).applyTo(resource); + } + } + + IdDt existing = IdDt.of(resource); + + List eTagHeaders = theHeaders.get(Constants.HEADER_ETAG_LC); + String eTagVersion = null; + if (eTagHeaders != null && eTagHeaders.size() > 0) { + eTagVersion = parseETagValue(eTagHeaders.get(0)); + } + if (isNotBlank(eTagVersion)) { + if (existing == null || existing.isEmpty()) { + if (theRequestedId != null) { + theRequestedId.withVersion(eTagVersion).applyTo(resource); + } + } else if (existing.hasVersionIdPart() == false) { + existing.withVersion(eTagVersion).applyTo(resource); + } + } else if (existing == null || existing.isEmpty()) { + if (theRequestedId != null) { + theRequestedId.applyTo(resource); + } + } + + List categoryHeaders = theHeaders.get(Constants.HEADER_CATEGORY_LC); + if (categoryHeaders != null && categoryHeaders.size() > 0 && StringUtils.isNotBlank(categoryHeaders.get(0))) { + TagList tagList = new TagList(); + for (String header : categoryHeaders) { + parseTagValue(tagList, header); + } + if (resource instanceof IResource) { + ResourceMetadataKeyEnum.TAG_LIST.put((IResource) resource, tagList); + } else if (resource instanceof IAnyResource) { + IMetaType meta = ((IAnyResource) resource).getMeta(); + for (Tag next : tagList) { + meta.addTag().setSystem(next.getScheme()).setCode(next.getTerm()).setDisplay(next.getLabel()); + } + } + } + } + + public static String parseETagValue(String value) { + String eTagVersion; + value = value.trim(); + if (value.length() > 1) { + if (value.charAt(value.length() - 1) == '"') { + if (value.charAt(0) == '"') { + eTagVersion = value.substring(1, value.length() - 1); + } else if (value.length() > 3 && value.charAt(0) == 'W' && value.charAt(1) == '/' && value.charAt(2) == '"') { + eTagVersion = value.substring(3, value.length() - 1); + } else { + eTagVersion = value; + } + } else { + eTagVersion = value; + } + } else { + eTagVersion = value; + } + return eTagVersion; + } + + /** + * This is a utility method intended provided to help the JPA module. + */ + public static IQueryParameterAnd parseQueryParams(RuntimeSearchParam theParamDef, String theUnqualifiedParamName, List theParameters) { + QueryParameterAndBinder binder = null; + switch (theParamDef.getParamType()) { + case COMPOSITE: + throw new UnsupportedOperationException(); + case DATE: + binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.> emptyList()); + break; + case NUMBER: + binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.> emptyList()); + break; + case QUANTITY: + binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.> emptyList()); + break; + case REFERENCE: + binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.> emptyList()); + break; + case STRING: + binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.> emptyList()); + break; + case TOKEN: + binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.> emptyList()); + break; + } + + return binder.parse(theUnqualifiedParamName, theParameters); + } + + public static void parseTagValue(TagList tagList, String nextTagComplete) { + StringBuilder next = new StringBuilder(nextTagComplete); + parseTagValue(tagList, nextTagComplete, next); + } + + private static void parseTagValue(TagList theTagList, String theCompleteHeaderValue, StringBuilder theBuffer) { + int firstSemicolon = theBuffer.indexOf(";"); + int deleteTo; + if (firstSemicolon == -1) { + firstSemicolon = theBuffer.indexOf(","); + if (firstSemicolon == -1) { + firstSemicolon = theBuffer.length(); + deleteTo = theBuffer.length(); + } else { + deleteTo = firstSemicolon; + } + } else { + deleteTo = firstSemicolon + 1; + } + + String term = theBuffer.substring(0, firstSemicolon); + String scheme = null; + String label = null; + if (isBlank(term)) { + return; + } + + theBuffer.delete(0, deleteTo); + while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') { + theBuffer.deleteCharAt(0); + } + + while (theBuffer.length() > 0) { + boolean foundSomething = false; + if (theBuffer.length() > SCHEME.length() && theBuffer.substring(0, SCHEME.length()).equals(SCHEME)) { + int closeIdx = theBuffer.indexOf("\"", SCHEME.length()); + scheme = theBuffer.substring(SCHEME.length(), closeIdx); + theBuffer.delete(0, closeIdx + 1); + foundSomething = true; + } + if (theBuffer.length() > LABEL.length() && theBuffer.substring(0, LABEL.length()).equals(LABEL)) { + int closeIdx = theBuffer.indexOf("\"", LABEL.length()); + label = theBuffer.substring(LABEL.length(), closeIdx); + theBuffer.delete(0, closeIdx + 1); + foundSomething = true; + } + // TODO: support enc2231-string as described in + // http://tools.ietf.org/html/draft-johnston-http-category-header-02 + // TODO: support multiple tags in one header as described in + // http://hl7.org/implement/standards/fhir/http.html#tags + + while (theBuffer.length() > 0 && (theBuffer.charAt(0) == ' ' || theBuffer.charAt(0) == ';')) { + theBuffer.deleteCharAt(0); + } + + if (!foundSomething) { + break; + } + } + + if (theBuffer.length() > 0 && theBuffer.charAt(0) == ',') { + theBuffer.deleteCharAt(0); + while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') { + theBuffer.deleteCharAt(0); + } + theTagList.add(new Tag(scheme, term, label)); + parseTagValue(theTagList, theCompleteHeaderValue, theBuffer); + } else { + theTagList.add(new Tag(scheme, term, label)); + } + + if (theBuffer.length() > 0) { + ourLog.warn("Ignoring extra text at the end of " + Constants.HEADER_CATEGORY + " tag '" + theBuffer.toString() + "' - Complete tag value was: " + theCompleteHeaderValue); + } + + } + + public static MethodOutcome process2xxResponse(FhirContext theContext, String theResourceName, int theResponseStatusCode, String theResponseMimeType, Reader theResponseReader, Map> theHeaders) { + List locationHeaders = new ArrayList(); + List lh = theHeaders.get(Constants.HEADER_LOCATION_LC); + if (lh != null) { + locationHeaders.addAll(lh); + } + List clh = theHeaders.get(Constants.HEADER_CONTENT_LOCATION_LC); + if (clh != null) { + locationHeaders.addAll(clh); + } + + MethodOutcome retVal = new MethodOutcome(); + if (locationHeaders != null && locationHeaders.size() > 0) { + String locationHeader = locationHeaders.get(0); + BaseOutcomeReturningMethodBinding.parseContentLocation(retVal, theResourceName, locationHeader); + } + if (theResponseStatusCode != Constants.STATUS_HTTP_204_NO_CONTENT) { + EncodingEnum ct = EncodingEnum.forContentType(theResponseMimeType); + if (ct != null) { + PushbackReader reader = new PushbackReader(theResponseReader); + + try { + int firstByte = reader.read(); + if (firstByte == -1) { + BaseOutcomeReturningMethodBinding.ourLog.debug("No content in response, not going to read"); + reader = null; + } else { + reader.unread(firstByte); + } + } catch (IOException e) { + BaseOutcomeReturningMethodBinding.ourLog.debug("No content in response, not going to read", e); + reader = null; + } + + if (reader != null) { + IParser parser = ct.newParser(theContext); + IResource outcome = parser.parseResource(reader); + if (outcome instanceof BaseOperationOutcome) { + retVal.setOperationOutcome((BaseOperationOutcome) outcome); + } + } + + } else { + BaseOutcomeReturningMethodBinding.ourLog.debug("Ignoring response content of type: {}", theResponseMimeType); + } + } + return retVal; + } + + public static IQueryParameterOr singleton(final IQueryParameterType theParam) { + return new IQueryParameterOr() { + + @Override + public List getValuesAsQueryTokens() { + return Collections.singletonList(theParam); + } + + @Override + public void setValuesAsQueryTokens(QualifiedParamList theParameters) { + if (theParameters.isEmpty()) { + return; + } + if (theParameters.size() > 1) { + throw new IllegalArgumentException("Type " + theParam.getClass().getCanonicalName() + " does not support multiple values"); + } + theParam.setValueAsQueryToken(theParameters.getQualifier(), theParameters.get(0)); + } + }; + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java index 477d9a00b0a..d285cb98eb2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java @@ -111,6 +111,8 @@ public class Constants { public static final int STATUS_HTTP_501_NOT_IMPLEMENTED = 501; public static final String URL_TOKEN_HISTORY = "_history"; public static final String URL_TOKEN_METADATA = "metadata"; + public static final String HEADER_IF_NONE_EXIST = "If-None-Exist"; + public static final String HEADER_IF_NONE_EXIST_LC = HEADER_IF_NONE_EXIST.toLowerCase(); static { Map valToEncoding = new HashMap(); diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties index 5877c7e53c1..5df2930f93a 100644 --- a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties +++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties @@ -24,7 +24,16 @@ ca.uhn.fhir.validation.FhirValidator.noPhlocError=Phloc-schematron library not f # JPA Messages -ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.incomingNoopInTransaction=Transaction contains resource with operation NOOP. This is only valid as a response operation, not in a request. -ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionOperationWithMultipleMatchFailure=Failed to {0} resource with match URL "{1}" because this search matched {2} resources -ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionOperationFailedNoId=Failed to {0} resource in transaction because no ID was provided -ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionOperationFailedUnknownId=Failed to {0} resource in transaction because no resource could be found with ID {1} +ca.uhn.fhir.jpa.dao.BaseFhirDao.incomingNoopInTransaction=Transaction contains resource with operation NOOP. This is only valid as a response operation, not in a request. +ca.uhn.fhir.jpa.dao.BaseFhirDao.transactionOperationWithMultipleMatchFailure=Failed to {0} resource with match URL "{1}" because this search matched {2} resources +ca.uhn.fhir.jpa.dao.BaseFhirDao.transactionOperationFailedNoId=Failed to {0} resource in transaction because no ID was provided +ca.uhn.fhir.jpa.dao.BaseFhirDao.transactionOperationFailedUnknownId=Failed to {0} resource in transaction because no resource could be found with ID {1} + +ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionContainsMultipleWithDuplicateId=Transaction bundle contains multiple resources with ID: {0} +ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionEntryHasInvalidVerb=Transaction bundle entry has missing or invalid HTTP Verb specified in Bundle.entry.transaction.method. Found value: "{0}" +ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionMissingUrl=Unable to perform {0}, no URL provided. +ca.uhn.fhir.jpa.dao.BaseFhirSystemDao.transactionInvalidUrl=Unable to perform {0}, URL provided is invalid: {1} + +ca.uhn.fhir.jpa.dao.FhirResourceDao.duplicateCreateForcedId=Can not create entity with ID[{0}], a resource with this ID already exists +ca.uhn.fhir.jpa.dao.FhirResourceDao.failedToCreateWithClientAssignedNumericId=Can not create entity with ID[{0}], this server does not allow clients to assign numeric IDs +ca.uhn.fhir.jpa.dao.FhirResourceDao.unableToDeleteNotFound=Unable to find resource matching URL "{0}". Deletion failed. diff --git a/hapi-fhir-jpaserver-base/.settings/org.eclipse.jdt.core.prefs b/hapi-fhir-jpaserver-base/.settings/org.eclipse.jdt.core.prefs index d535869bf65..42246e57dab 100644 --- a/hapi-fhir-jpaserver-base/.settings/org.eclipse.jdt.core.prefs +++ b/hapi-fhir-jpaserver-base/.settings/org.eclipse.jdt.core.prefs @@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -97,4 +97,4 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java index a8f1eb5d37b..16b747575b4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java @@ -23,6 +23,8 @@ package ca.uhn.fhir.jpa.dao; import static org.apache.commons.lang3.StringUtils.*; import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; import java.text.Normalizer; import java.util.ArrayList; import java.util.Collection; @@ -48,6 +50,8 @@ import javax.persistence.criteria.Root; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.apache.http.NameValuePair; +import org.apache.http.client.utils.URLEncodedUtils; import org.hl7.fhir.instance.model.IBaseResource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.PlatformTransactionManager; @@ -77,6 +81,7 @@ import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.jpa.entity.ResourceTag; import ca.uhn.fhir.jpa.entity.TagDefinition; import ca.uhn.fhir.jpa.util.StopWatch; +import ca.uhn.fhir.model.api.IQueryParameterAnd; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.Tag; @@ -87,6 +92,8 @@ import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.rest.method.MethodUtil; +import ca.uhn.fhir.rest.method.QualifiedParamList; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -95,15 +102,16 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.FhirTerser; import com.google.common.base.Function; +import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; public abstract class BaseFhirDao implements IDao { - public static final String UCUM_NS = "http://unitsofmeasure.org"; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseFhirDao.class); + private static final Map ourRetrievalContexts = new HashMap(); + public static final String UCUM_NS = "http://unitsofmeasure.org"; @Autowired(required = true) private DaoConfig myConfig; @@ -114,8 +122,6 @@ public abstract class BaseFhirDao implements IDao { private EntityManager myEntityManager; private List myListeners = new ArrayList(); - private ISearchParamExtractor mySearchParamExtractor; - @Autowired private PlatformTransactionManager myPlatformTransactionManager; @@ -124,6 +130,8 @@ public abstract class BaseFhirDao implements IDao { private Map, IFhirResourceDao> myResourceTypeToDao; + private ISearchParamExtractor mySearchParamExtractor; + protected void createForcedIdIfNeeded(ResourceTable entity, IdDt id) { if (id.isEmpty() == false && id.hasIdPart()) { if (isValidPid(id)) { @@ -196,7 +204,7 @@ public abstract class BaseFhirDao implements IDao { b.append(nextValue.getReference().getResourceType()); b.append("] - Valid resource types for this server: "); b.append(myResourceTypeToDao.keySet().toString()); - + throw new InvalidRequestException(b.toString()); } Long valueOf; @@ -508,19 +516,6 @@ public abstract class BaseFhirDao implements IDao { return retVal; } - protected static String normalizeString(String theString) { - char[] out = new char[theString.length()]; - theString = Normalizer.normalize(theString, Normalizer.Form.NFD); - int j = 0; - for (int i = 0, n = theString.length(); i < n; ++i) { - char c = theString.charAt(i); - if (c <= '\u007F') { - out[j++] = c; - } - } - return new String(out).toUpperCase(); - } - protected void notifyWriteCompleted() { for (IDaoListener next : myListeners) { next.writeCompleted(); @@ -579,6 +574,58 @@ public abstract class BaseFhirDao implements IDao { } + protected Set processMatchUrl(String theMatchUrl, Class theResourceType) { + RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(theResourceType); + + SearchParameterMap paramMap = translateMatchUrl(theMatchUrl, resourceDef); + + IFhirResourceDao dao = getDao(theResourceType); + Set ids = dao.searchForIdsWithAndOr(paramMap); + + return ids; + } + + protected SearchParameterMap translateMatchUrl(String theMatchUrl, RuntimeResourceDefinition resourceDef) { + SearchParameterMap paramMap = new SearchParameterMap(); + List parameters; + try { + parameters = URLEncodedUtils.parse(new URI(theMatchUrl), "UTF-8"); + } catch (URISyntaxException e) { + throw new InvalidRequestException("Failed to parse match URL[" + theMatchUrl + "] - Error was: " + e.toString()); + } + + ArrayListMultimap nameToParamLists = ArrayListMultimap.create(); + for (NameValuePair next : parameters) { + String paramName = next.getName(); + String qualifier = null; + for (int i = 0; i < paramMap.size(); i++) { + switch (paramName.charAt(i)) { + case '.': + case ':': + qualifier = paramName.substring(i); + paramName = paramName.substring(0, i); + i = Integer.MAX_VALUE; + break; + } + } + + QualifiedParamList paramList = QualifiedParamList.splitQueryStringByCommasIgnoreEscape(qualifier, next.getValue()); + nameToParamLists.put(paramName, paramList); + } + + for (String nextParamName : nameToParamLists.keySet()) { + RuntimeSearchParam paramDef = resourceDef.getSearchParam(nextParamName); + if (paramDef == null) { + throw new InvalidRequestException("Failed to parse match URL[" + theMatchUrl + "] - Resource type " + resourceDef.getName() + " does not have a parameter with name: " + nextParamName); + } + + List paramList = nameToParamLists.get(nextParamName); + IQueryParameterAnd param = MethodUtil.parseQueryParams(paramDef, nextParamName, paramList); + paramMap.add(nextParamName, param); + } + return paramMap; + } + @Override public void registerDaoListener(IDaoListener theListener) { Validate.notNull(theListener, "theListener"); @@ -832,7 +879,20 @@ public abstract class BaseFhirDao implements IDao { } } + protected String translatePidIdToForcedId(Long theId) { + ForcedId forcedId = myEntityManager.find(ForcedId.class, theId); + if (forcedId != null) { + return forcedId.getForcedId(); + } else { + return theId.toString(); + } + } + protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull) { + return updateEntity(theResource, entity, theUpdateHistory, theDeletedTimestampOrNull, true,true); + } + + protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull, boolean thePerformIndexing, boolean theUpdateVersion) { if (entity.getPublished() == null) { entity.setPublished(new Date()); } @@ -849,8 +909,10 @@ public abstract class BaseFhirDao implements IDao { myEntityManager.persist(historyEntry); } - entity.setVersion(entity.getVersion() + 1); - + if (theUpdateVersion) { + entity.setVersion(entity.getVersion() + 1); + } + Collection paramsString = new ArrayList(entity.getParamsString()); Collection paramsToken = new ArrayList(entity.getParamsToken()); Collection paramsNumber = new ArrayList(entity.getParamsNumber()); @@ -858,12 +920,13 @@ public abstract class BaseFhirDao implements IDao { Collection paramsDate = new ArrayList(entity.getParamsDate()); Collection resourceLinks = new ArrayList(entity.getResourceLinks()); - final List stringParams; - final List tokenParams; - final List numberParams; - final List quantityParams; - final List dateParams; - final List links; + List stringParams = null; + List tokenParams = null; + List numberParams = null; + List quantityParams = null; + List dateParams = null; + List links = null; + if (theDeletedTimestampOrNull != null) { stringParams = Collections.emptyList(); @@ -875,7 +938,7 @@ public abstract class BaseFhirDao implements IDao { entity.setDeleted(theDeletedTimestampOrNull); entity.setUpdated(theDeletedTimestampOrNull); - } else { + } else if (thePerformIndexing) { stringParams = extractSearchParamStrings(entity, theResource); numberParams = extractSearchParamNumber(entity, theResource); @@ -893,7 +956,6 @@ public abstract class BaseFhirDao implements IDao { links = extractResourceLinks(entity, theResource); populateResourceIntoEntity(theResource, entity); - entity.setUpdated(new Date()); entity.setLanguage(theResource.getLanguage().getValue()); entity.setParamsString(stringParams); @@ -909,6 +971,12 @@ public abstract class BaseFhirDao implements IDao { entity.setResourceLinks(links); entity.setHasLinks(links.isEmpty() == false); + } else { + + populateResourceIntoEntity(theResource, entity); + entity.setUpdated(new Date()); + entity.setLanguage(theResource.getLanguage().getValue()); + } if (entity.getId() == null) { @@ -922,59 +990,63 @@ public abstract class BaseFhirDao implements IDao { entity = myEntityManager.merge(entity); } - if (entity.isParamsStringPopulated()) { - for (ResourceIndexedSearchParamString next : paramsString) { - myEntityManager.remove(next); - } - } - for (ResourceIndexedSearchParamString next : stringParams) { - myEntityManager.persist(next); - } + if (thePerformIndexing) { - if (entity.isParamsTokenPopulated()) { - for (ResourceIndexedSearchParamToken next : paramsToken) { - myEntityManager.remove(next); + if (entity.isParamsStringPopulated()) { + for (ResourceIndexedSearchParamString next : paramsString) { + myEntityManager.remove(next); + } + } + for (ResourceIndexedSearchParamString next : stringParams) { + myEntityManager.persist(next); } - } - for (ResourceIndexedSearchParamToken next : tokenParams) { - myEntityManager.persist(next); - } - if (entity.isParamsNumberPopulated()) { - for (ResourceIndexedSearchParamNumber next : paramsNumber) { - myEntityManager.remove(next); + if (entity.isParamsTokenPopulated()) { + for (ResourceIndexedSearchParamToken next : paramsToken) { + myEntityManager.remove(next); + } + } + for (ResourceIndexedSearchParamToken next : tokenParams) { + myEntityManager.persist(next); } - } - for (ResourceIndexedSearchParamNumber next : numberParams) { - myEntityManager.persist(next); - } - if (entity.isParamsQuantityPopulated()) { - for (ResourceIndexedSearchParamQuantity next : paramsQuantity) { - myEntityManager.remove(next); + if (entity.isParamsNumberPopulated()) { + for (ResourceIndexedSearchParamNumber next : paramsNumber) { + myEntityManager.remove(next); + } + } + for (ResourceIndexedSearchParamNumber next : numberParams) { + myEntityManager.persist(next); } - } - for (ResourceIndexedSearchParamQuantity next : quantityParams) { - myEntityManager.persist(next); - } - if (entity.isParamsDatePopulated()) { - for (ResourceIndexedSearchParamDate next : paramsDate) { - myEntityManager.remove(next); + if (entity.isParamsQuantityPopulated()) { + for (ResourceIndexedSearchParamQuantity next : paramsQuantity) { + myEntityManager.remove(next); + } + } + for (ResourceIndexedSearchParamQuantity next : quantityParams) { + myEntityManager.persist(next); } - } - for (ResourceIndexedSearchParamDate next : dateParams) { - myEntityManager.persist(next); - } - if (entity.isHasLinks()) { - for (ResourceLink next : resourceLinks) { - myEntityManager.remove(next); + if (entity.isParamsDatePopulated()) { + for (ResourceIndexedSearchParamDate next : paramsDate) { + myEntityManager.remove(next); + } } - } - for (ResourceLink next : links) { - myEntityManager.persist(next); - } + for (ResourceIndexedSearchParamDate next : dateParams) { + myEntityManager.persist(next); + } + + if (entity.isHasLinks()) { + for (ResourceLink next : resourceLinks) { + myEntityManager.remove(next); + } + } + for (ResourceLink next : links) { + myEntityManager.persist(next); + } + + } // if thePerformIndexing myEntityManager.flush(); @@ -985,4 +1057,17 @@ public abstract class BaseFhirDao implements IDao { return entity; } + protected static String normalizeString(String theString) { + char[] out = new char[theString.length()]; + theString = Normalizer.normalize(theString, Normalizer.Form.NFD); + int j = 0; + for (int i = 0, n = theString.length(); i < n; ++i) { + char c = theString.charAt(i); + if (c <= '\u007F') { + out[j++] = c; + } + } + return new String(out).toUpperCase(); + } + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirSystemDao.java index 2e8c353673c..8a82b7d6c74 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirSystemDao.java @@ -20,11 +20,8 @@ package ca.uhn.fhir.jpa.dao; * #L% */ -import java.net.URI; -import java.net.URISyntaxException; import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Set; @@ -36,27 +33,14 @@ import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; -import org.apache.http.NameValuePair; -import org.apache.http.client.utils.URLEncodedUtils; -import org.hl7.fhir.instance.model.IBaseResource; - -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.jpa.util.StopWatch; -import ca.uhn.fhir.model.api.IQueryParameterAnd; -import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.rest.method.MethodUtil; -import ca.uhn.fhir.rest.method.QualifiedParamList; import ca.uhn.fhir.rest.server.IBundleProvider; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import com.google.common.collect.ArrayListMultimap; - public abstract class BaseFhirSystemDao extends BaseFhirDao implements IFhirSystemDao { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseFhirSystemDao.class); @@ -82,53 +66,6 @@ public abstract class BaseFhirSystemDao extends BaseFhirDao implements IFhirS return myEntityManager.find(ResourceTable.class, candidateMatches.iterator().next()); } - protected Set processMatchUrl(String theMatchUrl, Class theResourceType) { - RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(theResourceType); - - SearchParameterMap paramMap = new SearchParameterMap(); - List parameters; - try { - parameters = URLEncodedUtils.parse(new URI(theMatchUrl), "UTF-8"); - } catch (URISyntaxException e) { - throw new InvalidRequestException("Failed to parse match URL[" + theMatchUrl + "] - Error was: " + e.toString()); - } - - ArrayListMultimap nameToParamLists = ArrayListMultimap.create(); - for (NameValuePair next : parameters) { - String paramName = next.getName(); - String qualifier = null; - for (int i = 0; i < paramMap.size(); i++) { - switch (paramName.charAt(i)) { - case '.': - case ':': - qualifier = paramName.substring(i); - paramName = paramName.substring(0, i); - i = Integer.MAX_VALUE; - break; - } - } - - QualifiedParamList paramList = QualifiedParamList.splitQueryStringByCommasIgnoreEscape(qualifier, next.getValue()); - nameToParamLists.put(paramName, paramList); - } - - for (String nextParamName : nameToParamLists.keySet()) { - RuntimeSearchParam paramDef = resourceDef.getSearchParam(nextParamName); - if (paramDef == null) { - throw new InvalidRequestException("Failed to parse match URL[" + theMatchUrl + "] - Resource type " + resourceDef.getName() + " does not have a parameter with name: " + nextParamName); - } - - List paramList = nameToParamLists.get(nextParamName); - IQueryParameterAnd param = MethodUtil.parseQueryParams(paramDef, nextParamName, paramList); - paramMap.add(nextParamName, param); - } - - IFhirResourceDao dao = getDao(theResourceType); - Set ids = dao.searchForIdsWithAndOr(paramMap); - - return ids; - } - @Override public IBundleProvider history(Date theSince) { StopWatch w = new StopWatch(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java new file mode 100644 index 00000000000..89cef618eab --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java @@ -0,0 +1,36 @@ +package ca.uhn.fhir.jpa.dao; + +import ca.uhn.fhir.jpa.entity.ResourceTable; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.rest.api.MethodOutcome; + +public class DaoMethodOutcome extends MethodOutcome { + + private ResourceTable myEntity; + private IResource myResource; + + public ResourceTable getEntity() { + return myEntity; + } + + public IResource getResource() { + return myResource; + } + + @Override + public DaoMethodOutcome setCreated(Boolean theCreated) { + super.setCreated(theCreated); + return this; + } + + public DaoMethodOutcome setEntity(ResourceTable theEntity) { + myEntity = theEntity; + return this; + } + + public DaoMethodOutcome setResource(IResource theResource) { + myResource = theResource; + return this; + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java index ffa9690f863..a7f0f8f9e3a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java @@ -20,8 +20,7 @@ package ca.uhn.fhir.jpa.dao; * #L% */ -import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.*; import java.math.BigDecimal; import java.util.ArrayList; @@ -97,7 +96,6 @@ import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.valueset.BundleEntrySearchModeEnum; -import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.param.CompositeParam; import ca.uhn.fhir.rest.param.DateParam; @@ -111,6 +109,7 @@ import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.SimpleBundleProvider; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; @@ -132,658 +131,6 @@ public class FhirResourceDao extends BaseFhirDao implements private Class myResourceType; private String mySecondaryPrimaryKeyParamName; - @Override - public void addTag(IdDt theId, String theScheme, String theTerm, String theLabel) { - StopWatch w = new StopWatch(); - BaseHasResource entity = readEntity(theId); - if (entity == null) { - throw new ResourceNotFoundException(theId); - } - - for (BaseTag next : new ArrayList(entity.getTags())) { - if (ObjectUtil.equals(next.getTag().getScheme(), theScheme) && ObjectUtil.equals(next.getTag().getTerm(), theTerm)) { - return; - } - } - - entity.setHasTags(true); - - TagDefinition def = getTag(theScheme, theTerm, theLabel); - BaseTag newEntity = entity.addTag(def); - - myEntityManager.persist(newEntity); - myEntityManager.merge(entity); - notifyWriteCompleted(); - ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId, w.getMillisAndRestart() }); - } - - @Override - public MethodOutcome create(final T theResource) { - StopWatch w = new StopWatch(); - ResourceTable entity = new ResourceTable(); - entity.setResourceType(toResourceName(theResource)); - - if (theResource.getId().isEmpty() == false) { - if (isValidPid(theResource.getId())) { - throw new UnprocessableEntityException( - "This server cannot create an entity with a user-specified numeric ID - Client should not specify an ID when creating a new resource, or should include at least one letter in the ID to force a client-defined ID"); - } - createForcedIdIfNeeded(entity, theResource.getId()); - - if (entity.getForcedId() != null) { - try { - translateForcedIdToPid(theResource.getId()); - throw new UnprocessableEntityException("Can not create entity with ID[" + theResource.getId().getValue() + "], constraint violation occurred"); - } catch (ResourceNotFoundException e) { - // good, this ID doesn't exist so we can create it - } - } - - } - - updateEntity(theResource, entity, false, null); - - MethodOutcome outcome = toMethodOutcome(entity); - notifyWriteCompleted(); - ourLog.info("Processed create on {} in {}ms", myResourceName, w.getMillisAndRestart()); - return outcome; - } - - @Override - public MethodOutcome delete(IdDt theId) { - StopWatch w = new StopWatch(); - final ResourceTable entity = readEntityLatestVersion(theId); - if (theId.hasVersionIdPart() && theId.getVersionIdPartAsLong().longValue() != entity.getVersion()) { - throw new InvalidRequestException("Trying to update " + theId + " but this is not the current version"); - } - - ResourceTable savedEntity = updateEntity(null, entity, true, new Date()); - - notifyWriteCompleted(); - - ourLog.info("Processed delete on {} in {}ms", theId.getValue(), w.getMillisAndRestart()); - return toMethodOutcome(savedEntity); - } - - // private Set addPredicateComposite(String theParamName, Set thePids, List theList) { - // } - - @Override - public TagList getAllResourceTags() { - StopWatch w = new StopWatch(); - TagList tags = super.getTags(myResourceType, null); - ourLog.info("Processed getTags on {} in {}ms", myResourceName, w.getMillisAndRestart()); - return tags; - } - - public Class getResourceType() { - return myResourceType; - } - - @Override - public TagList getTags(IdDt theResourceId) { - StopWatch w = new StopWatch(); - TagList retVal = super.getTags(myResourceType, theResourceId); - ourLog.info("Processed getTags on {} in {}ms", theResourceId, w.getMillisAndRestart()); - return retVal; - } - - @Override - public IBundleProvider history(Date theSince) { - StopWatch w = new StopWatch(); - IBundleProvider retVal = super.history(myResourceName, null, theSince); - ourLog.info("Processed history on {} in {}ms", myResourceName, w.getMillisAndRestart()); - return retVal; - } - - @Override - public IBundleProvider history(final IdDt theId, final Date theSince) { - final InstantDt end = createHistoryToTimestamp(); - final String resourceType = getContext().getResourceDefinition(myResourceType).getName(); - - T currentTmp; - try { - currentTmp = read(theId.toVersionless()); - if (ResourceMetadataKeyEnum.UPDATED.get(currentTmp).after(end.getValue())) { - currentTmp = null; - } - } catch (ResourceNotFoundException e) { - currentTmp = null; - } - - final T current = currentTmp; - - String querySring = "SELECT count(h) FROM ResourceHistoryTable h " + "WHERE h.myResourceId = :PID AND h.myResourceType = :RESTYPE" + " AND h.myUpdated < :END" - + (theSince != null ? " AND h.myUpdated >= :SINCE" : ""); - TypedQuery countQuery = myEntityManager.createQuery(querySring, Long.class); - countQuery.setParameter("PID", translateForcedIdToPid(theId)); - countQuery.setParameter("RESTYPE", resourceType); - countQuery.setParameter("END", end.getValue(), TemporalType.TIMESTAMP); - if (theSince != null) { - countQuery.setParameter("SINCE", theSince, TemporalType.TIMESTAMP); - } - int historyCount = countQuery.getSingleResult().intValue(); - - final int offset; - final int count; - if (current != null) { - count = historyCount + 1; - offset = 1; - } else { - offset = 0; - count = historyCount; - } - - if (count == 0) { - throw new ResourceNotFoundException(theId); - } - - return new IBundleProvider() { - - @Override - public InstantDt getPublished() { - return end; - } - - @Override - public List getResources(int theFromIndex, int theToIndex) { - ArrayList retVal = new ArrayList(); - if (theFromIndex == 0 && current != null) { - retVal.add(current); - } - - TypedQuery q = myEntityManager.createQuery( - "SELECT h FROM ResourceHistoryTable h WHERE h.myResourceId = :PID AND h.myResourceType = :RESTYPE AND h.myUpdated < :END " - + (theSince != null ? " AND h.myUpdated >= :SINCE" : "") + " ORDER BY h.myUpdated ASC", ResourceHistoryTable.class); - q.setParameter("PID", translateForcedIdToPid(theId)); - q.setParameter("RESTYPE", resourceType); - q.setParameter("END", end.getValue(), TemporalType.TIMESTAMP); - if (theSince != null) { - q.setParameter("SINCE", theSince, TemporalType.TIMESTAMP); - } - - q.setFirstResult(Math.max(0, theFromIndex - offset)); - q.setMaxResults(theToIndex - theFromIndex); - - List results = q.getResultList(); - for (ResourceHistoryTable next : results) { - if (retVal.size() == (theToIndex - theFromIndex)) { - break; - } - retVal.add(toResource(myResourceType, next)); - } - - return retVal; - } - - @Override - public int size() { - return count; - } - }; - - } - - @Override - public IBundleProvider history(Long theId, Date theSince) { - StopWatch w = new StopWatch(); - IBundleProvider retVal = super.history(myResourceName, theId, theSince); - ourLog.info("Processed history on {} in {}ms", theId, w.getMillisAndRestart()); - return retVal; - } - - @PostConstruct - public void postConstruct() { - RuntimeResourceDefinition def = getContext().getResourceDefinition(myResourceType); - myResourceName = def.getName(); - - if (mySecondaryPrimaryKeyParamName != null) { - RuntimeSearchParam sp = def.getSearchParam(mySecondaryPrimaryKeyParamName); - if (sp == null) { - throw new ConfigurationException("Unknown search param on resource[" + myResourceName + "] for secondary key[" + mySecondaryPrimaryKeyParamName + "]"); - } - if (sp.getParamType() != SearchParamTypeEnum.TOKEN) { - throw new ConfigurationException("Search param on resource[" + myResourceName + "] for secondary key[" + mySecondaryPrimaryKeyParamName - + "] is not a token type, only token is supported"); - } - } - - } - - @Override - public T read(IdDt theId) { - validateResourceTypeAndThrowIllegalArgumentException(theId); - - StopWatch w = new StopWatch(); - BaseHasResource entity = readEntity(theId); - validateResourceType(entity); - - T retVal = toResource(myResourceType, entity); - - InstantDt deleted = ResourceMetadataKeyEnum.DELETED_AT.get(retVal); - if (deleted != null && !deleted.isEmpty()) { - throw new ResourceGoneException("Resource was deleted at " + deleted.getValueAsString()); - } - - ourLog.info("Processed read on {} in {}ms", theId.getValue(), w.getMillisAndRestart()); - return retVal; - } - - @Override - public BaseHasResource readEntity(IdDt theId) { - boolean checkForForcedId = true; - - BaseHasResource entity = readEntity(theId, checkForForcedId); - - return entity; - } - - @Override - public BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId) { - validateResourceTypeAndThrowIllegalArgumentException(theId); - - Long pid = translateForcedIdToPid(theId); - BaseHasResource entity = myEntityManager.find(ResourceTable.class, pid); - if (theId.hasVersionIdPart()) { - if (entity.getVersion() != theId.getVersionIdPartAsLong()) { - entity = null; - } - } - - if (entity == null) { - if (theId.hasVersionIdPart()) { - TypedQuery q = myEntityManager.createQuery( - "SELECT t from ResourceHistoryTable t WHERE t.myResourceId = :RID AND t.myResourceType = :RTYP AND t.myResourceVersion = :RVER", ResourceHistoryTable.class); - q.setParameter("RID", pid); - q.setParameter("RTYP", myResourceName); - q.setParameter("RVER", theId.getVersionIdPartAsLong()); - entity = q.getSingleResult(); - } - if (entity == null) { - throw new ResourceNotFoundException(theId); - } - } - - - validateResourceType(entity); - - if (theCheckForForcedId) { - validateGivenIdIsAppropriateToRetrieveResource(theId, entity); - } - return entity; - } - - @Override - public void removeTag(IdDt theId, String theScheme, String theTerm) { - StopWatch w = new StopWatch(); - BaseHasResource entity = readEntity(theId); - if (entity == null) { - throw new ResourceNotFoundException(theId); - } - - for (BaseTag next : new ArrayList(entity.getTags())) { - if (next.getTag().getScheme().equals(theScheme) && next.getTag().getTerm().equals(theTerm)) { - myEntityManager.remove(next); - entity.getTags().remove(next); - } - } - - if (entity.getTags().isEmpty()) { - entity.setHasTags(false); - } - - myEntityManager.merge(entity); - - ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId.getValue(), w.getMillisAndRestart() }); - } - - @Override - public IBundleProvider search(Map theParams) { - SearchParameterMap map = new SearchParameterMap(); - for (Entry nextEntry : theParams.entrySet()) { - map.add(nextEntry.getKey(), (nextEntry.getValue())); - } - return search(map); - } - - @Override - public IBundleProvider search(final SearchParameterMap theParams) { - StopWatch w = new StopWatch(); - final InstantDt now = InstantDt.withCurrentTime(); - - Set loadPids; - if (theParams.isEmpty()) { - loadPids = new HashSet(); - CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); - CriteriaQuery cq = builder.createTupleQuery(); - Root from = cq.from(ResourceTable.class); - cq.multiselect(from.get("myId").as(Long.class)); - cq.where(builder.equal(from.get("myResourceType"), myResourceName)); - - TypedQuery query = myEntityManager.createQuery(cq); - for (Tuple next : query.getResultList()) { - loadPids.add(next.get(0, Long.class)); - } - } else { - loadPids = searchForIdsWithAndOr(theParams); - if (loadPids.isEmpty()) { - return new SimpleBundleProvider(); - } - } - - final List pids = new ArrayList(loadPids); - - // Handle sorting if any was provided - if (theParams.getSort() != null && isNotBlank(theParams.getSort().getParamName())) { - List orders = new ArrayList(); - List predicates = new ArrayList(); - CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); - CriteriaQuery cq = builder.createTupleQuery(); - Root from = cq.from(ResourceTable.class); - predicates.add(from.get("myId").in(pids)); - createSort(builder, from, theParams.getSort(), orders, predicates); - if (orders.size() > 0) { - loadPids = new LinkedHashSet(); - cq.multiselect(from.get("myId").as(Long.class)); - cq.where(predicates.toArray(new Predicate[0])); - cq.orderBy(orders); - - TypedQuery query = myEntityManager.createQuery(cq); - - for (Tuple next : query.getResultList()) { - loadPids.add(next.get(0, Long.class)); - } - - ourLog.info("Sort PID order is now: {}", loadPids); - - pids.clear(); - pids.addAll(loadPids); - } - } - - IBundleProvider retVal = new IBundleProvider() { - - @Override - public InstantDt getPublished() { - return now; - } - - @Override - public List getResources(final int theFromIndex, final int theToIndex) { - TransactionTemplate template = new TransactionTemplate(myPlatformTransactionManager); - return template.execute(new TransactionCallback>() { - @Override - public List doInTransaction(TransactionStatus theStatus) { - List pidsSubList = pids.subList(theFromIndex, theToIndex); - - // Execute the query and make sure we return distinct results - List retVal = new ArrayList(); - loadResourcesByPid(pidsSubList, retVal, BundleEntrySearchModeEnum.MATCH); - - // Load _include resources - if (theParams.getIncludes() != null && theParams.getIncludes().isEmpty() == false) { - Set previouslyLoadedPids = new HashSet(); - - Set includePids = new HashSet(); - List resources = retVal; - do { - includePids.clear(); - - FhirTerser t = getContext().newTerser(); - for (Include next : theParams.getIncludes()) { - for (IResource nextResource : resources) { - RuntimeResourceDefinition def = getContext().getResourceDefinition(nextResource); - List values; - if ("*".equals(next.getValue())) { - values = new ArrayList(); - values.addAll(t.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class)); - } else if (next.getValue().startsWith(def.getName() + ".")) { - values = t.getValues(nextResource, next.getValue()); - } else { - continue; - } - - for (Object object : values) { - if (object == null) { - continue; - } - if (!(object instanceof BaseResourceReferenceDt)) { - throw new InvalidRequestException("Path '" + next.getValue() + "' produced non ResourceReferenceDt value: " + object.getClass()); - } - BaseResourceReferenceDt rr = (BaseResourceReferenceDt) object; - if (rr.getReference().isEmpty()) { - continue; - } - if (rr.getReference().isLocal()) { - continue; - } - - IdDt nextId = rr.getReference().toUnqualified(); - if (!previouslyLoadedPids.contains(nextId)) { - includePids.add(nextId); - previouslyLoadedPids.add(nextId); - } - } - } - } - - if (!includePids.isEmpty()) { - ourLog.info("Loading {} included resources", includePids.size()); - resources = loadResourcesById(includePids); - for (IResource next : resources) { - ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put(next, BundleEntrySearchModeEnum.INCLUDE); - } - retVal.addAll(resources); - } - } while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit()); - - if (previouslyLoadedPids.size() >= getConfig().getIncludeLimit()) { - OperationOutcome oo = new OperationOutcome(); - oo.addIssue().setSeverity(IssueSeverityEnum.WARNING) - .setDetails("Not all _include resources were actually included as the request surpassed the limit of " + getConfig().getIncludeLimit() + " resources"); - retVal.add(0, oo); - } - } - - return retVal; - } - }); - } - - @Override - public int size() { - return pids.size(); - } - }; - - ourLog.info("Processed search for {} on {} in {}ms", new Object[] { myResourceName, theParams, w.getMillisAndRestart() }); - - return retVal; - } - - @Override - public IBundleProvider search(String theParameterName, IQueryParameterType theValue) { - return search(Collections.singletonMap(theParameterName, theValue)); - } - - @Override - public Set searchForIds(Map theParams) { - SearchParameterMap map = new SearchParameterMap(); - for (Entry nextEntry : theParams.entrySet()) { - map.add(nextEntry.getKey(), (nextEntry.getValue())); - } - return searchForIdsWithAndOr(map); - } - - @Override - public Set searchForIds(String theParameterName, IQueryParameterType theValue) { - return searchForIds(Collections.singletonMap(theParameterName, theValue)); - } - - @Override - public Set searchForIdsWithAndOr(SearchParameterMap theParams) { - SearchParameterMap params = theParams; - if (params == null) { - params = new SearchParameterMap(); - } - - RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(myResourceType); - - Set pids = new HashSet(); - - for (Entry>> nextParamEntry : params.entrySet()) { - String nextParamName = nextParamEntry.getKey(); - if (nextParamName.equals("_id")) { - - if (nextParamEntry.getValue().isEmpty()) { - continue; - } else if (nextParamEntry.getValue().size() > 1) { - throw new InvalidRequestException("AND queries not supported for _id (Multiple instances of this param found)"); - } else { - Set joinPids = new HashSet(); - List nextValue = nextParamEntry.getValue().get(0); - if (nextValue == null || nextValue.size() == 0) { - continue; - } else { - for (IQueryParameterType next : nextValue) { - String value = next.getValueAsQueryToken(); - IdDt valueId = new IdDt(value); - try { - long valueLong = translateForcedIdToPid(valueId); - joinPids.add(valueLong); - } catch (ResourceNotFoundException e) { - // This isn't an error, just means no result found - } - } - if (joinPids.isEmpty()) { - continue; - } - } - - pids = addPredicateId(pids, joinPids); - if (pids.isEmpty()) { - return new HashSet(); - } - - if (pids.isEmpty()) { - pids.addAll(joinPids); - } else { - pids.retainAll(joinPids); - } - } - - } else if (nextParamName.equals("_language")) { - - pids = addPredicateLanguage(pids, nextParamEntry.getValue()); - - } else { - - RuntimeSearchParam nextParamDef = resourceDef.getSearchParam(nextParamName); - if (nextParamDef != null) { - switch (nextParamDef.getParamType()) { - case DATE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateDate(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case QUANTITY: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateQuantity(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case REFERENCE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateReference(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case STRING: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateString(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case TOKEN: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateToken(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case NUMBER: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateNumber(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - case COMPOSITE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateComposite(nextParamDef, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); - } - } - break; - } - } - } - } - - return pids; - } - - @SuppressWarnings("unchecked") - @Required - public void setResourceType(Class theTableType) { - myResourceType = (Class) theTableType; - } - - /** - * If set, the given param will be treated as a secondary primary key, and multiple resources will not be able to share the same value. - */ - public void setSecondaryPrimaryKeyParamName(String theSecondaryPrimaryKeyParamName) { - mySecondaryPrimaryKeyParamName = theSecondaryPrimaryKeyParamName; - } - - @Override - public MethodOutcome update(final T theResource, final IdDt theId) { - StopWatch w = new StopWatch(); - - // TransactionTemplate template = new TransactionTemplate(myPlatformTransactionManager); - // ResourceTable savedEntity = template.execute(new TransactionCallback() { - // @Override - // public ResourceTable doInTransaction(TransactionStatus theStatus) { - // final ResourceTable entity = readEntity(theId); - // return updateEntity(theResource, entity,true); - // } - // }); - - final ResourceTable entity = readEntityLatestVersion(theId); - if (theId.hasVersionIdPart() && theId.getVersionIdPartAsLong().longValue() != entity.getVersion()) { - throw new InvalidRequestException("Trying to update " + theId + " but this is not the current version"); - } - - ResourceTable savedEntity = updateEntity(theResource, entity, true, null); - - notifyWriteCompleted(); - ourLog.info("Processed update on {} in {}ms", theId.getValue(), w.getMillisAndRestart()); - return toMethodOutcome(savedEntity); - } - private Set addPredicateComposite(RuntimeSearchParam theParamDef, Set thePids, List theNextAnd) { CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); CriteriaQuery cq = builder.createQuery(Long.class); @@ -889,6 +236,10 @@ public class FhirResourceDao extends BaseFhirDao implements } } + // private Set addPredicateComposite(String theParamName, Set thePids, List theList) { + // } + private Set addPredicateId(Set theExistingPids, Set thePids) { if (thePids == null || thePids.isEmpty()) { return Collections.emptySet(); @@ -1295,6 +646,91 @@ public class FhirResourceDao extends BaseFhirDao implements return new HashSet(q.getResultList()); } + @Override + public void addTag(IdDt theId, String theScheme, String theTerm, String theLabel) { + StopWatch w = new StopWatch(); + BaseHasResource entity = readEntity(theId); + if (entity == null) { + throw new ResourceNotFoundException(theId); + } + + for (BaseTag next : new ArrayList(entity.getTags())) { + if (ObjectUtil.equals(next.getTag().getScheme(), theScheme) && ObjectUtil.equals(next.getTag().getTerm(), theTerm)) { + return; + } + } + + entity.setHasTags(true); + + TagDefinition def = getTag(theScheme, theTerm, theLabel); + BaseTag newEntity = entity.addTag(def); + + myEntityManager.persist(newEntity); + myEntityManager.merge(entity); + notifyWriteCompleted(); + ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId, w.getMillisAndRestart() }); + } + + @Override + public DaoMethodOutcome create(final T theResource) { + return create(theResource, null, true); + } + + @Override + public DaoMethodOutcome create(final T theResource, String theIfNoneExist) { + return create(theResource, theIfNoneExist, true); + } + + @Override + public DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing) { + StopWatch w = new StopWatch(); + ResourceTable entity = new ResourceTable(); + entity.setResourceType(toResourceName(theResource)); + + if (isNotBlank(theResource.getId().getIdPart())) { + if (theResource.getId().isIdPartValidLong()) { + throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirResourceDao.class, "failedToCreateWithClientAssignedNumericId", theResource.getId().getIdPart())); + } + } + + if (isNotBlank(theIfNoneExist)) { + Set match = processMatchUrl(theIfNoneExist, myResourceType); + if (match.size() > 1) { + String msg = getContext().getLocalizer().getMessage(BaseFhirDao.class, "transactionOperationWithMultipleMatchFailure", "CREATE", theIfNoneExist, match.size()); + throw new PreconditionFailedException(msg); + } else if (match.size() == 1) { + Long pid = match.iterator().next(); + entity = myEntityManager.find(ResourceTable.class, pid); + return toMethodOutcome(entity, theResource).setCreated(false); + } + } + + if (theResource.getId().isEmpty() == false) { + if (isValidPid(theResource.getId())) { + throw new UnprocessableEntityException("This server cannot create an entity with a user-specified numeric ID - Client should not specify an ID when creating a new resource, or should include at least one letter in the ID to force a client-defined ID"); + } + createForcedIdIfNeeded(entity, theResource.getId()); + + if (entity.getForcedId() != null) { + try { + translateForcedIdToPid(theResource.getId()); + throw new UnprocessableEntityException(getContext().getLocalizer().getMessage(FhirResourceDao.class, "duplicateCreateForcedId", theResource.getId().getIdPart())); + } catch (ResourceNotFoundException e) { + // good, this ID doesn't exist so we can create it + } + } + + } + + updateEntity(theResource, entity, false, null, thePerformIndexing, true); + + DaoMethodOutcome outcome = toMethodOutcome(entity, theResource).setCreated(true); + + notifyWriteCompleted(); + ourLog.info("Processed create on {} in {}ms", myResourceName, w.getMillisAndRestart()); + return outcome; + } + private Predicate createCompositeParamPart(CriteriaBuilder builder, Root from, RuntimeSearchParam left, IQueryParameterType leftValue) { Predicate retVal = null; switch (left.getParamType()) { @@ -1342,8 +778,7 @@ public class FhirResourceDao extends BaseFhirDao implements return p; } - private Predicate createPredicateString(IQueryParameterType theParameter, String theParamName, CriteriaBuilder theBuilder, - From theFrom) { + private Predicate createPredicateString(IQueryParameterType theParameter, String theParamName, CriteriaBuilder theBuilder, From theFrom) { String rawSearchTerm; if (theParameter instanceof TokenParam) { TokenParam id = (TokenParam) theParameter; @@ -1362,8 +797,7 @@ public class FhirResourceDao extends BaseFhirDao implements } if (rawSearchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) { - throw new InvalidRequestException("Parameter[" + theParamName + "] has length (" + rawSearchTerm.length() + ") that is longer than maximum allowed (" - + ResourceIndexedSearchParamString.MAX_LENGTH + "): " + rawSearchTerm); + throw new InvalidRequestException("Parameter[" + theParamName + "] has length (" + rawSearchTerm.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamString.MAX_LENGTH + "): " + rawSearchTerm); } String likeExpression = normalizeString(rawSearchTerm); @@ -1377,8 +811,7 @@ public class FhirResourceDao extends BaseFhirDao implements return singleCode; } - private Predicate createPredicateToken(IQueryParameterType theParameter, String theParamName, CriteriaBuilder theBuilder, - From theFrom) { + private Predicate createPredicateToken(IQueryParameterType theParameter, String theParamName, CriteriaBuilder theBuilder, From theFrom) { String code; String system; if (theParameter instanceof TokenParam) { @@ -1398,12 +831,10 @@ public class FhirResourceDao extends BaseFhirDao implements } if (system != null && system.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { - throw new InvalidRequestException("Parameter[" + theParamName + "] has system (" + system.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH - + "): " + system); + throw new InvalidRequestException("Parameter[" + theParamName + "] has system (" + system.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + system); } if (code != null && code.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) { - throw new InvalidRequestException("Parameter[" + theParamName + "] has code (" + code.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH - + "): " + code); + throw new InvalidRequestException("Parameter[" + theParamName + "] has code (" + code.length() + ") that is longer than maximum allowed (" + ResourceIndexedSearchParamToken.MAX_LENGTH + "): " + code); } ArrayList singleCodePredicates = (new ArrayList()); @@ -1452,6 +883,171 @@ public class FhirResourceDao extends BaseFhirDao implements createSort(theBuilder, theFrom, theSort.getChain(), theOrders, thePredicates); } + @Override + public DaoMethodOutcome delete(IdDt theId) { + StopWatch w = new StopWatch(); + final ResourceTable entity = readEntityLatestVersion(theId); + if (theId.hasVersionIdPart() && theId.getVersionIdPartAsLong().longValue() != entity.getVersion()) { + throw new InvalidRequestException("Trying to update " + theId + " but this is not the current version"); + } + + ResourceTable savedEntity = updateEntity(null, entity, true, new Date()); + + notifyWriteCompleted(); + + ourLog.info("Processed delete on {} in {}ms", theId.getValue(), w.getMillisAndRestart()); + return toMethodOutcome(savedEntity, null); + } + + @Override + public DaoMethodOutcome deleteByUrl(String theUrl) { + StopWatch w = new StopWatch(); + + Set resource = processMatchUrl(theUrl, myResourceType); + if (resource.isEmpty()) { + throw new ResourceNotFoundException(getContext().getLocalizer().getMessage(FhirResourceDao.class, "unableToDeleteNotFound", theUrl)); + } else if (resource.size() > 1) { + throw new ResourceNotFoundException(getContext().getLocalizer().getMessage(BaseFhirDao.class, "transactionOperationWithMultipleMatchFailure", "DELETE", theUrl, resource.size())); + } + + Long pid = resource.iterator().next(); + + ResourceTable entity = myEntityManager.find(ResourceTable.class, pid); + + ResourceTable savedEntity = updateEntity(null, entity, true, new Date()); + notifyWriteCompleted(); + + ourLog.info("Processed delete on {} in {}ms", theUrl, w.getMillisAndRestart()); + return toMethodOutcome(savedEntity, null); + } + + @Override + public TagList getAllResourceTags() { + StopWatch w = new StopWatch(); + TagList tags = super.getTags(myResourceType, null); + ourLog.info("Processed getTags on {} in {}ms", myResourceName, w.getMillisAndRestart()); + return tags; + } + + public Class getResourceType() { + return myResourceType; + } + + @Override + public TagList getTags(IdDt theResourceId) { + StopWatch w = new StopWatch(); + TagList retVal = super.getTags(myResourceType, theResourceId); + ourLog.info("Processed getTags on {} in {}ms", theResourceId, w.getMillisAndRestart()); + return retVal; + } + + @Override + public IBundleProvider history(Date theSince) { + StopWatch w = new StopWatch(); + IBundleProvider retVal = super.history(myResourceName, null, theSince); + ourLog.info("Processed history on {} in {}ms", myResourceName, w.getMillisAndRestart()); + return retVal; + } + + @Override + public IBundleProvider history(final IdDt theId, final Date theSince) { + final InstantDt end = createHistoryToTimestamp(); + final String resourceType = getContext().getResourceDefinition(myResourceType).getName(); + + T currentTmp; + try { + BaseHasResource entity = readEntity(theId.toVersionless(), false); + validateResourceType(entity); + currentTmp = toResource(myResourceType, entity); + if (ResourceMetadataKeyEnum.UPDATED.get(currentTmp).after(end.getValue())) { + currentTmp = null; + } + } catch (ResourceNotFoundException e) { + currentTmp = null; + } + + final T current = currentTmp; + + String querySring = "SELECT count(h) FROM ResourceHistoryTable h " + "WHERE h.myResourceId = :PID AND h.myResourceType = :RESTYPE" + " AND h.myUpdated < :END" + (theSince != null ? " AND h.myUpdated >= :SINCE" : ""); + TypedQuery countQuery = myEntityManager.createQuery(querySring, Long.class); + countQuery.setParameter("PID", translateForcedIdToPid(theId)); + countQuery.setParameter("RESTYPE", resourceType); + countQuery.setParameter("END", end.getValue(), TemporalType.TIMESTAMP); + if (theSince != null) { + countQuery.setParameter("SINCE", theSince, TemporalType.TIMESTAMP); + } + int historyCount = countQuery.getSingleResult().intValue(); + + final int offset; + final int count; + if (current != null) { + count = historyCount + 1; + offset = 1; + } else { + offset = 0; + count = historyCount; + } + + if (count == 0) { + throw new ResourceNotFoundException(theId); + } + + return new IBundleProvider() { + + @Override + public InstantDt getPublished() { + return end; + } + + @Override + public List getResources(int theFromIndex, int theToIndex) { + ArrayList retVal = new ArrayList(); + if (theFromIndex == 0 && current != null) { + retVal.add(current); + } + + TypedQuery q = myEntityManager.createQuery("SELECT h FROM ResourceHistoryTable h WHERE h.myResourceId = :PID AND h.myResourceType = :RESTYPE AND h.myUpdated < :END " + (theSince != null ? " AND h.myUpdated >= :SINCE" : "") + " ORDER BY h.myUpdated ASC", + ResourceHistoryTable.class); + q.setParameter("PID", translateForcedIdToPid(theId)); + q.setParameter("RESTYPE", resourceType); + q.setParameter("END", end.getValue(), TemporalType.TIMESTAMP); + if (theSince != null) { + q.setParameter("SINCE", theSince, TemporalType.TIMESTAMP); + } + + int firstResult = Math.max(0, theFromIndex - offset); + q.setFirstResult(firstResult); + + int maxResults = (theToIndex - theFromIndex) + 1; + q.setMaxResults(maxResults); + + List results = q.getResultList(); + for (ResourceHistoryTable next : results) { + if (retVal.size() == maxResults) { + break; + } + retVal.add(toResource(myResourceType, next)); + } + + return retVal; + } + + @Override + public int size() { + return count; + } + }; + + } + + @Override + public IBundleProvider history(Long theId, Date theSince) { + StopWatch w = new StopWatch(); + IBundleProvider retVal = super.history(myResourceName, theId, theSince); + ourLog.info("Processed history on {} in {}ms", theId, w.getMillisAndRestart()); + return retVal; + } + private void loadResourcesByPid(Collection theIncludePids, List theResourceListToPopulate, BundleEntrySearchModeEnum theBundleEntryStatus) { if (theIncludePids.isEmpty()) { return; @@ -1479,13 +1075,91 @@ public class FhirResourceDao extends BaseFhirDao implements ourLog.warn("Got back unexpected resource PID {}", next.getId()); continue; } - + ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put(resource, theBundleEntryStatus); theResourceListToPopulate.set(index, resource); } } + @PostConstruct + public void postConstruct() { + RuntimeResourceDefinition def = getContext().getResourceDefinition(myResourceType); + myResourceName = def.getName(); + + if (mySecondaryPrimaryKeyParamName != null) { + RuntimeSearchParam sp = def.getSearchParam(mySecondaryPrimaryKeyParamName); + if (sp == null) { + throw new ConfigurationException("Unknown search param on resource[" + myResourceName + "] for secondary key[" + mySecondaryPrimaryKeyParamName + "]"); + } + if (sp.getParamType() != SearchParamTypeEnum.TOKEN) { + throw new ConfigurationException("Search param on resource[" + myResourceName + "] for secondary key[" + mySecondaryPrimaryKeyParamName + "] is not a token type, only token is supported"); + } + } + + } + + @Override + public T read(IdDt theId) { + validateResourceTypeAndThrowIllegalArgumentException(theId); + + StopWatch w = new StopWatch(); + BaseHasResource entity = readEntity(theId); + validateResourceType(entity); + + T retVal = toResource(myResourceType, entity); + + InstantDt deleted = ResourceMetadataKeyEnum.DELETED_AT.get(retVal); + if (deleted != null && !deleted.isEmpty()) { + throw new ResourceGoneException("Resource was deleted at " + deleted.getValueAsString()); + } + + ourLog.info("Processed read on {} in {}ms", theId.getValue(), w.getMillisAndRestart()); + return retVal; + } + + @Override + public BaseHasResource readEntity(IdDt theId) { + boolean checkForForcedId = true; + + BaseHasResource entity = readEntity(theId, checkForForcedId); + + return entity; + } + + @Override + public BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId) { + validateResourceTypeAndThrowIllegalArgumentException(theId); + + Long pid = translateForcedIdToPid(theId); + BaseHasResource entity = myEntityManager.find(ResourceTable.class, pid); + if (theId.hasVersionIdPart()) { + if (entity.getVersion() != theId.getVersionIdPartAsLong()) { + entity = null; + } + } + + if (entity == null) { + if (theId.hasVersionIdPart()) { + TypedQuery q = myEntityManager.createQuery("SELECT t from ResourceHistoryTable t WHERE t.myResourceId = :RID AND t.myResourceType = :RTYP AND t.myResourceVersion = :RVER", ResourceHistoryTable.class); + q.setParameter("RID", pid); + q.setParameter("RTYP", myResourceName); + q.setParameter("RVER", theId.getVersionIdPartAsLong()); + entity = q.getSingleResult(); + } + if (entity == null) { + throw new ResourceNotFoundException(theId); + } + } + + validateResourceType(entity); + + if (theCheckForForcedId) { + validateGivenIdIsAppropriateToRetrieveResource(theId, entity); + } + return entity; + } + private ResourceTable readEntityLatestVersion(IdDt theId) { ResourceTable entity = myEntityManager.find(ResourceTable.class, translateForcedIdToPid(theId)); if (entity == null) { @@ -1495,9 +1169,359 @@ public class FhirResourceDao extends BaseFhirDao implements return entity; } - private MethodOutcome toMethodOutcome(final ResourceTable entity) { - MethodOutcome outcome = new MethodOutcome(); - outcome.setId(entity.getIdDt()); + @Override + public void removeTag(IdDt theId, String theScheme, String theTerm) { + StopWatch w = new StopWatch(); + BaseHasResource entity = readEntity(theId); + if (entity == null) { + throw new ResourceNotFoundException(theId); + } + + for (BaseTag next : new ArrayList(entity.getTags())) { + if (next.getTag().getScheme().equals(theScheme) && next.getTag().getTerm().equals(theTerm)) { + myEntityManager.remove(next); + entity.getTags().remove(next); + } + } + + if (entity.getTags().isEmpty()) { + entity.setHasTags(false); + } + + myEntityManager.merge(entity); + + ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId.getValue(), w.getMillisAndRestart() }); + } + + @Override + public IBundleProvider search(Map theParams) { + SearchParameterMap map = new SearchParameterMap(); + for (Entry nextEntry : theParams.entrySet()) { + map.add(nextEntry.getKey(), (nextEntry.getValue())); + } + return search(map); + } + + @Override + public IBundleProvider search(final SearchParameterMap theParams) { + StopWatch w = new StopWatch(); + final InstantDt now = InstantDt.withCurrentTime(); + + Set loadPids; + if (theParams.isEmpty()) { + loadPids = new HashSet(); + CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); + CriteriaQuery cq = builder.createTupleQuery(); + Root from = cq.from(ResourceTable.class); + cq.multiselect(from.get("myId").as(Long.class)); + cq.where(builder.equal(from.get("myResourceType"), myResourceName)); + + TypedQuery query = myEntityManager.createQuery(cq); + for (Tuple next : query.getResultList()) { + loadPids.add(next.get(0, Long.class)); + } + } else { + loadPids = searchForIdsWithAndOr(theParams); + if (loadPids.isEmpty()) { + return new SimpleBundleProvider(); + } + } + + final List pids = new ArrayList(loadPids); + + // Handle sorting if any was provided + if (theParams.getSort() != null && isNotBlank(theParams.getSort().getParamName())) { + List orders = new ArrayList(); + List predicates = new ArrayList(); + CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); + CriteriaQuery cq = builder.createTupleQuery(); + Root from = cq.from(ResourceTable.class); + predicates.add(from.get("myId").in(pids)); + createSort(builder, from, theParams.getSort(), orders, predicates); + if (orders.size() > 0) { + loadPids = new LinkedHashSet(); + cq.multiselect(from.get("myId").as(Long.class)); + cq.where(predicates.toArray(new Predicate[0])); + cq.orderBy(orders); + + TypedQuery query = myEntityManager.createQuery(cq); + + for (Tuple next : query.getResultList()) { + loadPids.add(next.get(0, Long.class)); + } + + ourLog.info("Sort PID order is now: {}", loadPids); + + pids.clear(); + pids.addAll(loadPids); + } + } + + IBundleProvider retVal = new IBundleProvider() { + + @Override + public InstantDt getPublished() { + return now; + } + + @Override + public List getResources(final int theFromIndex, final int theToIndex) { + TransactionTemplate template = new TransactionTemplate(myPlatformTransactionManager); + return template.execute(new TransactionCallback>() { + @Override + public List doInTransaction(TransactionStatus theStatus) { + List pidsSubList = pids.subList(theFromIndex, theToIndex); + + // Execute the query and make sure we return distinct results + List retVal = new ArrayList(); + loadResourcesByPid(pidsSubList, retVal, BundleEntrySearchModeEnum.MATCH); + + // Load _include resources + if (theParams.getIncludes() != null && theParams.getIncludes().isEmpty() == false) { + Set previouslyLoadedPids = new HashSet(); + + Set includePids = new HashSet(); + List resources = retVal; + do { + includePids.clear(); + + FhirTerser t = getContext().newTerser(); + for (Include next : theParams.getIncludes()) { + for (IResource nextResource : resources) { + RuntimeResourceDefinition def = getContext().getResourceDefinition(nextResource); + List values; + if ("*".equals(next.getValue())) { + values = new ArrayList(); + values.addAll(t.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class)); + } else if (next.getValue().startsWith(def.getName() + ".")) { + values = t.getValues(nextResource, next.getValue()); + } else { + continue; + } + + for (Object object : values) { + if (object == null) { + continue; + } + if (!(object instanceof BaseResourceReferenceDt)) { + throw new InvalidRequestException("Path '" + next.getValue() + "' produced non ResourceReferenceDt value: " + object.getClass()); + } + BaseResourceReferenceDt rr = (BaseResourceReferenceDt) object; + if (rr.getReference().isEmpty()) { + continue; + } + if (rr.getReference().isLocal()) { + continue; + } + + IdDt nextId = rr.getReference().toUnqualified(); + if (!previouslyLoadedPids.contains(nextId)) { + includePids.add(nextId); + previouslyLoadedPids.add(nextId); + } + } + } + } + + if (!includePids.isEmpty()) { + ourLog.info("Loading {} included resources", includePids.size()); + resources = loadResourcesById(includePids); + for (IResource next : resources) { + ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put(next, BundleEntrySearchModeEnum.INCLUDE); + } + retVal.addAll(resources); + } + } while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit()); + + if (previouslyLoadedPids.size() >= getConfig().getIncludeLimit()) { + OperationOutcome oo = new OperationOutcome(); + oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Not all _include resources were actually included as the request surpassed the limit of " + getConfig().getIncludeLimit() + " resources"); + retVal.add(0, oo); + } + } + + return retVal; + } + }); + } + + @Override + public int size() { + return pids.size(); + } + }; + + ourLog.info("Processed search for {} on {} in {}ms", new Object[] { myResourceName, theParams, w.getMillisAndRestart() }); + + return retVal; + } + + @Override + public IBundleProvider search(String theParameterName, IQueryParameterType theValue) { + return search(Collections.singletonMap(theParameterName, theValue)); + } + + @Override + public Set searchForIds(Map theParams) { + SearchParameterMap map = new SearchParameterMap(); + for (Entry nextEntry : theParams.entrySet()) { + map.add(nextEntry.getKey(), (nextEntry.getValue())); + } + return searchForIdsWithAndOr(map); + } + + @Override + public Set searchForIds(String theParameterName, IQueryParameterType theValue) { + return searchForIds(Collections.singletonMap(theParameterName, theValue)); + } + + @Override + public Set searchForIdsWithAndOr(SearchParameterMap theParams) { + SearchParameterMap params = theParams; + if (params == null) { + params = new SearchParameterMap(); + } + + RuntimeResourceDefinition resourceDef = getContext().getResourceDefinition(myResourceType); + + Set pids = new HashSet(); + + for (Entry>> nextParamEntry : params.entrySet()) { + String nextParamName = nextParamEntry.getKey(); + if (nextParamName.equals("_id")) { + + if (nextParamEntry.getValue().isEmpty()) { + continue; + } else if (nextParamEntry.getValue().size() > 1) { + throw new InvalidRequestException("AND queries not supported for _id (Multiple instances of this param found)"); + } else { + Set joinPids = new HashSet(); + List nextValue = nextParamEntry.getValue().get(0); + if (nextValue == null || nextValue.size() == 0) { + continue; + } else { + for (IQueryParameterType next : nextValue) { + String value = next.getValueAsQueryToken(); + IdDt valueId = new IdDt(value); + try { + long valueLong = translateForcedIdToPid(valueId); + joinPids.add(valueLong); + } catch (ResourceNotFoundException e) { + // This isn't an error, just means no result found + } + } + if (joinPids.isEmpty()) { + continue; + } + } + + pids = addPredicateId(pids, joinPids); + if (pids.isEmpty()) { + return new HashSet(); + } + + if (pids.isEmpty()) { + pids.addAll(joinPids); + } else { + pids.retainAll(joinPids); + } + } + + } else if (nextParamName.equals("_language")) { + + pids = addPredicateLanguage(pids, nextParamEntry.getValue()); + + } else { + + RuntimeSearchParam nextParamDef = resourceDef.getSearchParam(nextParamName); + if (nextParamDef != null) { + switch (nextParamDef.getParamType()) { + case DATE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateDate(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case QUANTITY: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateQuantity(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case REFERENCE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateReference(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case STRING: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateString(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case TOKEN: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateToken(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case NUMBER: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateNumber(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + case COMPOSITE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateComposite(nextParamDef, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } + } + break; + } + } + } + } + + return pids; + } + + @SuppressWarnings("unchecked") + @Required + public void setResourceType(Class theTableType) { + myResourceType = (Class) theTableType; + } + + /** + * If set, the given param will be treated as a secondary primary key, and multiple resources will not be able to + * share the same value. + */ + public void setSecondaryPrimaryKeyParamName(String theSecondaryPrimaryKeyParamName) { + mySecondaryPrimaryKeyParamName = theSecondaryPrimaryKeyParamName; + } + + private DaoMethodOutcome toMethodOutcome(final ResourceTable theEntity, IResource theResource) { + DaoMethodOutcome outcome = new DaoMethodOutcome(); + outcome.setId(theEntity.getIdDt()); + outcome.setEntity(theEntity); + outcome.setResource(theResource); + if (theResource != null) { + theResource.setId(theEntity.getIdDt()); + } return outcome; } @@ -1542,11 +1566,57 @@ public class FhirResourceDao extends BaseFhirDao implements return qp; } + @Override + public DaoMethodOutcome update(T theResource) { + return update(theResource,null); + } + + @Override + public DaoMethodOutcome update(T theResource, String theMatchUrl) { + return update(theResource, theMatchUrl, true); + } + + @Override + public DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing) { + StopWatch w = new StopWatch(); + + final ResourceTable entity; + + IdDt resourceId; + if (isNotBlank(theMatchUrl)) { + Set match = processMatchUrl(theMatchUrl, myResourceType); + if (match.size() > 1) { + String msg = getContext().getLocalizer().getMessage(BaseFhirDao.class, "transactionOperationWithMultipleMatchFailure", "UPDATE", theMatchUrl, match.size()); + throw new PreconditionFailedException(msg); + } else if (match.size() == 1) { + Long pid = match.iterator().next(); + entity = myEntityManager.find(ResourceTable.class, pid); + resourceId = entity.getIdDt(); + } else { + return create(theResource); + } + } else { + resourceId = theResource.getId(); + entity = readEntityLatestVersion(resourceId); + } + + if (resourceId.hasVersionIdPart() && resourceId.getVersionIdPartAsLong().longValue() != entity.getVersion()) { + throw new InvalidRequestException("Trying to update " + resourceId + " but this is not the current version"); + } + + ResourceTable savedEntity = updateEntity(theResource, entity, true, null, thePerformIndexing, true); + + notifyWriteCompleted(); + ourLog.info("Processed update on {} in {}ms", resourceId, w.getMillisAndRestart()); + return toMethodOutcome(savedEntity, theResource).setCreated(false); + } + private void validateGivenIdIsAppropriateToRetrieveResource(IdDt theId, BaseHasResource entity) { if (entity.getForcedId() != null) { if (theId.isIdPartValidLong()) { // This means that the resource with the given numeric ID exists, but it has a "forced ID", meaning that - // as far as the outside world is concerned, the given ID doesn't exist (it's just an internal pointer to the + // as far as the outside world is concerned, the given ID doesn't exist (it's just an internal pointer + // to the // forced ID) throw new ResourceNotFoundException(theId); } @@ -1555,8 +1625,7 @@ public class FhirResourceDao extends BaseFhirDao implements private void validateResourceType(BaseHasResource entity) { if (!myResourceName.equals(entity.getResourceType())) { - throw new ResourceNotFoundException("Resource with ID " + entity.getIdDt().getIdPart() + " exists but it is not of type " + myResourceName + ", found resource of type " - + entity.getResourceType()); + throw new ResourceNotFoundException("Resource with ID " + entity.getIdDt().getIdPart() + " exists but it is not of type " + myResourceName + ", found resource of type " + entity.getResourceType()); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java index 639e81b49be..ba5bb94376d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java @@ -20,229 +20,516 @@ package ca.uhn.fhir.jpa.dao; * #L% */ +import static org.apache.commons.lang3.StringUtils.*; + +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.dstu2.resource.Bundle; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; +import ca.uhn.fhir.model.dstu2.resource.Bundle.EntryTransactionResponse; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; +import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; +import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.rest.server.IBundleProvider; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.util.FhirTerser; public class FhirSystemDaoDstu2 extends BaseFhirSystemDao { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2.class); + private UrlParts parseUrl(String theAction, String theUrl) { + UrlParts retVal = new UrlParts(); + + //@formatter:off + /* + * We assume that the URL passed in is in one of the following forms: + * [Resource Type]?[Search Params] + * [Resource Type]/[Resource ID] + * [Resource Type]/[Resource ID]/_history/[Version ID] + */ + //@formatter:on + int nextStart = 0; + boolean nextIsHistory = false; + + for (int idx = 0; idx < theUrl.length(); idx++) { + char nextChar = theUrl.charAt(idx); + boolean atEnd = (idx + 1) == theUrl.length(); + if (nextChar == '?' || nextChar == '/' || atEnd) { + int endIdx = atEnd ? idx + 1 : idx; + String nextSubstring = theUrl.substring(nextStart, endIdx); + if (retVal.getResourceType() == null) { + retVal.setResourceType(nextSubstring); + } else if (retVal.getResourceId() == null) { + retVal.setResourceId(nextSubstring); + } else if (nextIsHistory) { + retVal.setVersionId(nextSubstring); + } else { + if (nextSubstring.equals(Constants.URL_TOKEN_HISTORY)) { + nextIsHistory = true; + } else { + String msg = getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionInvalidUrl", theAction, theUrl); + throw new InvalidRequestException(msg); + } + } + if (nextChar == '?') { + if (theUrl.length() > idx + 1) { + retVal.setParams(theUrl.substring(idx + 1, theUrl.length())); + } + break; + } + nextStart = idx + 1; + } + } + + RuntimeResourceDefinition resType = getContext().getResourceDefinition(retVal.getResourceType()); + IFhirResourceDao dao = null; + if (resType != null) { + dao = getDao(resType.getImplementingClass()); + } + if (dao == null) { + String msg = getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionInvalidUrl", theAction, theUrl); + throw new InvalidRequestException(msg); + } + retVal.setDao(dao); + + if (retVal.getResourceId() == null && retVal.getParams() == null) { + String msg = getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionInvalidUrl", theAction, theUrl); + throw new InvalidRequestException(msg); + } + + return retVal; + } + + @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRED) @Override public Bundle transaction(Bundle theResources) { ourLog.info("Beginning transaction with {} resources", theResources.getEntry().size()); long start = System.currentTimeMillis(); -// Set allIds = new HashSet(); -// -// for (int i = 0; i < theResources.size(); i++) { -// IResource res = theResources.get(i); -// if (res.getId().hasIdPart() && !res.getId().hasResourceType()) { -// res.setId(new IdDt(toResourceName(res.getClass()), res.getId().getIdPart())); -// } -// -// /* -// * Ensure that the bundle doesn't have any duplicates, since this causes all kinds of weirdness -// */ -// if (res.getId().hasResourceType() && res.getId().hasIdPart()) { -// IdDt nextId = res.getId().toUnqualifiedVersionless(); -// if (!allIds.add(nextId)) { -// throw new InvalidRequestException("Transaction bundle contains multiple resources with ID: " + nextId); -// } -// } -// } -// -// FhirTerser terser = getContext().newTerser(); -// -// int creations = 0; -// int updates = 0; -// -// Map idConversions = new HashMap(); -// -// List persistedResources = new ArrayList(); -// -// List retVal = new ArrayList(); -// OperationOutcome oo = new OperationOutcome(); -// retVal.add(oo); -// -// for (int resourceIdx = 0; resourceIdx < theResources.size(); resourceIdx++) { -// IResource nextResource = theResources.get(resourceIdx); -// -// IdDt nextId = nextResource.getId(); -// if (nextId == null) { -// nextId = new IdDt(); -// } -// -// String resourceName = toResourceName(nextResource); -// BundleEntryTransactionOperationEnum nextResouceOperationIn = ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(nextResource); -// if (nextResouceOperationIn == null && hasValue(ResourceMetadataKeyEnum.DELETED_AT.get(nextResource))) { -// nextResouceOperationIn = BundleEntryTransactionOperationEnum.DELETE; -// } -// -// String matchUrl = ResourceMetadataKeyEnum.LINK_SEARCH.get(nextResource); -// Set candidateMatches = null; -// if (StringUtils.isNotBlank(matchUrl)) { -// candidateMatches = processMatchUrl(matchUrl, nextResource.getClass()); -// } -// -// ResourceTable entity; -// if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.CREATE) { -// entity = null; -// } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.UPDATE || nextResouceOperationIn == BundleEntryTransactionOperationEnum.DELETE) { -// if (candidateMatches == null || candidateMatches.size() == 0) { -// if (nextId == null || StringUtils.isBlank(nextId.getIdPart())) { -// throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, "transactionOperationFailedNoId", nextResouceOperationIn.name())); -// } -// entity = tryToLoadEntity(nextId); -// if (entity == null) { -// if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.UPDATE) { -// ourLog.debug("Attempting to UPDATE resource with unknown ID '{}', will CREATE instead", nextId); -// } else if (candidateMatches == null) { -// throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, "transactionOperationFailedUnknownId", nextResouceOperationIn.name(), nextId)); -// } else { -// ourLog.debug("Resource with match URL [{}] already exists, will be NOOP", matchUrl); -// ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(nextResource, BundleEntryTransactionOperationEnum.NOOP); -// persistedResources.add(null); -// retVal.add(nextResource); -// continue; -// } -// } -// } else if (candidateMatches.size() == 1) { -// entity = loadFirstEntityFromCandidateMatches(candidateMatches); -// } else { -// throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, "transactionOperationWithMultipleMatchFailure", nextResouceOperationIn.name(), matchUrl, candidateMatches.size())); -// } -// } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.NOOP) { -// throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, "incomingNoopInTransaction")); -// } else if (nextId.isEmpty()) { -// entity = null; -// } else { -// entity = tryToLoadEntity(nextId); -// } -// -// BundleEntryTransactionOperationEnum nextResouceOperationOut; -// if (entity == null) { -// nextResouceOperationOut = BundleEntryTransactionOperationEnum.CREATE; -// entity = toEntity(nextResource); -// if (nextId.isEmpty() == false && nextId.getIdPart().startsWith("cid:")) { -// ourLog.debug("Resource in transaction has ID[{}], will replace with server assigned ID", nextId.getIdPart()); -// } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.CREATE) { -// if (nextId.isEmpty() == false) { -// ourLog.debug("Resource in transaction has ID[{}] but is marked for CREATE, will ignore ID", nextId.getIdPart()); -// } -// if (candidateMatches != null) { -// if (candidateMatches.size() == 1) { -// ourLog.debug("Resource with match URL [{}] already exists, will be NOOP", matchUrl); -// BaseHasResource existingEntity = loadFirstEntityFromCandidateMatches(candidateMatches); -// IResource existing = (IResource) toResource(existingEntity); -// ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(existing, BundleEntryTransactionOperationEnum.NOOP); -// persistedResources.add(null); -// retVal.add(existing); -// continue; -// } -// if (candidateMatches.size() > 1) { -// throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, "transactionOperationWithMultipleMatchFailure", BundleEntryTransactionOperationEnum.CREATE.name(), matchUrl, candidateMatches.size())); -// } -// } -// } else { -// createForcedIdIfNeeded(entity, nextId); -// } -// myEntityManager.persist(entity); -// if (entity.getForcedId() != null) { -// myEntityManager.persist(entity.getForcedId()); -// } -// creations++; -// ourLog.info("Resource Type[{}] with ID[{}] does not exist, creating it", resourceName, nextId); -// } else { -// nextResouceOperationOut = nextResouceOperationIn; -// if (nextResouceOperationOut == null) { -// nextResouceOperationOut = BundleEntryTransactionOperationEnum.UPDATE; -// } -// updates++; -// ourLog.info("Resource Type[{}] with ID[{}] exists, updating it", resourceName, nextId); -// } -// -// persistedResources.add(entity); -// retVal.add(nextResource); -// ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(nextResource, nextResouceOperationOut); -// } -// -// ourLog.info("Flushing transaction to database"); -// myEntityManager.flush(); -// -// for (int i = 0; i < persistedResources.size(); i++) { -// ResourceTable entity = persistedResources.get(i); -// -// String resourceName = toResourceName(theResources.get(i)); -// IdDt nextId = theResources.get(i).getId(); -// -// IdDt newId; -// -// if (entity == null) { -// newId = retVal.get(i + 1).getId().toUnqualifiedVersionless(); -// } else { -// newId = entity.getIdDt().toUnqualifiedVersionless(); -// } -// -// if (nextId == null || nextId.isEmpty()) { -// ourLog.info("Transaction resource (with no preexisting ID) has been assigned new ID[{}]", nextId, newId); -// } else { -// if (nextId.toUnqualifiedVersionless().equals(newId)) { -// ourLog.info("Transaction resource ID[{}] is being updated", newId); -// } else { -// if (!nextId.getIdPart().startsWith("#")) { -// nextId = new IdDt(resourceName + '/' + nextId.getIdPart()); -// ourLog.info("Transaction resource ID[{}] has been assigned new ID[{}]", nextId, newId); -// idConversions.put(nextId, newId); -// } -// } -// } -// -// } -// -// for (IResource nextResource : theResources) { -// List allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class); -// for (BaseResourceReferenceDt nextRef : allRefs) { -// IdDt nextId = nextRef.getReference(); -// if (idConversions.containsKey(nextId)) { -// IdDt newId = idConversions.get(nextId); -// ourLog.info(" * Replacing resource ref {} with {}", nextId, newId); -// nextRef.setReference(newId); -// } else { -// ourLog.debug(" * Reference [{}] does not exist in bundle", nextId); -// } -// } -// } -// -// ourLog.info("Re-flushing updated resource references and extracting search criteria"); -// -// for (int i = 0; i < theResources.size(); i++) { -// IResource resource = theResources.get(i); -// ResourceTable table = persistedResources.get(i); -// if (table == null) { -// continue; -// } -// -// InstantDt deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get(resource); -// Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null; -// if (deletedInstantOrNull == null && ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(resource) == BundleEntryTransactionOperationEnum.DELETE) { -// deletedTimestampOrNull = new Date(); -// ResourceMetadataKeyEnum.DELETED_AT.put(resource, new InstantDt(deletedTimestampOrNull)); -// } -// -// updateEntity(resource, table, table.getId() != null, deletedTimestampOrNull); -// } -// -// long delay = System.currentTimeMillis() - start; -// ourLog.info("Transaction completed in {}ms with {} creations and {} updates", new Object[] { delay, creations, updates }); -// -// oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDetails("Transaction completed in " + delay + "ms with " + creations + " creations and " + updates + " updates"); -// -// notifyWriteCompleted(); + Set allIds = new HashSet(); + Map idSubstitutions = new HashMap(); + Map idToPersistedOutcome = new HashMap(); - return null; + Bundle response = new Bundle(); + OperationOutcome oo = new OperationOutcome(); + response.addEntry().setResource(oo); + + for (int i = 0; i < theResources.getEntry().size(); i++) { + Entry nextEntry = theResources.getEntry().get(i); + IResource res = nextEntry.getResource(); + IdDt nextResourceId = null; + if (res != null) { + + nextResourceId = res.getId(); + if (nextResourceId.hasIdPart() && !nextResourceId.hasResourceType()) { + nextResourceId = new IdDt(toResourceName(res.getClass()), nextResourceId.getIdPart()); + res.setId(nextResourceId); + } + + /* + * Ensure that the bundle doesn't have any duplicates, since this causes all kinds of weirdness + */ + if (nextResourceId.hasResourceType() && nextResourceId.hasIdPart()) { + IdDt nextId = nextResourceId.toUnqualifiedVersionless(); + if (!allIds.add(nextId)) { + throw new InvalidRequestException(getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionContainsMultipleWithDuplicateId", nextId)); + } + } + + } + + HTTPVerbEnum verb = nextEntry.getTransaction().getMethodElement().getValueAsEnum(); + if (verb == null) { + throw new InvalidRequestException(getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionEntryHasInvalidVerb", nextEntry.getTransaction().getMethod())); + } + + switch (verb) { + case POST: { + // CREATE + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = getDao(res.getClass()); + res.setId(null); + DaoMethodOutcome outcome; + Entry newEntry = response.addEntry(); + outcome = resourceDao.create(res, nextEntry.getTransaction().getIfNoneExist(), false); + handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); + break; + } + case DELETE: { + // DELETE + Entry newEntry = response.addEntry(); + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + UrlParts parts = parseUrl(verb.getCode(), url); + if (parts.getResourceId() != null) { + parts.getDao().delete(new IdDt(parts.getResourceType(), parts.getResourceId())); + } else { + parts.getDao().deleteByUrl(parts.getResourceType() + '?' + parts.getParams()); + } + + newEntry.getTransactionResponse().setStatus(Integer.toString(Constants.STATUS_HTTP_204_NO_CONTENT)); + break; + } + case PUT: { + // UPDATE + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = getDao(res.getClass()); + + DaoMethodOutcome outcome; + Entry newEntry = response.addEntry(); + + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + + UrlParts parts = parseUrl(verb.getCode(), url); + if (parts.getResourceId() != null) { + res.setId(new IdDt(parts.getResourceType(), parts.getResourceId())); + outcome = resourceDao.update(res, null, false); + } else { + res.setId(null); + outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false); + } + + handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); + break; + } + case GET: { + // SEARCH/READ/VREAD + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + UrlParts parts = parseUrl(verb.getCode(), url); + + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = parts.getDao(); + + if (parts.getResourceId() != null && parts.getParams() == null) { + IResource found; + if (parts.getVersionId() != null) { + found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId(), parts.getVersionId())); + } else { + found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId())); + } + EntryTransactionResponse resp = response.addEntry().setResource(found).getTransactionResponse(); + resp.setLocation(found.getId().toUnqualified().getValue()); + resp.addEtag(found.getId().getVersionIdPart()); + } else if (parts.getParams() != null) { + RuntimeResourceDefinition def = getContext().getResourceDefinition(parts.getDao().getResourceType()); + SearchParameterMap params = translateMatchUrl(url, def); + IBundleProvider bundle = parts.getDao().search(params); + + Bundle searchBundle = new Bundle(); + searchBundle.setTotal(bundle.size()); + + int configuredMax = 100; // this should probably be configurable or something + if (bundle.size() > configuredMax) { + oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Search nested within transaction found more than " + configuredMax + " matches, but paging is not supported in nested transactions"); + } + List resourcesToAdd = bundle.getResources(0, Math.min(bundle.size(), configuredMax)); + for (IResource next : resourcesToAdd) { + searchBundle.addEntry().setResource(next); + } + + response.addEntry().setResource(searchBundle); + } + } + } + + } + + FhirTerser terser = getContext().newTerser(); + + // int creations = 0; + // int updates = 0; + // + // Map idConversions = new HashMap(); + // + // List persistedResources = new ArrayList(); + // + // List retVal = new ArrayList(); + // OperationOutcome oo = new OperationOutcome(); + // retVal.add(oo); + // + // for (int resourceIdx = 0; resourceIdx < theResources.size(); resourceIdx++) { + // IResource nextResource = theResources.get(resourceIdx); + // + // IdDt nextId = nextResource.getId(); + // if (nextId == null) { + // nextId = new IdDt(); + // } + // + // String resourceName = toResourceName(nextResource); + // BundleEntryTransactionOperationEnum nextResouceOperationIn = + // ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(nextResource); + // if (nextResouceOperationIn == null && hasValue(ResourceMetadataKeyEnum.DELETED_AT.get(nextResource))) { + // nextResouceOperationIn = BundleEntryTransactionOperationEnum.DELETE; + // } + // + // String matchUrl = ResourceMetadataKeyEnum.LINK_SEARCH.get(nextResource); + // Set candidateMatches = null; + // if (StringUtils.isNotBlank(matchUrl)) { + // candidateMatches = processMatchUrl(matchUrl, nextResource.getClass()); + // } + // + // ResourceTable entity; + // if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.CREATE) { + // entity = null; + // } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.UPDATE || nextResouceOperationIn == + // BundleEntryTransactionOperationEnum.DELETE) { + // if (candidateMatches == null || candidateMatches.size() == 0) { + // if (nextId == null || StringUtils.isBlank(nextId.getIdPart())) { + // throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, + // "transactionOperationFailedNoId", nextResouceOperationIn.name())); + // } + // entity = tryToLoadEntity(nextId); + // if (entity == null) { + // if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.UPDATE) { + // ourLog.debug("Attempting to UPDATE resource with unknown ID '{}', will CREATE instead", nextId); + // } else if (candidateMatches == null) { + // throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, + // "transactionOperationFailedUnknownId", nextResouceOperationIn.name(), nextId)); + // } else { + // ourLog.debug("Resource with match URL [{}] already exists, will be NOOP", matchUrl); + // ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(nextResource, + // BundleEntryTransactionOperationEnum.NOOP); + // persistedResources.add(null); + // retVal.add(nextResource); + // continue; + // } + // } + // } else if (candidateMatches.size() == 1) { + // entity = loadFirstEntityFromCandidateMatches(candidateMatches); + // } else { + // throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, + // "transactionOperationWithMultipleMatchFailure", nextResouceOperationIn.name(), matchUrl, + // candidateMatches.size())); + // } + // } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.NOOP) { + // throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, + // "incomingNoopInTransaction")); + // } else if (nextId.isEmpty()) { + // entity = null; + // } else { + // entity = tryToLoadEntity(nextId); + // } + // + // BundleEntryTransactionOperationEnum nextResouceOperationOut; + // if (entity == null) { + // nextResouceOperationOut = BundleEntryTransactionOperationEnum.CREATE; + // entity = toEntity(nextResource); + // if (nextId.isEmpty() == false && nextId.getIdPart().startsWith("cid:")) { + // ourLog.debug("Resource in transaction has ID[{}], will replace with server assigned ID", nextId.getIdPart()); + // } else if (nextResouceOperationIn == BundleEntryTransactionOperationEnum.CREATE) { + // if (nextId.isEmpty() == false) { + // ourLog.debug("Resource in transaction has ID[{}] but is marked for CREATE, will ignore ID", + // nextId.getIdPart()); + // } + // if (candidateMatches != null) { + // if (candidateMatches.size() == 1) { + // ourLog.debug("Resource with match URL [{}] already exists, will be NOOP", matchUrl); + // BaseHasResource existingEntity = loadFirstEntityFromCandidateMatches(candidateMatches); + // IResource existing = (IResource) toResource(existingEntity); + // ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(existing, BundleEntryTransactionOperationEnum.NOOP); + // persistedResources.add(null); + // retVal.add(existing); + // continue; + // } + // if (candidateMatches.size() > 1) { + // throw new InvalidRequestException(getContext().getLocalizer().getMessage(FhirSystemDaoDstu2.class, + // "transactionOperationWithMultipleMatchFailure", BundleEntryTransactionOperationEnum.CREATE.name(), matchUrl, + // candidateMatches.size())); + // } + // } + // } else { + // createForcedIdIfNeeded(entity, nextId); + // } + // myEntityManager.persist(entity); + // if (entity.getForcedId() != null) { + // myEntityManager.persist(entity.getForcedId()); + // } + // creations++; + // ourLog.info("Resource Type[{}] with ID[{}] does not exist, creating it", resourceName, nextId); + // } else { + // nextResouceOperationOut = nextResouceOperationIn; + // if (nextResouceOperationOut == null) { + // nextResouceOperationOut = BundleEntryTransactionOperationEnum.UPDATE; + // } + // updates++; + // ourLog.info("Resource Type[{}] with ID[{}] exists, updating it", resourceName, nextId); + // } + // + // persistedResources.add(entity); + // retVal.add(nextResource); + // ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(nextResource, nextResouceOperationOut); + // } + // + // ourLog.info("Flushing transaction to database"); + // myEntityManager.flush(); + // + // for (int i = 0; i < persistedResources.size(); i++) { + // ResourceTable entity = persistedResources.get(i); + // + // String resourceName = toResourceName(theResources.get(i)); + // IdDt nextId = theResources.get(i).getId(); + // + // IdDt newId; + // + // if (entity == null) { + // newId = retVal.get(i + 1).getId().toUnqualifiedVersionless(); + // } else { + // newId = entity.getIdDt().toUnqualifiedVersionless(); + // } + // + // if (nextId == null || nextId.isEmpty()) { + // ourLog.info("Transaction resource (with no preexisting ID) has been assigned new ID[{}]", nextId, newId); + // } else { + // if (nextId.toUnqualifiedVersionless().equals(newId)) { + // ourLog.info("Transaction resource ID[{}] is being updated", newId); + // } else { + // if (!nextId.getIdPart().startsWith("#")) { + // nextId = new IdDt(resourceName + '/' + nextId.getIdPart()); + // ourLog.info("Transaction resource ID[{}] has been assigned new ID[{}]", nextId, newId); + // idConversions.put(nextId, newId); + // } + // } + // } + // + // } + // + for (DaoMethodOutcome nextOutcome : idToPersistedOutcome.values()) { + IResource nextResource = nextOutcome.getResource(); + if (nextResource == null) { + continue; + } + + List allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class); + for (BaseResourceReferenceDt nextRef : allRefs) { + IdDt nextId = nextRef.getReference(); + if (idSubstitutions.containsKey(nextId)) { + IdDt newId = idSubstitutions.get(nextId); + ourLog.info(" * Replacing resource ref {} with {}", nextId, newId); + nextRef.setReference(newId); + } else { + ourLog.debug(" * Reference [{}] does not exist in bundle", nextId); + } + } + + InstantDt deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get(nextResource); + Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null; + updateEntity(nextResource, nextOutcome.getEntity(), false, deletedTimestampOrNull, true, false); + } + // + // ourLog.info("Re-flushing updated resource references and extracting search criteria"); + // + // for (int i = 0; i < theResources.size(); i++) { + // IResource resource = theResources.get(i); + // ResourceTable table = persistedResources.get(i); + // if (table == null) { + // continue; + // } + // + // InstantDt deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get(resource); + // Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null; + // if (deletedInstantOrNull == null && ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(resource) == + // BundleEntryTransactionOperationEnum.DELETE) { + // deletedTimestampOrNull = new Date(); + // ResourceMetadataKeyEnum.DELETED_AT.put(resource, new InstantDt(deletedTimestampOrNull)); + // } + // + // updateEntity(resource, table, table.getId() != null, deletedTimestampOrNull); + // } + + long delay = System.currentTimeMillis() - start; + ourLog.info("Transaction completed in {}ms", new Object[] { delay }); + + oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDetails("Transaction completed in " + delay + "ms"); + + notifyWriteCompleted(); + + return response; } + private void handleTransactionCreateOrUpdateOutcome(Map idSubstitutions, Map idToPersistedOutcome, IdDt nextResourceId, DaoMethodOutcome outcome, Entry newEntry) { + IdDt newId = outcome.getId().toUnqualifiedVersionless(); + if (newId.equals(nextResourceId) == false) { + idSubstitutions.put(nextResourceId, newId); + } + idToPersistedOutcome.put(newId, outcome); + if (outcome.getCreated().booleanValue()) { + newEntry.getTransactionResponse().setStatus(Long.toString(Constants.STATUS_HTTP_201_CREATED)); + } else { + newEntry.getTransactionResponse().setStatus(Long.toString(Constants.STATUS_HTTP_200_OK)); + } + newEntry.getTransactionResponse().setLocation(outcome.getId().toUnqualified().getValue()); + newEntry.getTransactionResponse().addEtag().setValue(outcome.getId().getVersionIdPart()); + } + + private String extractTransactionUrlOrThrowException(Entry nextEntry, HTTPVerbEnum verb) { + String url = nextEntry.getTransaction().getUrl(); + if (isBlank(url)) { + throw new InvalidRequestException(getContext().getLocalizer().getMessage(BaseFhirSystemDao.class, "transactionMissingUrl", verb.name())); + } + return url; + } + + private static class UrlParts { + private IFhirResourceDao myDao; + private String myParams; + private String myResourceId; + private String myResourceType; + private String myVersionId; + + public IFhirResourceDao getDao() { + return myDao; + } + + public void setVersionId(String theVersionId) { + myVersionId = theVersionId; + } + + public String getVersionId() { + return myVersionId; + } + + public String getParams() { + return myParams; + } + + public String getResourceId() { + return myResourceId; + } + + public String getResourceType() { + return myResourceType; + } + + public void setDao(IFhirResourceDao theDao) { + myDao = theDao; + } + + public void setParams(String theParams) { + myParams = theParams; + } + + public void setResourceId(String theResourceId) { + myResourceId = theResourceId; + } + + public void setResourceType(String theResourceType) { + myResourceType = theResourceType; + } + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java index 0e8c3de52dd..e5ac694c129 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java @@ -29,7 +29,6 @@ import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; @@ -37,9 +36,20 @@ public interface IFhirResourceDao extends IDao { void addTag(IdDt theId, String theScheme, String theTerm, String theLabel); - MethodOutcome create(T theResource); + DaoMethodOutcome create(T theResource); - MethodOutcome delete(IdDt theResource); + DaoMethodOutcome create(T theResource, String theIfNoneExist); + + /** + * @param thePerformIndexing + * Use with caution! If you set this to false, you need to manually perform indexing or your resources + * won't be indexed and searches won't work. + */ + DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing); + + DaoMethodOutcome delete(IdDt theResource); + + DaoMethodOutcome deleteByUrl(String theString); TagList getAllResourceTags(); @@ -49,20 +59,28 @@ public interface IFhirResourceDao extends IDao { IBundleProvider history(Date theSince); - IBundleProvider history(IdDt theId,Date theSince); + IBundleProvider history(IdDt theId, Date theSince); IBundleProvider history(Long theId, Date theSince); - + /** * * @param theId * @return - * @throws ResourceNotFoundException If the ID is not known to the server + * @throws ResourceNotFoundException + * If the ID is not known to the server */ T read(IdDt theId); BaseHasResource readEntity(IdDt theId); + /** + * @param theCheckForForcedId + * If true, this method should fail if the requested ID contains a numeric PID which exists, but is + * obscured by a "forced ID" so should not exist as far as the outside world is concerned. + */ + BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId); + void removeTag(IdDt theId, String theScheme, String theTerm); IBundleProvider search(Map theParams); @@ -75,15 +93,17 @@ public interface IFhirResourceDao extends IDao { Set searchForIds(String theParameterName, IQueryParameterType theValue); - MethodOutcome update(T theResource, IdDt theId); - Set searchForIdsWithAndOr(SearchParameterMap theParams); + DaoMethodOutcome update(T theResource); + + DaoMethodOutcome update(T theResource, String theMatchUrl); + /** - * @param theCheckForForcedId If true, this method should fail if the requested ID contains - * a numeric PID which exists, but is obscured by a "forced ID" so should not exist as - * far as the outside world is concerned. + * @param thePerformIndexing + * Use with caution! If you set this to false, you need to manually perform indexing or your resources + * won't be indexed and searches won't work. */ - BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId); - + DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing); + } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java index ac32be24ccd..b459b0c1ca9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java @@ -32,9 +32,15 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.UniqueConstraint; +//@formatter:off @Entity() -@Table(name = "HFJ_FORCED_ID", uniqueConstraints = { @UniqueConstraint(name = "IDX_FORCEDID", columnNames = { "FORCED_ID" }) }) -@NamedQueries(@NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID")) +@Table(name = "HFJ_FORCED_ID", uniqueConstraints = { + @UniqueConstraint(name = "IDX_FORCEDID", columnNames = { "FORCED_ID" }) +}) +@NamedQueries(value= { + @NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID") +}) +//@formatter:on public class ForcedId { public static final int MAX_FORCED_ID_LENGTH = 100; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java index 963adc166c5..802470045d5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java @@ -27,6 +27,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.dao.IFhirSystemDao; +import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.dstu.resource.Conformance.Rest; import ca.uhn.fhir.model.dstu.resource.Conformance.RestResource; @@ -44,11 +45,11 @@ import javax.servlet.http.HttpServletRequest; public class JpaConformanceProviderDstu1 extends ServerConformanceProvider { private String myImplementationDescription; - private IFhirSystemDao mySystemDao; + private IFhirSystemDao> mySystemDao; private volatile Conformance myCachedValue; private RestfulServer myRestfulServer; - public JpaConformanceProviderDstu1(RestfulServer theRestfulServer, IFhirSystemDao theSystemDao) { + public JpaConformanceProviderDstu1(RestfulServer theRestfulServer, IFhirSystemDao> theSystemDao) { super(theRestfulServer); myRestfulServer = theRestfulServer; mySystemDao = theSystemDao; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java index 015e32fa1f2..318bb8e52a1 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java @@ -29,6 +29,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.dao.IFhirSystemDao; +import ca.uhn.fhir.model.dstu2.resource.Bundle; import ca.uhn.fhir.model.dstu2.resource.Conformance; import ca.uhn.fhir.model.dstu2.resource.Conformance.Rest; import ca.uhn.fhir.model.dstu2.resource.Conformance.RestResource; @@ -44,11 +45,11 @@ import ca.uhn.fhir.util.ExtensionConstants; public class JpaConformanceProviderDstu2 extends ServerConformanceProvider { private String myImplementationDescription; - private IFhirSystemDao mySystemDao; + private IFhirSystemDao mySystemDao; private volatile Conformance myCachedValue; private RestfulServer myRestfulServer; - public JpaConformanceProviderDstu2(RestfulServer theRestfulServer, IFhirSystemDao theSystemDao) { + public JpaConformanceProviderDstu2(RestfulServer theRestfulServer, IFhirSystemDao theSystemDao) { super(theRestfulServer); myRestfulServer = theRestfulServer; mySystemDao = theSystemDao; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProvider.java index b05fbe569cd..c9d91e27e10 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaResourceProvider.java @@ -162,13 +162,12 @@ public class JpaResourceProvider extends BaseJpaProvider im public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam T theResource, @IdParam IdDt theId) { startRequest(theRequest); try { - return myDao.update(theResource, theId); + theResource.setId(theId); + return myDao.update(theResource); } catch (ResourceNotFoundException e) { ourLog.info("Can't update resource with ID[" + theId.getValue() + "] because it doesn't exist, going to create it instead"); theResource.setId(theId); - MethodOutcome retVal = myDao.create(theResource); - retVal.setCreated(true); - return retVal; + return myDao.create(theResource); } finally { endRequest(theRequest); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java index a8c96cad46c..f16b60020fc 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java @@ -1,17 +1,7 @@ package ca.uhn.fhir.jpa.dao; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.endsWith; -import static org.hamcrest.Matchers.greaterThan; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.Date; @@ -40,6 +30,7 @@ import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; import ca.uhn.fhir.model.dstu2.composite.PeriodDt; import ca.uhn.fhir.model.dstu2.composite.QuantityDt; import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu2.resource.Bundle; import ca.uhn.fhir.model.dstu2.resource.Device; import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport; import ca.uhn.fhir.model.dstu2.resource.Encounter; @@ -47,7 +38,9 @@ import ca.uhn.fhir.model.dstu2.resource.Location; import ca.uhn.fhir.model.dstu2.resource.Observation; import ca.uhn.fhir.model.dstu2.resource.Organization; import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; +import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum; import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; @@ -65,8 +58,10 @@ import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.param.TokenOrListParam; import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; @@ -84,6 +79,150 @@ public class FhirResourceDaoTest { private static IFhirResourceDao ourOrganizationDao; private static IFhirResourceDao ourPatientDao; + @Test + public void testCreateDuplicateIdFails() { + String methodName = "testCreateDuplocateIdFailsText"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + try { + ourPatientDao.create(p); + fail(); + } catch (UnprocessableEntityException e) { + assertThat(e.getMessage(), containsString("Can not create entity with ID[" + methodName + "], a resource with this ID already exists")); + } + } + + @Test + public void testUpdateByUrl() { + String methodName = "testUpdateByUrl"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + + ourPatientDao.update(p, "Patient?identifier=urn%3Asystem%7C" + methodName); + + p = ourPatientDao.read(id.toVersionless()); + assertThat(p.getId().toVersionless().toString(), not(containsString("test"))); + assertEquals(id.toVersionless(), p.getId().toVersionless()); + assertNotEquals(id, p.getId()); + assertThat(p.getId().toString(), endsWith("/_history/2")); + + } + + + @Test + public void testCreateNumericIdFails() { + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue("testCreateNumericIdFails"); + p.addName().addFamily("Hello"); + p.setId("Patient/123"); + try { + ourPatientDao.create(p); + fail(); + } catch (InvalidRequestException e) { + assertThat(e.getMessage(), containsString("Can not create entity with ID[123], this server does not allow clients to assign numeric IDs")); + } + } + + + @Test + public void testDeleteWithMatchUrl() { + String methodName = "testDeleteWithMatchUrl"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + ourPatientDao.deleteByUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + try { + ourPatientDao.read(id.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // ok + } + + try { + ourPatientDao.read(new IdDt("Patient/" + methodName)); + fail(); + } catch (ResourceNotFoundException e) { + // ok + } + + IBundleProvider history = ourPatientDao.history(id, null); + assertEquals(2, history.size()); + + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0))); + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue()); + assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1,1).get(0))); + + } + + + @Test + public void testCreateWithIfNoneExist() { + String methodName = "testCreateWithIfNoneExist"; + MethodOutcome results; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + results = ourPatientDao.create(p, "Patient?identifier=urn%3Asystem%7C" + methodName); + assertEquals(id.getIdPart(), results.getId().getIdPart()); + assertFalse(results.getCreated().booleanValue()); + + // Now create a second one + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName + "DOESNTEXIST"); + results = ourPatientDao.create(p, "Patient?identifier=urn%3Asystem%7C" + methodName + "DOESNTEXIST"); + assertNotEquals(id.getIdPart(), results.getId().getIdPart()); + assertTrue(results.getCreated().booleanValue()); + + // Now try to create one with the original match URL and it should fail + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + try { + ourPatientDao.create(p, "Patient?identifier=urn%3Asystem%7C" + methodName); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), containsString("Failed to CREATE")); + } + + } + @Test public void testChoiceParamConcept() { Observation o1 = new Observation(); @@ -216,7 +355,7 @@ public class FhirResourceDaoTest { public void testDatePeriodParamStartAndEnd() { { Encounter enc = new Encounter(); - enc.addIdentifier().setSystem("testDatePeriodParam").setValue( "03"); + enc.addIdentifier().setSystem("testDatePeriodParam").setValue("03"); enc.getPeriod().getStartElement().setValueAsString("2001-01-02"); enc.getPeriod().getEndElement().setValueAsString("2001-01-03"); ourEncounterDao.create(enc); @@ -329,7 +468,7 @@ public class FhirResourceDaoTest { { Patient patient = ourPatientDao.read(id2); patient.addIdentifier().setSystem("ZZZZZZZ").setValue("ZZZZZZZZZ"); - id2b = ourPatientDao.update(patient, id2).getId(); + id2b = ourPatientDao.update(patient).getId(); } ourLog.info("ID1:{} ID2:{} ID2b:{}", new Object[] { id1, id2, id2b }); @@ -373,7 +512,7 @@ public class FhirResourceDaoTest { @Test public void testIdParam() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("Tester").addGiven("Joe"); MethodOutcome outcome = ourPatientDao.create(patient); @@ -484,11 +623,11 @@ public class FhirResourceDaoTest { @Test public void testPersistResourceLink() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "testPersistResourceLink01"); + patient.addIdentifier().setSystem("urn:system").setValue("testPersistResourceLink01"); IdDt patientId01 = ourPatientDao.create(patient).getId(); Patient patient02 = new Patient(); - patient02.addIdentifier().setSystem("urn:system").setValue( "testPersistResourceLink02"); + patient02.addIdentifier().setSystem("urn:system").setValue("testPersistResourceLink02"); IdDt patientId02 = ourPatientDao.create(patient02).getId(); Observation obs01 = new Observation(); @@ -524,7 +663,7 @@ public class FhirResourceDaoTest { @Test public void testPersistSearchParamDate() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.setBirthDate(new DateDt("2001-01-01")); ourPatientDao.create(patient); @@ -576,7 +715,7 @@ public class FhirResourceDaoTest { @Test public void testPersistSearchParams() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001testPersistSearchParams"); + patient.addIdentifier().setSystem("urn:system").setValue("001testPersistSearchParams"); patient.getGenderElement().setValueAsEnum(AdministrativeGenderEnum.MALE); patient.addName().addFamily("Tester").addGiven("JoetestPersistSearchParams"); @@ -641,20 +780,20 @@ public class FhirResourceDaoTest { assertTrue(patients.size() >= 2); } - @Test public void testHistoryByForcedId() { IdDt idv1; IdDt idv2; { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "testHistoryByForcedId"); + patient.addIdentifier().setSystem("urn:system").setValue("testHistoryByForcedId"); patient.addName().addFamily("Tester").addGiven("testHistoryByForcedId"); patient.setId("Patient/testHistoryByForcedId"); idv1 = ourPatientDao.create(patient).getId(); patient.addName().addFamily("Tester").addGiven("testHistoryByForcedIdName2"); - idv2 = ourPatientDao.update(patient, idv1.toUnqualifiedVersionless()).getId(); + patient.setId(patient.getId().toUnqualifiedVersionless()); + idv2 = ourPatientDao.update(patient).getId(); } List patients = toList(ourPatientDao.history(idv1.toVersionless(), null)); @@ -676,7 +815,7 @@ public class FhirResourceDaoTest { IdDt id2; { Organization patient = new Organization(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); id2 = ourOrganizationDao.create(patient).getId(); } @@ -769,14 +908,14 @@ public class FhirResourceDaoTest { IdDt id1; { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("testSearchNameParam01Fam").addGiven("testSearchNameParam01Giv"); ResourceMetadataKeyEnum.TITLE.put(patient, "P1TITLE"); id1 = ourPatientDao.create(patient).getId(); } { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addFamily("testSearchNameParam02Fam").addGiven("testSearchNameParam02Giv"); ourPatientDao.create(patient); } @@ -816,12 +955,12 @@ public class FhirResourceDaoTest { @Test public void testSearchNumberParam() { Encounter e1 = new Encounter(); - e1.addIdentifier().setSystem("foo").setValue( "testSearchNumberParam01"); + e1.addIdentifier().setSystem("foo").setValue("testSearchNumberParam01"); e1.getLength().setSystem(BaseFhirDao.UCUM_NS).setCode("min").setValue(4.0 * 24 * 60); IdDt id1 = ourEncounterDao.create(e1).getId(); Encounter e2 = new Encounter(); - e2.addIdentifier().setSystem("foo").setValue( "testSearchNumberParam02"); + e2.addIdentifier().setSystem("foo").setValue("testSearchNumberParam02"); e2.getLength().setSystem(BaseFhirDao.UCUM_NS).setCode("year").setValue(2.0); IdDt id2 = ourEncounterDao.create(e2).getId(); { @@ -843,13 +982,13 @@ public class FhirResourceDaoTest { @Test public void testSearchResourceLinkWithChain() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithChainXX"); - patient.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithChain01"); + patient.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithChainXX"); + patient.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithChain01"); IdDt patientId01 = ourPatientDao.create(patient).getId(); Patient patient02 = new Patient(); - patient02.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithChainXX"); - patient02.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithChain02"); + patient02.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithChainXX"); + patient02.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithChain02"); IdDt patientId02 = ourPatientDao.create(patient02).getId(); Observation obs01 = new Observation(); @@ -881,7 +1020,7 @@ public class FhirResourceDaoTest { result = toList(ourObservationDao.search(Observation.SP_SUBJECT, new ReferenceParam(Patient.SP_IDENTIFIER, "testSearchResourceLinkWithChainXX"))); assertEquals(2, result.size()); - + result = toList(ourObservationDao.search(Observation.SP_SUBJECT, new ReferenceParam(Patient.SP_IDENTIFIER, "|testSearchResourceLinkWithChainXX"))); assertEquals(0, result.size()); @@ -891,14 +1030,14 @@ public class FhirResourceDaoTest { public void testSearchResourceLinkWithTextLogicalId() { Patient patient = new Patient(); patient.setId("testSearchResourceLinkWithTextLogicalId01"); - patient.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithTextLogicalIdXX"); - patient.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithTextLogicalId01"); + patient.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithTextLogicalIdXX"); + patient.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithTextLogicalId01"); IdDt patientId01 = ourPatientDao.create(patient).getId(); Patient patient02 = new Patient(); patient02.setId("testSearchResourceLinkWithTextLogicalId02"); - patient02.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithTextLogicalIdXX"); - patient02.addIdentifier().setSystem("urn:system").setValue( "testSearchResourceLinkWithTextLogicalId02"); + patient02.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithTextLogicalIdXX"); + patient02.addIdentifier().setSystem("urn:system").setValue("testSearchResourceLinkWithTextLogicalId02"); IdDt patientId02 = ourPatientDao.create(patient02).getId(); Observation obs01 = new Observation(); @@ -981,13 +1120,13 @@ public class FhirResourceDaoTest { public void testSearchStringParam() { { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("Tester_testSearchStringParam").addGiven("Joe"); ourPatientDao.create(patient); } { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addFamily("Tester_testSearchStringParam").addGiven("John"); ourPatientDao.create(patient); } @@ -1009,7 +1148,7 @@ public class FhirResourceDaoTest { { Patient patient = new Patient(); patient.getLanguage().setValue("en_CA"); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("testSearchLanguageParam").addGiven("Joe"); id1 = ourPatientDao.create(patient).getId(); } @@ -1017,7 +1156,7 @@ public class FhirResourceDaoTest { { Patient patient = new Patient(); patient.getLanguage().setValue("en_US"); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addFamily("testSearchLanguageParam").addGiven("John"); id2 = ourPatientDao.create(patient).getId(); } @@ -1048,13 +1187,13 @@ public class FhirResourceDaoTest { public void testSearchStringParamWithNonNormalized() { { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addGiven("testSearchStringParamWithNonNormalized_h\u00F6ra"); ourPatientDao.create(patient); } { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addGiven("testSearchStringParamWithNonNormalized_HORA"); ourPatientDao.create(patient); } @@ -1081,7 +1220,7 @@ public class FhirResourceDaoTest { ourPatientDao.create(patient); patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "testSearchTokenParam002"); + patient.addIdentifier().setSystem("urn:system").setValue("testSearchTokenParam002"); patient.addName().addFamily("Tester").addGiven("testSearchTokenParam2"); ourPatientDao.create(patient); @@ -1147,14 +1286,14 @@ public class FhirResourceDaoTest { IdDt orgId = ourOrganizationDao.create(org).getId(); Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("Tester_testSearchWithIncludes_P1").addGiven("Joe"); patient.getManagingOrganization().setReference(orgId); ourPatientDao.create(patient); } { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addFamily("Tester_testSearchWithIncludes_P2").addGiven("John"); ourPatientDao.create(patient); } @@ -1221,7 +1360,7 @@ public class FhirResourceDaoTest { public void testStoreUtf8Characters() throws Exception { Organization org = new Organization(); org.setName("測試醫院"); - org.addIdentifier().setSystem("urn:system").setValue( "testStoreUtf8Characters_01"); + org.addIdentifier().setSystem("urn:system").setValue("testStoreUtf8Characters_01"); IdDt orgId = ourOrganizationDao.create(org).getId(); Organization returned = ourOrganizationDao.read(orgId); @@ -1244,14 +1383,14 @@ public class FhirResourceDaoTest { assertThat(orgId.getValue(), endsWith("Organization/testSearchWithIncludesThatHaveTextId_id1/_history/1")); Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("Tester_testSearchWithIncludesThatHaveTextId_P1").addGiven("Joe"); patient.getManagingOrganization().setReference(orgId); ourPatientDao.create(patient); } { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "002"); + patient.addIdentifier().setSystem("urn:system").setValue("002"); patient.addName().addFamily("Tester_testSearchWithIncludesThatHaveTextId_P2").addGiven("John"); ourPatientDao.create(patient); } @@ -1290,23 +1429,23 @@ public class FhirResourceDaoTest { @Test public void testSort() { Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue( "testSort001"); + p.addIdentifier().setSystem("urn:system").setValue("testSort001"); p.addName().addFamily("testSortF1").addGiven("testSortG1"); IdDt id1 = ourPatientDao.create(p).getId().toUnqualifiedVersionless(); // Create out of order p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue( "testSort001"); + p.addIdentifier().setSystem("urn:system").setValue("testSort001"); p.addName().addFamily("testSortF3").addGiven("testSortG3"); IdDt id3 = ourPatientDao.create(p).getId().toUnqualifiedVersionless(); p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue( "testSort001"); + p.addIdentifier().setSystem("urn:system").setValue("testSort001"); p.addName().addFamily("testSortF2").addGiven("testSortG2"); IdDt id2 = ourPatientDao.create(p).getId().toUnqualifiedVersionless(); p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue( "testSort001"); + p.addIdentifier().setSystem("urn:system").setValue("testSort001"); IdDt id4 = ourPatientDao.create(p).getId().toUnqualifiedVersionless(); SearchParameterMap pm = new SearchParameterMap(); @@ -1367,7 +1506,7 @@ public class FhirResourceDaoTest { @Test public void testTagsWithCreateAndReadAndSearch() { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "testTagsWithCreateAndReadAndSearch"); + patient.addIdentifier().setSystem("urn:system").setValue("testTagsWithCreateAndReadAndSearch"); patient.addName().addFamily("Tester").addGiven("Joe"); TagList tagList = new TagList(); tagList.addTag(null, "Dog", "Puppies"); @@ -1458,7 +1597,7 @@ public class FhirResourceDaoTest { @Test public void testUpdateAndGetHistoryResource() throws InterruptedException { Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue( "001"); + patient.addIdentifier().setSystem("urn:system").setValue("001"); patient.addName().addFamily("Tester").addGiven("Joe"); MethodOutcome outcome = ourPatientDao.create(patient); @@ -1477,7 +1616,7 @@ public class FhirResourceDaoTest { Thread.sleep(1000); retrieved.getIdentifierFirstRep().setValue("002"); - MethodOutcome outcome2 = ourPatientDao.update(retrieved, outcome.getId()); + MethodOutcome outcome2 = ourPatientDao.update(retrieved); assertEquals(outcome.getId().getIdPart(), outcome2.getId().getIdPart()); assertNotEquals(outcome.getId().getVersionIdPart(), outcome2.getId().getVersionIdPart()); @@ -1521,12 +1660,12 @@ public class FhirResourceDaoTest { @Test public void testUpdateMaintainsSearchParams() throws InterruptedException { Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue( "testUpdateMaintainsSearchParamsAAA"); + p1.addIdentifier().setSystem("urn:system").setValue("testUpdateMaintainsSearchParamsAAA"); p1.addName().addFamily("Tester").addGiven("testUpdateMaintainsSearchParamsAAA"); IdDt p1id = ourPatientDao.create(p1).getId(); Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue( "testUpdateMaintainsSearchParamsBBB"); + p2.addIdentifier().setSystem("urn:system").setValue("testUpdateMaintainsSearchParamsBBB"); p2.addName().addFamily("Tester").addGiven("testUpdateMaintainsSearchParamsBBB"); ourPatientDao.create(p2).getId(); @@ -1536,7 +1675,7 @@ public class FhirResourceDaoTest { // Update the name p1.getNameFirstRep().getGivenFirstRep().setValue("testUpdateMaintainsSearchParamsBBB"); - MethodOutcome update2 = ourPatientDao.update(p1, p1id); + MethodOutcome update2 = ourPatientDao.update(p1); IdDt p1id2 = update2.getId(); ids = ourPatientDao.searchForIds(Patient.SP_GIVEN, new StringDt("testUpdateMaintainsSearchParamsAAA")); @@ -1557,21 +1696,23 @@ public class FhirResourceDaoTest { @Test public void testUpdateRejectsInvalidTypes() throws InterruptedException { Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue( "testUpdateRejectsInvalidTypes"); + p1.addIdentifier().setSystem("urn:system").setValue("testUpdateRejectsInvalidTypes"); p1.addName().addFamily("Tester").addGiven("testUpdateRejectsInvalidTypes"); IdDt p1id = ourPatientDao.create(p1).getId(); Organization p2 = new Organization(); p2.getNameElement().setValue("testUpdateRejectsInvalidTypes"); try { - ourOrganizationDao.update(p2, new IdDt("Organization/" + p1id.getIdPart())); + p2.setId(new IdDt("Organization/" + p1id.getIdPart())); + ourOrganizationDao.update(p2); fail(); } catch (UnprocessableEntityException e) { // good } try { - ourOrganizationDao.update(p2, new IdDt("Patient/" + p1id.getIdPart())); + p2.setId(new IdDt("Patient/" + p1id.getIdPart())); + ourOrganizationDao.update(p2); fail(); } catch (UnprocessableEntityException e) { // good @@ -1589,7 +1730,7 @@ public class FhirResourceDaoTest { assertEquals("ABABA", p1id.getIdPart()); Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue( "testUpdateRejectsIdWhichPointsToForcedId02"); + p2.addIdentifier().setSystem("urn:system").setValue("testUpdateRejectsIdWhichPointsToForcedId02"); p2.addName().addFamily("Tester").addGiven("testUpdateRejectsIdWhichPointsToForcedId02"); IdDt p2id = ourPatientDao.create(p2).getId(); long p1longId = p2id.getIdPartAsLong() - 1; @@ -1602,7 +1743,8 @@ public class FhirResourceDaoTest { } try { - ourPatientDao.update(p1, new IdDt("Patient/" + p1longId)); + p1.setId(new IdDt("Patient/" + p1longId)); + ourPatientDao.update(p1); fail(); } catch (ResourceNotFoundException e) { // good @@ -1613,13 +1755,14 @@ public class FhirResourceDaoTest { @Test public void testReadForcedIdVersionHistory() throws InterruptedException { Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue( "testReadVorcedIdVersionHistory01"); + p1.addIdentifier().setSystem("urn:system").setValue("testReadVorcedIdVersionHistory01"); p1.setId("testReadVorcedIdVersionHistory"); IdDt p1id = ourPatientDao.create(p1).getId(); assertEquals("testReadVorcedIdVersionHistory", p1id.getIdPart()); - p1.addIdentifier().setSystem("urn:system").setValue( "testReadVorcedIdVersionHistory02"); - IdDt p1idv2 = ourPatientDao.update(p1, p1id).getId(); + p1.addIdentifier().setSystem("urn:system").setValue("testReadVorcedIdVersionHistory02"); + p1.setId(p1id); + IdDt p1idv2 = ourPatientDao.update(p1).getId(); assertEquals("testReadVorcedIdVersionHistory", p1idv2.getIdPart()); assertNotEquals(p1id.getValue(), p1idv2.getValue()); @@ -1652,7 +1795,7 @@ public class FhirResourceDaoTest { @SuppressWarnings("unchecked") @BeforeClass - public static void beforeClass() { + public static void beforeClass() { ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml"); ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class); ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java new file mode 100644 index 00000000000..f50971f412f --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java @@ -0,0 +1,414 @@ +package ca.uhn.fhir.jpa.dao; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.Bundle; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.TagList; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.IBundleProvider; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; + +public class FhirSystemDaoDstu1Test { + + private static ClassPathXmlApplicationContext ourCtx; + private static FhirContext ourFhirContext; + private static IFhirResourceDao ourLocationDao; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu1Test.class); + private static IFhirResourceDao ourObservationDao; + private static IFhirResourceDao ourPatientDao; + private static IFhirSystemDao> ourSystemDao; + + @Test + public void testGetResourceCounts() { + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01"); + ourObservationDao.create(obs); + + Map oldCounts = ourSystemDao.getResourceCounts(); + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01"); + patient.addName().addFamily("Tester").addGiven("Joe"); + ourPatientDao.create(patient); + + Map newCounts = ourSystemDao.getResourceCounts(); + + if (oldCounts.containsKey("Patient")) { + assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient")); + } else { + assertEquals(1L, (long) newCounts.get("Patient")); + } + + assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation")); + + } + + @Test + public void testHistory() throws Exception { + Date start = new Date(); + Thread.sleep(10); + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:system").setValue("testHistory"); + patient.addName().addFamily("Tester").addGiven("Joe"); + IdDt pid = ourPatientDao.create(patient).getId().toVersionless(); + + Thread.sleep(10); + patient.setId(pid); + IdDt newpid = ourPatientDao.update(patient).getId(); + + Thread.sleep(10); + patient.setId(pid); + IdDt newpid2 = ourPatientDao.update(patient).getId(); + + Thread.sleep(10); + patient.setId(pid); + IdDt newpid3 = ourPatientDao.update(patient).getId(); + + IBundleProvider values = ourSystemDao.history(start); + assertEquals(4, values.size()); + + List res = values.getResources(0, 4); + assertEquals(newpid3, res.get(0).getId()); + assertEquals(newpid2, res.get(1).getId()); + assertEquals(newpid, res.get(2).getId()); + assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless()); + + Location loc = new Location(); + loc.getAddress().addLine("AAA"); + IdDt lid = ourLocationDao.create(loc).getId(); + + Location loc2 = new Location(); + loc2.getAddress().addLine("AAA"); + ourLocationDao.create(loc2).getId(); + + Thread.sleep(2000); + + values = ourLocationDao.history(start); + assertEquals(2, values.size()); + + values = ourLocationDao.history(lid.getIdPartAsLong(), start); + assertEquals(1, values.size()); + + } + + @Test + public void testPersistWithSimpleLink() { + Patient patient = new Patient(); + patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01")); + patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + patient.addName().addFamily("Tester").addGiven("Joe"); + + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01")); + + ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); + + String patientId = (patient.getId().getIdPart()); + String obsId = (obs.getId().getIdPart()); + + // assertThat(patientId, greaterThan(0L)); + // assertEquals(patientVersion, 1L); + // assertThat(obsId, greaterThan(patientId)); + // assertEquals(obsVersion, 1L); + + // Try to search + + IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01")); + assertEquals(1, obsResults.size()); + + IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01")); + assertEquals(1, obsResults.size()); + + IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId(); + ResourceReferenceDt subject = obs.getSubject(); + assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart()); + + // Update + + patient = (Patient) patResults.getResources(0, 1).get(0); + obs = (Observation) obsResults.getResources(0, 1).get(0); + patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02"); + + ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); + + String patientId2 = (patient.getId().getIdPart()); + String patientVersion2 = (patient.getId().getVersionIdPart()); + String obsId2 = (obs.getId().getIdPart()); + String obsVersion2 = (obs.getId().getVersionIdPart()); + + assertEquals(patientId, patientId2); + assertEquals(patientVersion2, "2"); + assertEquals(obsId, obsId2); + assertEquals(obsVersion2, "2"); + + } + + @Test + public void testPersistWithUnknownId() { + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/999998888888")); + + try { + ourSystemDao.transaction(Arrays.asList((IResource) obs)); + } catch (InvalidRequestException e) { + assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject")); + } + + obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4")); + + try { + ourSystemDao.transaction(Arrays.asList((IResource) obs)); + } catch (InvalidRequestException e) { + assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject")); + } + + } + + @Test + public void testTagOperationss() throws Exception { + + TagList preSystemTl = ourSystemDao.getAllTags(); + + TagList tl1 = new TagList(); + tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1"); + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01"); + ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1); + ourPatientDao.create(p1); + + TagList tl2 = new TagList(); + tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2"); + Observation o1 = new Observation(); + o1.getName().setText("testGetAllTags02"); + ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2); + IdDt o1id = ourObservationDao.create(o1).getId(); + assertTrue(o1id.getVersionIdPart() != null); + + TagList postSystemTl = ourSystemDao.getAllTags(); + assertEquals(preSystemTl.size() + 2, postSystemTl.size()); + assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); + + TagList tags = ourPatientDao.getAllResourceTags(); + assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); + assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + + TagList tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); + + o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST); + o1.setId(o1id); + IdDt o1id2 = ourObservationDao.update(o1).getId(); + assertTrue(o1id2.getVersionIdPart() != null); + + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); + + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + + /* + * Remove a tag from a version + */ + + ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2"); + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + + /* + * Add a tag + */ + ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3"); + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3")); + assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel()); + + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + + } + + + @Test(expected = InvalidRequestException.class) + public void testTransactionFailsWithDuplicateIds() { + Patient patient1 = new Patient(); + patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + + Patient patient2 = new Patient(); + patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + + ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2)); + } + + @Test + public void testTransactionFromBundle() throws Exception { + + InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml"); + Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes)); + List res = bundle.toListOfResources(); + + ourSystemDao.transaction(res); + + Patient p1 = (Patient) res.get(0); + String id = p1.getId().getValue(); + ourLog.info("ID: {}", id); + assertThat(id, not(equalToIgnoringCase("74635"))); + assertThat(id, not(equalToIgnoringCase(""))); + } + + + /** + * Issue #55 + */ + @Test + public void testTransactionWithCidIds() throws Exception { + List res = new ArrayList(); + + Patient p1 = new Patient(); + p1.setId("cid:patient1"); + p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); + res.add(p1); + + Observation o1 = new Observation(); + o1.setId("cid:observation1"); + o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); + o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + res.add(o1); + + Observation o2 = new Observation(); + o2.setId("cid:observation2"); + o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); + o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + res.add(o2); + + ourSystemDao.transaction(res); + + assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); + assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); + assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); + + assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + + } + + @Test + public void testTransactionWithDelete() throws Exception { + + /* + * Create 3 + */ + + List res; + res = new ArrayList(); + + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p1); + + Patient p2 = new Patient(); + p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p2); + + Patient p3 = new Patient(); + p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p3); + + ourSystemDao.transaction(res); + + /* + * Verify + */ + + IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); + assertEquals(3, results.size()); + + /* + * Now delete 2 + */ + + res = new ArrayList(); + List existing = results.getResources(0, 3); + + p1 = new Patient(); + p1.setId(existing.get(0).getId()); + ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); + res.add(p1); + + p2 = new Patient(); + p2.setId(existing.get(1).getId()); + ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); + res.add(p2); + + ourSystemDao.transaction(res); + + /* + * Verify + */ + + IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); + assertEquals(1, results2.size()); + List existing2 = results2.getResources(0, 1); + assertEquals(existing2.get(0).getId(), existing.get(2).getId()); + + } + + @AfterClass + public static void afterClass() { + ourCtx.close(); + } + + @SuppressWarnings("unchecked") + @BeforeClass + public static void beforeClass() { + ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); + ourFhirContext = ourCtx.getBean(FhirContext.class); + ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class); + ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class); + ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class); + ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java new file mode 100644 index 00000000000..691a99c877a --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java @@ -0,0 +1,681 @@ +package ca.uhn.fhir.jpa.dao; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.hamcrest.Matchers; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.TagList; +import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu2.composite.QuantityDt; +import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu2.resource.Location; +import ca.uhn.fhir.model.dstu2.resource.Observation; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.dstu2.resource.Bundle; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; +import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.valueset.BundleEntryTransactionOperationEnum; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.rest.server.IBundleProvider; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; +import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; + +public class FhirSystemDaoDstu2Test { + + private static ClassPathXmlApplicationContext ourCtx; + private static FhirContext ourFhirContext; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class); + private static IFhirResourceDao ourPatientDao; + private static IFhirSystemDao ourSystemDao; + private static IFhirResourceDao ourObservationDao; + + @Test + public void testTransactionCreateMatchUrlWithOneMatch() { + String methodName = "testTransactionCreateMatchUrlWithOneMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_200_OK + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("Patient/" + id.getIdPart() + "/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + respEntry = resp.getEntry().get(2); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + assertEquals("1", o.getId().getVersionIdPart()); + + } + + + @Test + public void testTransactionReadAndSearch() { + String methodName = "testTransactionReadAndSearch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt idv1 = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got id: {}", idv1); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Family Name"); + p.setId("Patient/" + methodName); + IdDt idv2 = ourPatientDao.update(p).getId(); + ourLog.info("Updated patient, got id: {}", idv2); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualifiedVersionless().getValue()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualified().getValue()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + + assertEquals(4, resp.getEntry().size()); + + Entry nextEntry; + + nextEntry = resp.getEntry().get(1); + assertEquals(Patient.class, nextEntry.getResource().getClass()); + assertEquals(idv2.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); + + nextEntry = resp.getEntry().get(2); + assertEquals(Patient.class, nextEntry.getResource().getClass()); + assertEquals(idv1.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); + + nextEntry = resp.getEntry().get(3); + assertEquals(Bundle.class, nextEntry.getResource().getClass()); + + Bundle respBundle = (Bundle)nextEntry.getResource(); + assertEquals(1, respBundle.getTotal().intValue()); + } + + + + @Test + public void testTransactionCreateMatchUrlWithTwoMatch() { + String methodName = "testTransactionCreateMatchUrlWithTwoMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), containsString("with match URL \"Patient")); + } + } + + @Test + public void testTransactionCreateMatchUrlWithZeroMatch() { + String methodName = "testTransactionCreateMatchUrlWithZeroMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + String patientId = respEntry.getTransactionResponse().getLocation(); + assertThat(patientId, not(endsWith("Patient/" + methodName + "/_history/1"))); + assertThat(patientId, (endsWith("/_history/1"))); + assertThat(patientId, (containsString("Patient/"))); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + respEntry = resp.getEntry().get(2); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); + assertEquals(new IdDt(patientId).toUnqualifiedVersionless(), o.getSubject().getReference()); + } + + @Test + public void testTransactionCreateNoMatchUrl() { + String methodName = "testTransactionCreateNoMatchUrl"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(2, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + String patientId = respEntry.getTransactionResponse().getLocation(); + assertThat(patientId, not(containsString("test"))); + } + + @Test + public void testTransactionDeleteMatchUrlWithOneMatch() { + String methodName = "testTransactionDeleteMatchUrlWithOneMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(2, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", nextEntry.getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // ok + } + + try { + ourPatientDao.read(new IdDt("Patient/" + methodName)); + fail(); + } catch (ResourceNotFoundException e) { + // ok + } + + IBundleProvider history = ourPatientDao.history(id, null); + assertEquals(2, history.size()); + + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0))); + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue()); + assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0))); + + } + + @Test + public void testTransactionDeleteMatchUrlWithTwoMatch() { + String methodName = "testTransactionDeleteMatchUrlWithTwoMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (ResourceNotFoundException e) { + assertThat(e.getMessage(), containsString("resource with match URL \"Patient?")); + } + } + + @Test + public void testTransactionDeleteByResourceId() { + String methodName = "testTransactionDeleteByResourceId"; + + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id1 = ourPatientDao.create(p1).getId(); + ourLog.info("Created patient, got it: {}", id1); + + Patient p2 = new Patient(); + p2.addIdentifier().setSystem("urn:system").setValue(methodName); + p2.setId("Patient/" + methodName); + IdDt id2 = ourPatientDao.create(p2).getId(); + ourLog.info("Created patient, got it: {}", id2); + + Bundle request = new Bundle(); + + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id1.getIdPart()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id2.getIdPart()); + + ourPatientDao.read(id1.toVersionless()); + ourPatientDao.read(id2.toVersionless()); + + Bundle resp = ourSystemDao.transaction(request); + + assertEquals(3, resp.getEntry().size()); + assertEquals("204", resp.getEntry().get(1).getTransactionResponse().getStatus()); + assertEquals("204", resp.getEntry().get(2).getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id1.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // good + } + + try { + ourPatientDao.read(id2.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // good + } + + } + + @Test + public void testTransactionDeleteMatchUrlWithZeroMatch() { + String methodName = "testTransactionDeleteMatchUrlWithZeroMatch"; + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (ResourceNotFoundException e) { + assertThat(e.getMessage(), containsString("resource matching URL \"Patient?")); + } + } + + @Test + public void testTransactionDeleteNoMatchUrl() { + String methodName = "testTransactionDeleteNoMatchUrl"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle res = ourSystemDao.transaction(request); + assertEquals(2, res.getEntry().size()); + + assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", res.getEntry().get(1).getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // ok + } + } + + @Test(expected = InvalidRequestException.class) + public void testTransactionFailsWithDuplicateIds() { + Bundle request = new Bundle(); + + Patient patient1 = new Patient(); + patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + request.addEntry().setResource(patient1).getTransaction().setMethod(HTTPVerbEnum.POST); + + Patient patient2 = new Patient(); + patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + request.addEntry().setResource(patient2).getTransaction().setMethod(HTTPVerbEnum.POST); + + ourSystemDao.transaction(request); + } + + @Test + public void testTransactionUpdateMatchUrlWithOneMatch() { + String methodName = "testTransactionUpdateMatchUrlWithOneMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals("200", nextEntry.getTransactionResponse().getStatus()); + assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); + assertEquals(id.toVersionless(), p.getId().toVersionless()); + assertNotEquals(id, p.getId()); + assertThat(p.getId().toString(), endsWith("/_history/2")); + + nextEntry = resp.getEntry().get(1); + assertEquals(""+Constants.STATUS_HTTP_200_OK, nextEntry.getTransactionResponse().getStatus()); + assertThat(nextEntry.getTransactionResponse().getLocation(), not(emptyString())); + + nextEntry = resp.getEntry().get(2); + o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + @Test + public void testTransactionUpdateMatchUrlWithTwoMatch() { + String methodName = "testTransactionUpdateMatchUrlWithTwoMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), containsString("with match URL \"Patient")); + } + } + + @Test + public void testTransactionUpdateMatchUrlWithZeroMatch() { + String methodName = "testTransactionUpdateMatchUrlWithZeroMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addName().addFamily("Hello"); + IdDt id = ourPatientDao.create(p).getId(); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId(id); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference(id); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", nextEntry.getTransactionResponse().getStatus()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); + assertNotEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + + nextEntry = resp.getEntry().get(1); + assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); + + nextEntry = resp.getEntry().get(2); + o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + + @Test + public void testTransactionUpdateNoMatchUrl() { + String methodName = "testTransactionUpdateNoMatchUrl"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient/"+ id.getIdPart()); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals("200", nextEntry.getTransactionResponse().getStatus()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), (containsString("test"))); + assertEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); + assertNotEquals(id, new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/2")); + + nextEntry = resp.getEntry().get(2); + assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); + + o = ourObservationDao.read(new IdDt(resp.getEntry().get(2).getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + // + // + // /** + // * Issue #55 + // */ + // @Test + // public void testTransactionWithCidIds() throws Exception { + // Bundle request = new Bundle(); + // + // Patient p1 = new Patient(); + // p1.setId("cid:patient1"); + // p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); + // res.add(p1); + // + // Observation o1 = new Observation(); + // o1.setId("cid:observation1"); + // o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); + // o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + // res.add(o1); + // + // Observation o2 = new Observation(); + // o2.setId("cid:observation2"); + // o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); + // o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + // res.add(o2); + // + // ourSystemDao.transaction(res); + // + // assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); + // assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); + // assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); + // + // assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + // assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + // + // } + // + // @Test + // public void testTransactionWithDelete() throws Exception { + // Bundle request = new Bundle(); + // + // /* + // * Create 3 + // */ + // + // List res; + // res = new ArrayList(); + // + // Patient p1 = new Patient(); + // p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p1); + // + // Patient p2 = new Patient(); + // p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p2); + // + // Patient p3 = new Patient(); + // p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p3); + // + // ourSystemDao.transaction(res); + // + // /* + // * Verify + // */ + // + // IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", + // "testTransactionWithDelete")); + // assertEquals(3, results.size()); + // + // /* + // * Now delete 2 + // */ + // + // request = new Bundle(); + // res = new ArrayList(); + // List existing = results.getResources(0, 3); + // + // p1 = new Patient(); + // p1.setId(existing.get(0).getId()); + // ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); + // res.add(p1); + // + // p2 = new Patient(); + // p2.setId(existing.get(1).getId()); + // ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); + // res.add(p2); + // + // ourSystemDao.transaction(res); + // + // /* + // * Verify + // */ + // + // IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", + // "testTransactionWithDelete")); + // assertEquals(1, results2.size()); + // List existing2 = results2.getResources(0, 1); + // assertEquals(existing2.get(0).getId(), existing.get(2).getId()); + // + // } + + @AfterClass + public static void afterClass() { + ourCtx.close(); + } + + @SuppressWarnings("unchecked") + @BeforeClass + public static void beforeClass() { + ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml"); + ourFhirContext = ourCtx.getBean(FhirContext.class); + assertEquals(FhirVersionEnum.DSTU2, ourFhirContext.getVersion().getVersion()); + ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class); + ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class); + ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoTest.java deleted file mode 100644 index e5d1f1d16e6..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoTest.java +++ /dev/null @@ -1,899 +0,0 @@ -package ca.uhn.fhir.jpa.dao; - -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.Bundle; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; -import ca.uhn.fhir.model.api.TagList; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.QuantityDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.resource.Location; -import ca.uhn.fhir.model.dstu.resource.Observation; -import ca.uhn.fhir.model.dstu.resource.Patient; -import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.model.primitive.InstantDt; -import ca.uhn.fhir.model.valueset.BundleEntryTransactionOperationEnum; -import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.rest.server.IBundleProvider; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; - -public class FhirSystemDaoTest { - - private static ClassPathXmlApplicationContext ourCtx; - private static FhirContext ourFhirContext; - private static IFhirResourceDao ourLocationDao; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoTest.class); - private static IFhirResourceDao ourObservationDao; - private static IFhirResourceDao ourPatientDao; - private static IFhirSystemDao> ourSystemDao; - - @Test - public void testGetResourceCounts() { - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01"); - ourObservationDao.create(obs); - - Map oldCounts = ourSystemDao.getResourceCounts(); - - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01"); - patient.addName().addFamily("Tester").addGiven("Joe"); - ourPatientDao.create(patient); - - Map newCounts = ourSystemDao.getResourceCounts(); - - if (oldCounts.containsKey("Patient")) { - assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient")); - } else { - assertEquals(1L, (long) newCounts.get("Patient")); - } - - assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation")); - - } - - @Test - public void testHistory() throws Exception { - Date start = new Date(); - Thread.sleep(10); - - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue("testHistory"); - patient.addName().addFamily("Tester").addGiven("Joe"); - IdDt pid = ourPatientDao.create(patient).getId().toVersionless(); - - Thread.sleep(10); - IdDt newpid = ourPatientDao.update(patient, pid).getId(); - - Thread.sleep(10); - IdDt newpid2 = ourPatientDao.update(patient, pid).getId(); - - Thread.sleep(10); - IdDt newpid3 = ourPatientDao.update(patient, pid).getId(); - - IBundleProvider values = ourSystemDao.history(start); - assertEquals(4, values.size()); - - List res = values.getResources(0, 4); - assertEquals(newpid3, res.get(0).getId()); - assertEquals(newpid2, res.get(1).getId()); - assertEquals(newpid, res.get(2).getId()); - assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless()); - - Location loc = new Location(); - loc.getAddress().addLine("AAA"); - IdDt lid = ourLocationDao.create(loc).getId(); - - Location loc2 = new Location(); - loc2.getAddress().addLine("AAA"); - ourLocationDao.create(loc2).getId(); - - Thread.sleep(2000); - - values = ourLocationDao.history(start); - assertEquals(2, values.size()); - - values = ourLocationDao.history(lid.getIdPartAsLong(), start); - assertEquals(1, values.size()); - - } - - @Test - public void testPersistWithSimpleLink() { - Patient patient = new Patient(); - patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01")); - patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); - patient.addName().addFamily("Tester").addGiven("Joe"); - - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01")); - - ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); - - String patientId = (patient.getId().getIdPart()); - String obsId = (obs.getId().getIdPart()); - - // assertThat(patientId, greaterThan(0L)); - // assertEquals(patientVersion, 1L); - // assertThat(obsId, greaterThan(patientId)); - // assertEquals(obsVersion, 1L); - - // Try to search - - IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01")); - assertEquals(1, obsResults.size()); - - IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01")); - assertEquals(1, obsResults.size()); - - IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId(); - ResourceReferenceDt subject = obs.getSubject(); - assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart()); - - // Update - - patient = (Patient) patResults.getResources(0, 1).get(0); - obs = (Observation) obsResults.getResources(0, 1).get(0); - patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02"); - - ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); - - String patientId2 = (patient.getId().getIdPart()); - String patientVersion2 = (patient.getId().getVersionIdPart()); - String obsId2 = (obs.getId().getIdPart()); - String obsVersion2 = (obs.getId().getVersionIdPart()); - - assertEquals(patientId, patientId2); - assertEquals(patientVersion2, "2"); - assertEquals(obsId, obsId2); - assertEquals(obsVersion2, "2"); - - } - - @Test - public void testPersistWithUnknownId() { - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/999998888888")); - - try { - ourSystemDao.transaction(Arrays.asList((IResource) obs)); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject")); - } - - obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4")); - - try { - ourSystemDao.transaction(Arrays.asList((IResource) obs)); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject")); - } - - } - - @Test - public void testTagOperationss() throws Exception { - - TagList preSystemTl = ourSystemDao.getAllTags(); - - TagList tl1 = new TagList(); - tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1"); - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01"); - ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1); - ourPatientDao.create(p1); - - TagList tl2 = new TagList(); - tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2"); - Observation o1 = new Observation(); - o1.getName().setText("testGetAllTags02"); - ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2); - IdDt o1id = ourObservationDao.create(o1).getId(); - assertTrue(o1id.getVersionIdPart() != null); - - TagList postSystemTl = ourSystemDao.getAllTags(); - assertEquals(preSystemTl.size() + 2, postSystemTl.size()); - assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); - - TagList tags = ourPatientDao.getAllResourceTags(); - assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); - assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - - TagList tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); - - o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST); - IdDt o1id2 = ourObservationDao.update(o1, o1id).getId(); - assertTrue(o1id2.getVersionIdPart() != null); - - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); - - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - - /* - * Remove a tag from a version - */ - - ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2"); - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - - /* - * Add a tag - */ - ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3"); - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3")); - assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel()); - - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - - } - - @Test - public void testTransactionCreateMatchUrlWithOneMatch() { - String methodName = "testTransactionCreateMatchUrlWithOneMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.CREATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.NOOP, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertEquals(id, p.getId()); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionCreateMatchUrlWithTwoMatch() { - String methodName = "testTransactionCreateMatchUrlWithTwoMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.CREATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - try { - ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - fail(); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("with match URL \"Patient")); - } - } - - @Test - public void testTransactionCreateMatchUrlWithZeroMatch() { - String methodName = "testTransactionCreateMatchUrlWithZeroMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.CREATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().getIdPart(), not(containsString("test"))); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(p.getId().toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionCreateNoMatchUrl() { - String methodName = "testTransactionCreateNoMatchUrl"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.CREATE); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p)); - assertEquals(2, resp.size()); - p = (Patient) resp.get(1); - - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().getIdPart(), not(containsString("test"))); - } - - @Test - public void testTransactionDeleteMatchUrlWithOneMatch() { - String methodName = "testTransactionDeleteMatchUrlWithOneMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.DELETE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p)); - assertEquals(2, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.DELETE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().toVersionless().toString(), not(containsString("test"))); - assertEquals(id.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id, p.getId()); - assertThat(p.getId().toString(), endsWith("/_history/2")); - - try { - ourPatientDao.read(id.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // ok - } - - try { - ourPatientDao.read(new IdDt("Patient/" + methodName)); - fail(); - } catch (ResourceNotFoundException e) { - // ok - } - - } - - @Test - public void testTransactionDeleteMatchUrlWithTwoMatch() { - String methodName = "testTransactionDeleteMatchUrlWithTwoMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.DELETE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - try { - ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - fail(); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("with match URL \"Patient")); - } - } - - @Test - public void testTransactionDeleteMatchUrlWithZeroMatch() { - String methodName = "testTransactionDeleteMatchUrlWithZeroMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName + "ZZZ"); - p.addName().addFamily("Hello"); - IdDt id = ourPatientDao.create(p).getId(); - - p = new Patient(); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - IdDt id2 = ourPatientDao.create(p).getId(); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.DELETE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p)); - assertEquals(2, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.DELETE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().toVersionless().toString(), (containsString("test"))); - assertThat(p.getId().toString(), endsWith("/_history/2")); - assertEquals(id2.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id2, p.getId()); - - try { - ourPatientDao.read(id2.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // ok - } - - Patient found = ourPatientDao.read(id); - assertEquals(id, found.getId()); - - } - - @Test - public void testTransactionDeleteNoMatchUrl() { - String methodName = "testTransactionDeleteNoMatchUrl"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.DELETE); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p)); - assertEquals(2, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.DELETE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(p).getValue()); - - try { - ourPatientDao.read(id.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // ok - } - } - - @Test(expected = InvalidRequestException.class) - public void testTransactionFailsWithDuplicateIds() { - Patient patient1 = new Patient(); - patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); - - Patient patient2 = new Patient(); - patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); - - ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2)); - } - -// @Test TODO: re-enable - public void testTransactionFromBundle() throws Exception { - - InputStream bundleRes = FhirSystemDaoTest.class.getResourceAsStream("/bundle.json"); - Bundle bundle = ourFhirContext.newJsonParser().parseBundle(new InputStreamReader(bundleRes)); - List res = bundle.toListOfResources(); - - ourSystemDao.transaction(res); - - Patient p1 = (Patient) res.get(0); - String id = p1.getId().getValue(); - ourLog.info("ID: {}", id); - assertThat(id, not(containsString("5556918"))); - assertThat(id, not(equalToIgnoringCase(""))); - } - - @Test - public void testTransactionUpdateMatchUrlWithOneMatch() { - String methodName = "testTransactionUpdateMatchUrlWithOneMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.UPDATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.UPDATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().toVersionless().toString(), not(containsString("test"))); - assertEquals(id.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id, p.getId()); - assertThat(p.getId().toString(), endsWith("/_history/2")); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionUpdateMatchUrlWithTwoMatch() { - String methodName = "testTransactionUpdateMatchUrlWithTwoMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.UPDATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - try { - ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - fail(); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("with match URL \"Patient")); - } - } - - @Test - public void testTransactionUpdateMatchUrlWithZeroMatch() { - String methodName = "testTransactionUpdateMatchUrlWithZeroMatch"; - - Patient p = new Patient(); - p.addName().addFamily("Hello"); - IdDt id = ourPatientDao.create(p).getId(); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId(id); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.UPDATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference(id); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.UPDATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertEquals(id.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id, p.getId()); - assertThat(p.getId().toString(), endsWith("/_history/2")); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(p.getId().toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionUpdateMatchUrlWithZeroMatchAndNotPreExisting() { - String methodName = "testTransactionUpdateMatchUrlWithZeroMatchAndNotPreExisting"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.UPDATE); - ResourceMetadataKeyEnum.LINK_SEARCH.put(p, "Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().toVersionless().toString(), containsString("test")); - assertThat(p.getId().toString(), endsWith("/_history/1")); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(p.getId().toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionUpdateNoMatchUrl() { - String methodName = "testTransactionUpdateNoMatchUrl"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.put(p, BundleEntryTransactionOperationEnum.UPDATE); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - - List resp = ourSystemDao.transaction(Arrays.asList((IResource) p, o)); - assertEquals(3, resp.size()); - - p = (Patient) resp.get(1); - assertEquals(BundleEntryTransactionOperationEnum.UPDATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(p)); - assertThat(p.getId().toVersionless().toString(), containsString("test")); - assertEquals(id.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id, p.getId()); - assertThat(p.getId().toString(), endsWith("/_history/2")); - - o = (Observation) resp.get(2); - assertEquals(BundleEntryTransactionOperationEnum.CREATE, ResourceMetadataKeyEnum.ENTRY_TRANSACTION_OPERATION.get(o)); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionUpdateNoOperationSpecified() throws Exception { - List res = new ArrayList(); - - Patient p1 = new Patient(); - p1.getId().setValue("testTransactionWithUpdateXXX01"); - p1.addIdentifier().setSystem("system").setValue("testTransactionWithUpdate01"); - res.add(p1); - - Observation p2 = new Observation(); - p2.getId().setValue("testTransactionWithUpdateXXX02"); - p2.getIdentifier().setSystem("system").setValue("testTransactionWithUpdate02"); - p2.setSubject(new ResourceReferenceDt("Patient/testTransactionWithUpdateXXX01")); - res.add(p2); - - ourSystemDao.transaction(res); - - assertFalse(p1.getId().isEmpty()); - assertFalse(p2.getId().isEmpty()); - assertEquals("testTransactionWithUpdateXXX01", p1.getId().getIdPart()); - assertEquals("testTransactionWithUpdateXXX02", p2.getId().getIdPart()); - assertNotEquals("testTransactionWithUpdateXXX01", p1.getId().getVersionIdPart()); - assertNotEquals("testTransactionWithUpdateXXX02", p2.getId().getVersionIdPart()); - assertEquals(p1.getId().toUnqualified().toVersionless(), p2.getSubject().getReference()); - - IdDt p1id = p1.getId().toUnqualified().toVersionless(); - IdDt p1idWithVer = p1.getId().toUnqualified(); - IdDt p2id = p2.getId().toUnqualified().toVersionless(); - IdDt p2idWithVer = p2.getId().toUnqualified(); - - /* - * Make some changes - */ - - res = new ArrayList(); - - p1 = new Patient(); - p1.getId().setValue("testTransactionWithUpdateXXX01"); - p1.addIdentifier().setSystem("system").setValue("testTransactionWithUpdate01"); - p1.addName().addFamily("Name1"); - res.add(p1); - - p2 = new Observation(); - p2.getId().setValue("testTransactionWithUpdateXXX02"); - p2.getIdentifier().setSystem("system").setValue("testTransactionWithUpdate02"); - p2.setSubject(new ResourceReferenceDt("Patient/testTransactionWithUpdateXXX01")); - p2.addReferenceRange().setHigh(new QuantityDt(123L)); - res.add(p2); - - List results = ourSystemDao.transaction(res); - - assertEquals(p1id, results.get(1).getId().toUnqualified().toVersionless()); - assertEquals(p2id, results.get(2).getId().toUnqualified().toVersionless()); - assertNotEquals(p1idWithVer, results.get(1).getId().toUnqualified()); - assertNotEquals(p2idWithVer, results.get(2).getId().toUnqualified()); - - } - - /** - * Issue #55 - */ - @Test - public void testTransactionWithCidIds() throws Exception { - List res = new ArrayList(); - - Patient p1 = new Patient(); - p1.setId("cid:patient1"); - p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); - res.add(p1); - - Observation o1 = new Observation(); - o1.setId("cid:observation1"); - o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); - o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - res.add(o1); - - Observation o2 = new Observation(); - o2.setId("cid:observation2"); - o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); - o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - res.add(o2); - - ourSystemDao.transaction(res); - - assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); - assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); - assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); - - assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - - } - - @Test - public void testTransactionWithDelete() throws Exception { - - /* - * Create 3 - */ - - List res; - res = new ArrayList(); - - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p1); - - Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p2); - - Patient p3 = new Patient(); - p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p3); - - ourSystemDao.transaction(res); - - /* - * Verify - */ - - IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); - assertEquals(3, results.size()); - - /* - * Now delete 2 - */ - - res = new ArrayList(); - List existing = results.getResources(0, 3); - - p1 = new Patient(); - p1.setId(existing.get(0).getId()); - ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); - res.add(p1); - - p2 = new Patient(); - p2.setId(existing.get(1).getId()); - ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); - res.add(p2); - - ourSystemDao.transaction(res); - - /* - * Verify - */ - - IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); - assertEquals(1, results2.size()); - List existing2 = results2.getResources(0, 1); - assertEquals(existing2.get(0).getId(), existing.get(2).getId()); - - } - - @AfterClass - public static void afterClass() { - ourCtx.close(); - } - - @SuppressWarnings("unchecked") - @BeforeClass - public static void beforeClass() { - ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); - ourFhirContext = ourCtx.getBean(FhirContext.class); - ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class); - ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class); - ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class); - ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); - } - -} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java index b47b5ab02d8..9dce7dfa397 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java @@ -19,7 +19,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider; import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.IResource; diff --git a/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml new file mode 100644 index 00000000000..c8c8106e0c4 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml @@ -0,0 +1,158 @@ + + + Search results for resource type Patient + urn:uuid:d05b8832-2ec2-4df1-9a8f-905ba57823 + + + + + + 2015-02-21T17:08:03Z + 303 + + Patient "74635" Version "2" + http://fhir.healthintersections.com.au/open/Patient/74635 + + 2015-01-29T13:54:03Z + + Anonymous (24.130.25.156) + + 2015-02-21T17:08:03Z + + + + +
    +

    + Generated Narrative +

    +

    + identifier: ??

    +

    + name: Eve Everywoman

    +

    + telecom: ph: 555-555-2003(work)

    +

    + gender: Female + (Details : {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) +

    +

    + birthDate: 1955-01-06

    +

    + address: 2222 Home Street, (home)

    +

    + photo:

    +

    + active: -1

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + + + + +
    +
    + +
    Generated Narrative identifier: ?? name: Eve Everywoman telecom: ph: 555-555-2003(work) gender: Female (Details : {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) birthDate: 1955-01-06 address: 2222 Home Street…
    +
    +
    + + Patient "8483548" Version "1" + http://fhir.healthintersections.com.au/open/Patient/8483548 + + + 2015-01-29T02:19:50Z + + Anonymous (service) + + 2015-02-21T17:08:03Z + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    NamePeter James + Chalmers("Jim")
    Address534 Erewhon, Pleasantville, Orange County, 3999
    ContactsHome: unknown. Work: (03) 5555 6473
    IdMRN: 12345 (Acme Healthcare)
    +
    + + + + + + + +
    + + + + + + + + +
    + +
    +
    + +
    Name Peter James Chalmers ("Jim") Address 534 Erewhon, Pleasantville, Orange County, 3999 Contacts Home: unknown. Work: (03) 5555 6473 …
    +
    +
    +
    diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDev.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDev.java deleted file mode 100644 index 5055e5ae381..00000000000 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDev.java +++ /dev/null @@ -1,74 +0,0 @@ -package ca.uhn.fhir.rest.client; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.StringReader; -import java.nio.charset.Charset; - -import org.apache.commons.io.input.ReaderInputStream; -import org.apache.http.HttpResponse; -import org.apache.http.ProtocolVersion; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.message.BasicHeader; -import org.apache.http.message.BasicStatusLine; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.api.Bundle; -import ca.uhn.fhir.model.dstu2.resource.Patient; -import ca.uhn.fhir.rest.server.Constants; - -public class GenericClientTestDev { - private static FhirContext ourCtx; - private HttpClient myHttpClient; - private HttpResponse myHttpResponse; - - - @BeforeClass - public static void beforeClass() { - ourCtx = FhirContext.forDstu2(); - } - - - @Before - public void before() { - myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); - ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient); - ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER); - myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); - } - - - @Test - public void testSearchByString() throws Exception { - String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}"; - - ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); - when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); - when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); - when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8")); - when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8"))); - - IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); - - //@formatter:off - Bundle response = client.search() - .forResource("Patient") - .where(Patient.NAME.matches().value("james")) - .execute(); - //@formatter:on - - assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString()); - assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass()); - - } - - -} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java new file mode 100644 index 00000000000..7851bbdb3f9 --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java @@ -0,0 +1,212 @@ +package ca.uhn.fhir.rest.client; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + +import java.io.IOException; +import java.io.StringReader; +import java.nio.charset.Charset; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.io.input.ReaderInputStream; +import org.apache.http.HttpResponse; +import org.apache.http.ProtocolVersion; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.message.BasicHeader; +import org.apache.http.message.BasicStatusLine; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.Bundle; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.rest.server.EncodingEnum; + +public class GenericClientTestDstu2 { + private static FhirContext ourCtx; + private HttpClient myHttpClient; + private HttpResponse myHttpResponse; + + + @BeforeClass + public static void beforeClass() { + ourCtx = FhirContext.forDstu2(); + } + + + @Before + public void before() { + myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); + ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient); + ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER); + myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); + } + + + @Test + public void testSearchByString() throws Exception { + String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}"; + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8"))); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + //@formatter:off + Bundle response = client.search() + .forResource("Patient") + .where(Patient.NAME.matches().value("james")) + .execute(); + //@formatter:on + + assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString()); + assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass()); + + } + + @Test + public void testDeleteConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); +// when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_TEXT + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + int idx = 0; + + client.delete().resourceById(new IdDt("Patient/123")).execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient/123", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + client.delete().resourceConditionalByUrl("Patient?name=foo").execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + client.delete().resourceConditionalByType("Patient").where(Patient.NAME.matches().value("foo")).execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + } + + @Test + public void testCreateConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + int idx = 0; + + Patient p = new Patient(); + p.addName().addFamily("FOOFAMILY"); + + client.create().resource(p).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); + assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); + idx++; + + client.create().resource(p).conditional().where(Patient.NAME.matches().value("foo")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); + assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); + idx++; + + } + + + @Test + public void testUpdateConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + int idx = 0; + + Patient p = new Patient(); + p.addName().addFamily("FOOFAMILY"); + + client.update().resource(p).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + client.update().resource(p).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + } + + private String extractBody(ArgumentCaptor capt, int count) throws IOException { + String body = IOUtils.toString(((HttpEntityEnclosingRequestBase) capt.getAllValues().get(count)).getEntity().getContent(), "UTF-8"); + return body; + } + +} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java new file mode 100644 index 00000000000..bdf667faa0f --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java @@ -0,0 +1,133 @@ +package ca.uhn.fhir.rest.server; + +import static org.junit.Assert.*; + +import java.util.concurrent.TimeUnit; + +import org.apache.commons.io.IOUtils; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.servlet.ServletHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; +import ca.uhn.fhir.model.api.TagList; +import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport; +import ca.uhn.fhir.model.dstu2.resource.Observation; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; +import ca.uhn.fhir.model.dstu2.resource.Organization; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.util.PortUtil; + +/** + * Created by dsotnikov on 2/25/2014. + */ +public class UpdateConditionalTest { + private static CloseableHttpClient ourClient; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class); + private static int ourPort; + private static Server ourServer; + + @Test + public void testUpdate() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setValue("002"); + + HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001"); + httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); + + HttpResponse status = ourClient.execute(httpPost); + + String responseContent = IOUtils.toString(status.getEntity().getContent()); + IOUtils.closeQuietly(status.getEntity().getContent()); + + ourLog.info("Response was:\n{}", responseContent); + + OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent); + assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails()); + + assertEquals(200, status.getStatusLine().getStatusCode()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue()); + + } + + + + @AfterClass + public static void afterClass() throws Exception { + ourServer.stop(); + } + + @BeforeClass + public static void beforeClass() throws Exception { + ourPort = PortUtil.findFreePort(); + ourServer = new Server(ourPort); + + PatientProvider patientProvider = new PatientProvider(); + + ServletHandler proxyHandler = new ServletHandler(); + RestfulServer servlet = new RestfulServer(); + servlet.setResourceProviders(patientProvider); + ServletHolder servletHolder = new ServletHolder(servlet); + proxyHandler.addServletWithMapping(servletHolder, "/*"); + ourServer.setHandler(proxyHandler); + ourServer.start(); + + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); + HttpClientBuilder builder = HttpClientBuilder.create(); + builder.setConnectionManager(connectionManager); + ourClient = builder.build(); + + } + + private static String ourLastConditionalUrl; + + + @Before + public void before() { + ourLastConditionalUrl=null; + } + + public static class PatientProvider implements IResourceProvider { + + @Override + public Class getResourceType() { + return Patient.class; + } + + + @Update() + public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) { + IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue()); + OperationOutcome oo = new OperationOutcome(); + oo.addIssue().setDetails("OODETAILS"); + if (theId.getValueAsString().contains("CREATE")) { + return new MethodOutcome(id,oo, true); + } + + return new MethodOutcome(id,oo); + } + + } + +} From c03d6293334fcb61e1f9b5fb472f61070d7d3281 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 23 Feb 2015 10:01:39 -0500 Subject: [PATCH 06/12] Fix compile failure --- .../src/main/java/ca/uhn/fhir/model/dev/FhirDev.java | 2 -- .../src/main/java/ca/uhn/fhir/model/dev/FhirDev.java | 6 ------ .../src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java | 7 +------ .../src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java | 6 +----- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index 3c94a4bf79d..579434ad2da 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -23,12 +23,10 @@ package ca.uhn.fhir.model.dev; import java.io.InputStream; import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.IBaseExtension; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.base.composite.BaseContainedDt; diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index 4fc2a43ac68..f8448224d30 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -108,11 +108,5 @@ public class FhirDev implements IFhirVersion { } - @Override - public IBaseExtension newExtension() { - return null; - } - - } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index d3b0383ada0..db4b397d8dd 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -380,11 +380,6 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } - @Override - public IBaseExtension newExtension() { - return null; - } - - + } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 54fc0759cb3..f46b860e98f 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -93,9 +93,5 @@ public class FhirDstu2 implements IFhirVersion { throw new UnsupportedOperationException(); } - @Override - public IBaseExtension newExtension() { - return null; - } - + } From a4b545ba218e6e4b80c4162a66400bbf70cad028 Mon Sep 17 00:00:00 2001 From: mochaholic Date: Mon, 23 Feb 2015 08:49:21 -0700 Subject: [PATCH 07/12] Merged with the latest master snapshot. --- .../src/main/java/ca/uhn/fhir/model/dev/FhirDev.java | 2 +- .../src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java | 2 +- .../src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index 4fc2a43ac68..c50e1d743cd 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -108,7 +108,7 @@ public class FhirDev implements IFhirVersion { } - @Override + //@Override public IBaseExtension newExtension() { return null; } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index d3b0383ada0..dabe17737c4 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -380,7 +380,7 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } - @Override + //@Override public IBaseExtension newExtension() { return null; } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 54fc0759cb3..8a10b831cbd 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -93,7 +93,7 @@ public class FhirDstu2 implements IFhirVersion { throw new UnsupportedOperationException(); } - @Override + //@Override public IBaseExtension newExtension() { return null; } From 819dc67d71706c4c5c34267d699925b4a1c9f486 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 23 Feb 2015 13:24:17 -0500 Subject: [PATCH 08/12] Just automated license file updates --- .../context/RuntimeElementDirectResource.java | 20 +++++++++++++++++++ .../fhir/model/base/resource/BaseBinary.java | 20 +++++++++++++++++++ .../ca/uhn/fhir/rest/gclient/IBaseQuery.java | 20 +++++++++++++++++++ .../fhir/rest/gclient/ICreateWithQuery.java | 20 +++++++++++++++++++ .../rest/gclient/ICreateWithQueryTyped.java | 20 +++++++++++++++++++ .../fhir/rest/gclient/IDeleteWithQuery.java | 20 +++++++++++++++++++ .../rest/gclient/IDeleteWithQueryTyped.java | 20 +++++++++++++++++++ .../fhir/rest/gclient/IUpdateWithQuery.java | 20 +++++++++++++++++++ .../rest/gclient/IUpdateWithQueryTyped.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/IAnyResource.java | 20 +++++++++++++++++++ .../instance/model/api/IBackboneElement.java | 20 +++++++++++++++++++ .../model/api/IBaseBooleanDatatype.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/IBaseBundle.java | 20 +++++++++++++++++++ .../instance/model/api/IBaseDatatype.java | 20 +++++++++++++++++++ .../model/api/IBaseDecimalDatatype.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/IBaseElement.java | 20 +++++++++++++++++++ .../instance/model/api/IBaseEnumFactory.java | 20 +++++++++++++++++++ .../instance/model/api/IBaseExtension.java | 20 +++++++++++++++++++ .../model/api/IBaseHasExtensions.java | 20 +++++++++++++++++++ .../model/api/IBaseHasModifierExtensions.java | 20 +++++++++++++++++++ .../model/api/IBaseIntegerDatatype.java | 20 +++++++++++++++++++ .../hl7/fhir/instance/model/api/ICoding.java | 20 +++++++++++++++++++ .../instance/model/api/IDatatypeElement.java | 20 +++++++++++++++++++ .../instance/model/api/IDomainResource.java | 20 +++++++++++++++++++ .../hl7/fhir/instance/model/api/IIdType.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/IMetaType.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/INarrative.java | 20 +++++++++++++++++++ .../fhir/instance/model/api/IReference.java | 20 +++++++++++++++++++ .../ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java | 20 +++++++++++++++++++ .../fhir/model/dev/composite/ContainedDt.java | 2 +- .../fhir/model/dev/composite/NarrativeDt.java | 2 +- .../dev/composite/ResourceReferenceDt.java | 2 +- .../fhir/model/dev/resource/BaseResource.java | 2 +- .../uhn/fhir/model/dev/resource/Binary.java | 2 +- .../model/dstu/composite/ContainedDt.java | 2 +- .../model/dstu/composite/NarrativeDt.java | 2 +- .../dstu/composite/ResourceReferenceDt.java | 2 +- .../model/dstu/resource/BaseResource.java | 2 +- .../uhn/fhir/model/dstu/resource/Binary.java | 2 +- .../model/dstu2/composite/ContainedDt.java | 2 +- .../model/dstu2/composite/NarrativeDt.java | 2 +- .../dstu2/composite/ResourceReferenceDt.java | 2 +- .../model/dstu2/resource/BaseResource.java | 2 +- .../uhn/fhir/model/dstu2/resource/Binary.java | 2 +- 44 files changed, 595 insertions(+), 15 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java index 19630fcdc6a..ec3f829049e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElementDirectResource.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.context; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBaseResource; public class RuntimeElementDirectResource extends BaseRuntimeElementDefinition { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseBinary.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseBinary.java index 366dd9ae82c..3514aa9173c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseBinary.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseBinary.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.model.base.resource; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.model.api.IResource; public interface BaseBinary extends IResource { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java index 8084e5e204c..15a90b995ed 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IBaseQuery { T where(ICriterion theCriterion); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java index 4b52e8818d8..71a98f00c1c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQuery.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface ICreateWithQuery extends IBaseQuery { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java index a0ca9af9843..927c5ab8523 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateWithQueryTyped.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface ICreateWithQueryTyped extends ICreateTyped, ICreateWithQuery { } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java index 060b0cdb077..6b570fd437b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQuery.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IDeleteWithQuery extends IBaseQuery { } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java index 83e04f3ca50..cb7f79e9e60 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDeleteWithQueryTyped.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IDeleteWithQueryTyped extends IDeleteTyped, IDeleteWithQuery { } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java index 2a6380cacd3..89799beb1b2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQuery.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IUpdateWithQuery extends IBaseQuery { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java index cb61b6786c4..a292405559b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateWithQueryTyped.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.gclient; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IUpdateWithQueryTyped extends IUpdateTyped, IUpdateWithQuery { } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java index 58565ddf287..764bec73488 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IAnyResource.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBaseResource; public interface IAnyResource extends IBaseResource { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java index b52e715f8ed..da77cb61bd0 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBackboneElement.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBase; public interface IBackboneElement extends IBase { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBooleanDatatype.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBooleanDatatype.java index 4162693da73..9b2066e6764 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBooleanDatatype.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBooleanDatatype.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IPrimitiveType; public interface IBaseBooleanDatatype extends IPrimitiveType { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBundle.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBundle.java index 7e92f595067..b0d4a79ea9d 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBundle.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseBundle.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBaseResource; public interface IBaseBundle extends IBaseResource { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDatatype.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDatatype.java index 24a59aac24a..24a4f525c22 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDatatype.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDatatype.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBase; public interface IBaseDatatype extends IBase { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDecimalDatatype.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDecimalDatatype.java index bcb5c96beb9..cb68921fdeb 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDecimalDatatype.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseDecimalDatatype.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.math.BigDecimal; import org.hl7.fhir.instance.model.IPrimitiveType; diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseElement.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseElement.java index e53c06a2422..95d0797308d 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseElement.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseElement.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IBaseElement { IBaseElement setId(String theValue); diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java index ab56defe694..7d70dfa27d9 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IBaseEnumFactory> { /** diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java index 0d0dbf01aec..252513f94b6 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.util.List; import org.hl7.fhir.instance.model.ICompositeType; diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java index 257b7466478..0af8e6554a2 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.util.List; public interface IBaseHasExtensions { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java index 23cba0358a3..1a2de6e8fc0 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.util.List; public interface IBaseHasModifierExtensions { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseIntegerDatatype.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseIntegerDatatype.java index 4965c7c770e..9b592530aea 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseIntegerDatatype.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseIntegerDatatype.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IPrimitiveType; public interface IBaseIntegerDatatype extends IPrimitiveType { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICoding.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICoding.java index c3f14f242a0..303394f35d2 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICoding.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/ICoding.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface ICoding { ICoding setSystem(String theScheme); diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDatatypeElement.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDatatypeElement.java index 292aaf9b92a..eb72ae9025f 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDatatypeElement.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDatatypeElement.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.model.api.IElement; public interface IDatatypeElement extends IElement { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java index a60d3bb9c2b..072b3c37eb6 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IDomainResource.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.util.List; public interface IDomainResource { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java index c998d6cc072..6e704aea7b3 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IIdType.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + public interface IIdType { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java index 7b843002002..af3a21bffe7 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IMetaType.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import java.util.Date; import org.hl7.fhir.instance.model.ICompositeType; diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java index 58f89e95eca..ea3fab02975 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/INarrative.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.ICompositeType; public interface INarrative extends ICompositeType { diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IReference.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IReference.java index dc50300ec09..0926349fe02 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IReference.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IReference.java @@ -1,5 +1,25 @@ package org.hl7.fhir.instance.model.api; +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.hl7.fhir.instance.model.IBase; public interface IReference extends IBase { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java index 89cef618eab..0c7dd65b76c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.dao; +/* + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.rest.api.MethodOutcome; diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ContainedDt.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ContainedDt.java index 992800188b3..9f57f33055c 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ContainedDt.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ContainedDt.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dev.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DEV (FHIR Latest) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/NarrativeDt.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/NarrativeDt.java index 14198cad72c..9fe863a3301 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/NarrativeDt.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/NarrativeDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dev.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DEV (FHIR Latest) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ResourceReferenceDt.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ResourceReferenceDt.java index 2403bf64a7e..c7551512e4a 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ResourceReferenceDt.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/composite/ResourceReferenceDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dev.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DEV (FHIR Latest) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/BaseResource.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/BaseResource.java index bba6e6c67d3..7e2bb026cc8 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/BaseResource.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/BaseResource.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dev.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DEV (FHIR Latest) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/Binary.java b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/Binary.java index 5d447b85e11..0de2de69892 100644 --- a/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/Binary.java +++ b/hapi-fhir-structures-dev/src/main/java/ca/uhn/fhir/model/dev/resource/Binary.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dev.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DEV (FHIR Latest) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java index e969d03184a..917572c6ecc 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU1 (FHIR v0.80) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java index 9808aebe5c9..e17823db1d5 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dstu.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU1 (FHIR v0.80) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java index 7977d90d462..47c73f09b8f 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dstu.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU1 (FHIR v0.80) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java index 4c523541f80..57681bf7b41 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU1 (FHIR v0.80) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java index 53f48500f81..0989e6f8485 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU1 (FHIR v0.80) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java index fd3def9868d..7a743dd8801 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ContainedDt.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu2.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java index 50dbb56d593..de18356fc42 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/NarrativeDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dstu2.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java index 7a35d538c65..73e4d99bd64 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/ResourceReferenceDt.java @@ -18,7 +18,7 @@ package ca.uhn.fhir.model.dstu2.composite; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java index 1f74df52a13..da7969555f6 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu2.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) * %% * Copyright (C) 2014 - 2015 University Health Network * %% diff --git a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/Binary.java b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/Binary.java index ec2a178aaab..6f1021b1257 100644 --- a/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/Binary.java +++ b/hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/resource/Binary.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu2.resource; /* * #%L - * HAPI FHIR - Core Library + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) * %% * Copyright (C) 2014 - 2015 University Health Network * %% From 64715477bd16cbabadb0d49f1cf48102ea0e2dfc Mon Sep 17 00:00:00 2001 From: mochaholic Date: Mon, 23 Feb 2015 11:35:18 -0700 Subject: [PATCH 09/12] Merged with the latest master snapshot. --- .../main/java/example/ExampleProviders.java | 34 +- .../java/example/PagingPatientProvider.java | 2 +- .../context/BaseRuntimeElementDefinition.java | 2 +- ...imeChildEnumerationDatatypeDefinition.java | 42 +- ...ntimeChildPrimitiveDatatypeDefinition.java | 3 +- .../ca/uhn/fhir/model/api/ExtensionDt.java | 10 +- .../ca/uhn/fhir/model/api/IFhirVersion.java | 2 + .../uhn/fhir/model/api/annotation/Child.java | 8 +- .../api/annotation/SearchParamDefinition.java | 4 +- .../model/base/composite/BaseCodingDt.java | 11 +- .../ca/uhn/fhir/model/primitive/IdDt.java | 2 +- .../java/ca/uhn/fhir/parser/JsonParser.java | 8 +- .../java/ca/uhn/fhir/parser/ParserState.java | 6 +- .../java/ca/uhn/fhir/parser/XmlParser.java | 87 +- .../rest/client/BaseHttpClientInvocation.java | 2 +- .../ca/uhn/fhir/rest/gclient/IBaseQuery.java | 4 +- .../uhn/fhir/rest/gclient/ICreateTyped.java | 9 +- .../ca/uhn/fhir/rest/gclient/IDelete.java | 9 +- .../java/ca/uhn/fhir/rest/gclient/IQuery.java | 2 +- .../uhn/fhir/rest/gclient/IUpdateTyped.java | 9 +- .../ca/uhn/fhir/rest/method/MethodUtil.java | 60 +- .../uhn/fhir/rest/param/InternalCodingDt.java | 3 +- .../instance/model/api/IBaseEnumFactory.java | 33 +- .../instance/model/api/IBaseExtension.java | 8 +- .../model/api/IBaseHasExtensions.java | 6 +- .../model/api/IBaseHasModifierExtensions.java | 4 +- .../parser/MultiVersionJsonParserTest.java | 4 +- .../java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java | 16 +- .../ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java | 42 +- .../ca/uhn/fhir/jpa/dao/FhirResourceDao.java | 117 +- .../uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java | 162 +-- .../ca/uhn/fhir/jpa/dao/IFhirResourceDao.java | 10 +- .../java/ca/uhn/fhir/jpa/entity/ForcedId.java | 8 +- .../uhn/fhir/jpa/dao/FhirResourceDaoTest.java | 14 +- .../fhir/jpa/dao/FhirSystemDaoDstu1Test.java | 534 +++---- .../fhir/jpa/dao/FhirSystemDaoDstu2Test.java | 1265 ++++++++--------- .../src/test/resources/bundle-dstu1.xml | 336 +++-- .../ca/uhn/fhir/model/dstu/FhirDstu1.java | 1 + .../ca/uhn/fhir/parser/JsonParserTest.java | 86 +- .../ca/uhn/fhir/parser/XmlParserTest.java | 30 +- .../ca/uhn/fhir/parser/JsonParserTest.java | 84 +- .../ca/uhn/fhir/parser/XmlParserTest.java | 28 +- .../rest/client/GenericClientTestDstu2.java | 292 ++-- .../rest/server/UpdateConditionalTest.java | 139 +- .../org/hl7/fhir/instance/model/Address.java | 26 +- .../org/hl7/fhir/instance/model/Alert.java | 20 +- .../instance/model/AllergyIntolerance.java | 64 +- .../hl7/fhir/instance/model/Appointment.java | 38 +- .../instance/model/AppointmentResponse.java | 20 +- .../hl7/fhir/instance/model/Attachment.java | 16 +- .../fhir/instance/model/BackboneElement.java | 2 +- .../org/hl7/fhir/instance/model/Basic.java | 22 +- .../org/hl7/fhir/instance/model/Binary.java | 4 +- .../org/hl7/fhir/instance/model/BodySite.java | 10 +- .../org/hl7/fhir/instance/model/Bundle.java | 138 +- .../org/hl7/fhir/instance/model/CarePlan.java | 36 +- .../hl7/fhir/instance/model/CarePlan2.java | 24 +- .../fhir/instance/model/ClaimResponse.java | 50 +- .../instance/model/ClinicalAssessment.java | 50 +- .../org/hl7/fhir/instance/model/CodeType.java | 2 +- .../fhir/instance/model/CodeableConcept.java | 6 +- .../org/hl7/fhir/instance/model/Coding.java | 12 +- .../fhir/instance/model/Communication.java | 38 +- .../instance/model/CommunicationRequest.java | 46 +- .../hl7/fhir/instance/model/Composition.java | 68 +- .../hl7/fhir/instance/model/ConceptMap.java | 54 +- .../hl7/fhir/instance/model/Condition.java | 60 +- .../hl7/fhir/instance/model/Conformance.java | 92 +- .../hl7/fhir/instance/model/Constants.java | 4 +- .../hl7/fhir/instance/model/ContactPoint.java | 10 +- .../org/hl7/fhir/instance/model/Contract.java | 62 +- .../fhir/instance/model/Contraindication.java | 26 +- .../org/hl7/fhir/instance/model/Coverage.java | 44 +- .../hl7/fhir/instance/model/DataElement.java | 64 +- .../org/hl7/fhir/instance/model/Device.java | 38 +- .../fhir/instance/model/DeviceComponent.java | 22 +- .../hl7/fhir/instance/model/DeviceMetric.java | 64 +- .../fhir/instance/model/DeviceUseRequest.java | 30 +- .../instance/model/DeviceUseStatement.java | 22 +- .../fhir/instance/model/DiagnosticOrder.java | 132 +- .../fhir/instance/model/DiagnosticReport.java | 52 +- .../fhir/instance/model/DocumentManifest.java | 44 +- .../instance/model/DocumentReference.java | 98 +- .../fhir/instance/model/DomainResource.java | 8 +- .../org/hl7/fhir/instance/model/Element.java | 4 +- .../instance/model/ElementDefinition.java | 54 +- .../instance/model/EligibilityRequest.java | 14 +- .../instance/model/EligibilityResponse.java | 20 +- .../hl7/fhir/instance/model/Encounter.java | 68 +- .../instance/model/EnrollmentRequest.java | 28 +- .../instance/model/EnrollmentResponse.java | 20 +- .../fhir/instance/model/EpisodeOfCare.java | 34 +- .../instance/model/ExplanationOfBenefit.java | 20 +- .../hl7/fhir/instance/model/Extension.java | 12 +- .../instance/model/ExtensionDefinition.java | 56 +- .../fhir/instance/model/FamilyHistory.java | 12 +- .../org/hl7/fhir/instance/model/Goal.java | 12 +- .../org/hl7/fhir/instance/model/Group.java | 28 +- .../instance/model/HealthcareService.java | 52 +- .../hl7/fhir/instance/model/HumanName.java | 16 +- .../hl7/fhir/instance/model/Identifier.java | 14 +- .../model/ImagingObjectSelection.java | 20 +- .../hl7/fhir/instance/model/ImagingStudy.java | 58 +- .../hl7/fhir/instance/model/Immunization.java | 82 +- .../model/ImmunizationRecommendation.java | 18 +- .../hl7/fhir/instance/model/InstantType.java | 2 +- .../instance/model/InstitutionalClaim.java | 58 +- .../org/hl7/fhir/instance/model/List_.java | 30 +- .../org/hl7/fhir/instance/model/Location.java | 44 +- .../org/hl7/fhir/instance/model/Media.java | 34 +- .../hl7/fhir/instance/model/Medication.java | 24 +- .../model/MedicationAdministration.java | 64 +- .../instance/model/MedicationDispense.java | 72 +- .../model/MedicationPrescription.java | 88 +- .../instance/model/MedicationStatement.java | 48 +- .../fhir/instance/model/MessageHeader.java | 52 +- .../org/hl7/fhir/instance/model/Meta.java | 12 +- .../hl7/fhir/instance/model/NamingSystem.java | 22 +- .../hl7/fhir/instance/model/Narrative.java | 41 +- .../fhir/instance/model/NutritionOrder.java | 160 ++- .../hl7/fhir/instance/model/Observation.java | 134 +- .../instance/model/OperationDefinition.java | 68 +- .../fhir/instance/model/OperationOutcome.java | 2 +- .../fhir/instance/model/OralHealthClaim.java | 62 +- .../org/hl7/fhir/instance/model/Order.java | 26 +- .../fhir/instance/model/OrderResponse.java | 22 +- .../hl7/fhir/instance/model/Organization.java | 22 +- .../org/hl7/fhir/instance/model/Other.java | 22 +- .../hl7/fhir/instance/model/Parameters.java | 2 +- .../org/hl7/fhir/instance/model/Patient.java | 78 +- .../fhir/instance/model/PaymentNotice.java | 20 +- .../instance/model/PaymentReconciliation.java | 30 +- .../fhir/instance/model/PendedRequest.java | 22 +- .../org/hl7/fhir/instance/model/Period.java | 6 +- .../org/hl7/fhir/instance/model/Person.java | 36 +- .../fhir/instance/model/PharmacyClaim.java | 62 +- .../hl7/fhir/instance/model/Practitioner.java | 740 +++++----- .../hl7/fhir/instance/model/Procedure.java | 30 +- .../fhir/instance/model/ProcedureRequest.java | 32 +- .../instance/model/ProfessionalClaim.java | 58 +- .../org/hl7/fhir/instance/model/Profile.java | 50 +- .../hl7/fhir/instance/model/Provenance.java | 30 +- .../org/hl7/fhir/instance/model/Quantity.java | 12 +- .../fhir/instance/model/Questionnaire.java | 121 +- .../instance/model/QuestionnaireAnswers.java | 86 +- .../org/hl7/fhir/instance/model/Range.java | 6 +- .../org/hl7/fhir/instance/model/Ratio.java | 6 +- .../hl7/fhir/instance/model/Readjudicate.java | 22 +- .../hl7/fhir/instance/model/Reference.java | 78 +- .../fhir/instance/model/ReferralRequest.java | 38 +- .../fhir/instance/model/RelatedPerson.java | 24 +- .../org/hl7/fhir/instance/model/Resource.java | 8 +- .../hl7/fhir/instance/model/ResourceType.java | 328 ++--- .../org/hl7/fhir/instance/model/Reversal.java | 24 +- .../fhir/instance/model/RiskAssessment.java | 26 +- .../hl7/fhir/instance/model/SampledData.java | 16 +- .../org/hl7/fhir/instance/model/Schedule.java | 12 +- .../fhir/instance/model/SearchParameter.java | 26 +- .../fhir/instance/model/SecurityEvent.java | 44 +- .../org/hl7/fhir/instance/model/Slot.java | 20 +- .../org/hl7/fhir/instance/model/Specimen.java | 42 +- .../fhir/instance/model/StatusRequest.java | 18 +- .../fhir/instance/model/StatusResponse.java | 26 +- .../instance/model/StructureDefinition.java | 74 +- .../hl7/fhir/instance/model/Subscription.java | 28 +- .../hl7/fhir/instance/model/Substance.java | 14 +- .../org/hl7/fhir/instance/model/Supply.java | 28 +- .../model/SupportingDocumentation.java | 28 +- .../org/hl7/fhir/instance/model/TimeType.java | 2 +- .../org/hl7/fhir/instance/model/Timing.java | 6 +- .../org/hl7/fhir/instance/model/ValueSet.java | 56 +- .../hl7/fhir/instance/model/VisionClaim.java | 60 +- .../instance/model/VisionPrescription.java | 22 +- .../instance/model/annotations/Child.java | 4 +- .../uhn/fhir/model/ModelInheritanceTest.java | 228 +-- .../parser/ContainedResourceEncodingTest.java | 28 +- .../ca/uhn/fhir/parser/JsonParserTest.java | 100 +- .../ca/uhn/fhir/parser/XmlParserTest.java | 26 +- .../java/ca/uhn/fhir/model/dev/FhirDev.java | 7 - .../ca/uhn/fhir/model/dstu/FhirDstu1.java | 6 - .../ca/uhn/fhir/model/dstu2/FhirDstu2.java | 4 - src/site/xdoc/doc_rest_server.xml | 19 +- 182 files changed, 4954 insertions(+), 4872 deletions(-) diff --git a/examples/src/main/java/example/ExampleProviders.java b/examples/src/main/java/example/ExampleProviders.java index e3c17420884..2b22983972e 100644 --- a/examples/src/main/java/example/ExampleProviders.java +++ b/examples/src/main/java/example/ExampleProviders.java @@ -37,7 +37,9 @@ public class PlainProvider { //START SNIPPET: plainProviderServer public class ExampleServlet extends RestfulServer { - /** Constructor */ + /** + * Constructor + */ public ExampleServlet() { /* * Plain providers are passed to the server in the same way @@ -56,21 +58,23 @@ public class ExampleServlet extends RestfulServer { } //END SNIPPET: plainProviderServer -//START SNIPPET: addressStrategy -public class MyServlet extends RestfulServer { + //START SNIPPET: addressStrategy + public class MyServlet extends RestfulServer { - /** Constructor */ - public MyServlet() { - - String serverBaseUrl = "http://foo.com/fhir"; - setServerAddressStrategy(new HardcodedServerAddressStrategy(serverBaseUrl)); - - // ...add some resource providers, etc... - List resourceProviders = new ArrayList(); - setResourceProviders(resourceProviders); - } - - } + /** + * Constructor + */ + public MyServlet() { + + String serverBaseUrl = "http://foo.com/fhir"; + setServerAddressStrategy(new HardcodedServerAddressStrategy(serverBaseUrl)); + + // ...add some resource providers, etc... + List resourceProviders = new ArrayList(); + setResourceProviders(resourceProviders); + } + + } //END SNIPPET: addressStrategy diff --git a/examples/src/main/java/example/PagingPatientProvider.java b/examples/src/main/java/example/PagingPatientProvider.java index 0e4de55f57a..40c2f7b3f77 100644 --- a/examples/src/main/java/example/PagingPatientProvider.java +++ b/examples/src/main/java/example/PagingPatientProvider.java @@ -37,7 +37,7 @@ public class PagingPatientProvider implements IResourceProvider { */ return new IBundleProvider() { - @Override + @Override public int size() { return matchingResourceIds.size(); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java index df594b2bd84..ba87643ca92 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java @@ -105,7 +105,7 @@ public abstract class BaseRuntimeElementDefinition { return getImplementingClass().newInstance(); } else if (theArgument instanceof IValueSetEnumBinder) { return getImplementingClass().getConstructor(IValueSetEnumBinder.class).newInstance(theArgument); - }else { + } else { return getImplementingClass().getConstructor(IBaseEnumFactory.class).newInstance(theArgument); } } catch (InstantiationException e) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java index dc659f3b826..8618236db09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildEnumerationDatatypeDefinition.java @@ -30,29 +30,29 @@ import ca.uhn.fhir.model.api.annotation.Description; public class RuntimeChildEnumerationDatatypeDefinition extends RuntimeChildPrimitiveDatatypeDefinition { - private Class> myBinderType; - private volatile IBaseEnumFactory myBinder; + private Class> myBinderType; + private volatile IBaseEnumFactory myBinder; - public RuntimeChildEnumerationDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class theDatatype, Class> theBinderType) { - super(theField, theElementName, theDescriptionAnnotation, theChildAnnotation, theDatatype); + public RuntimeChildEnumerationDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class theDatatype, Class> theBinderType) { + super(theField, theElementName, theDescriptionAnnotation, theChildAnnotation, theDatatype); - myBinderType = theBinderType; - } + myBinderType = theBinderType; + } - @Override - public IBaseEnumFactory getInstanceConstructorArguments() { - IBaseEnumFactory retVal = myBinder; - if (retVal == null) { - try { - retVal = myBinderType.newInstance(); - } catch (InstantiationException e) { - throw new IllegalStateException("Failed to instantiate " + myBinderType, e); - } catch (IllegalAccessException e) { - throw new IllegalStateException("Failed to instantiate " + myBinderType, e); - } - myBinder = retVal; - } - return retVal; - } + @Override + public IBaseEnumFactory getInstanceConstructorArguments() { + IBaseEnumFactory retVal = myBinder; + if (retVal == null) { + try { + retVal = myBinderType.newInstance(); + } catch (InstantiationException e) { + throw new IllegalStateException("Failed to instantiate " + myBinderType, e); + } catch (IllegalAccessException e) { + throw new IllegalStateException("Failed to instantiate " + myBinderType, e); + } + myBinder = retVal; + } + return retVal; + } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java index ef5a7ecdefe..564aa30f333 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildPrimitiveDatatypeDefinition.java @@ -32,7 +32,6 @@ public class RuntimeChildPrimitiveDatatypeDefinition extends BaseRuntimeChildDat public RuntimeChildPrimitiveDatatypeDefinition(Field theField, String theElementName, Description theDescriptionAnnotation, Child theChildAnnotation, Class theDatatype) { super(theField, theElementName, theChildAnnotation, theDescriptionAnnotation, theDatatype); } - - + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java index 95a4374e695..831f57232b1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java @@ -31,7 +31,7 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.primitive.StringDt; -@DatatypeDef(name="Extension") +@DatatypeDef(name = "Extension") public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDatatype, IBaseExtension { private boolean myModifier; @@ -39,7 +39,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa @Child(name="url", type=StringDt.class, order=0, min=1, max=1) private StringDt myUrl; - @Child(name="value", type=IDatatype.class, order=1, min=0, max=1) + @Child(name = "value", type = IDatatype.class, order = 1, min = 0, max = 1) private IBaseDatatype myValue; public ExtensionDt() { @@ -66,12 +66,12 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa } /** - * Returns the URL for this extension. + * Returns the URL for this extension. *

    * Note that before HAPI 0.9 this method returned a {@link StringDt} but as of * HAPI 0.9 this method returns a plain string. This was changed because it does not make sense to use a StringDt here * since the URL itself can not contain extensions and it was therefore misleading. - *

    + *

    */ public String getUrl() { return myUrl != null ? myUrl.getValue() : null; @@ -79,7 +79,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa /** * Retained for backward compatibility - * + * * @see ExtensionDt#getUrl() */ public String getUrlAsString() { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java index b500b9db3b8..c86da291d8b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java @@ -30,6 +30,7 @@ import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.IServerConformanceProvider; import ca.uhn.fhir.rest.server.RestfulServer; +import org.hl7.fhir.instance.model.api.IBaseExtension; public interface IFhirVersion { @@ -49,4 +50,5 @@ public interface IFhirVersion { Class getContainedType(); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java index 3e80a0c0203..8f001f3da6a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java @@ -99,10 +99,10 @@ public @interface Child { // * HumanNameDt which adds extensions of your choosing) you could do that using a replacement field. // */ // String replaces() default ""; - + /** * For children which accept an {@link Enumeration} as the type, this - * field indicates the type to use for the enum factory + * field indicates the type to use for the enum factory */ Class> enumFactory() default NoEnumFactory.class; @@ -111,7 +111,7 @@ public @interface Child { private NoEnumFactory() { // non instantiable } - + @Override public Enum fromCode(String theCodeString) throws IllegalArgumentException { return null; @@ -121,7 +121,7 @@ public @interface Child { public String toCode(Enum theCode) { return null; } - + } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java index 84ec07659dd..6f62be61f23 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java @@ -59,9 +59,9 @@ public @interface SearchParamDefinition { *

    */ String[] compositeOf() default {}; - + /** - * For search params of type "reference", this can optionally be used to + * For search params of type "reference", this can optionally be used to * specify the resource type(s) that this parameter applies to. */ Class[] target() default {}; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java index 0fa0f93cda7..9bc961b5def 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java @@ -65,10 +65,17 @@ public abstract class BaseCodingDt extends BaseIdentifiableElement implements IC * A representation of the meaning of the code in the system, following the rules of the system. *

    */ - public abstract StringDt getDisplayElement(); - + public abstract StringDt getDisplayElement(); + public abstract BaseCodingDt setDisplay( String theString); + /* + todo: handle version + public abstract StringDt getVersion(); + + public abstract BaseCodingDt setVersion ( String theString); + */ + /** * {@inheritDoc} */ diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java index a1e3aaf5a29..c7b646ddeb0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java @@ -127,7 +127,7 @@ public class IdDt extends UriDt implements IPrimitiveDatatype { /** * Constructor - * + * * @param theResourceType * The resource type (e.g. "Patient") * @param theId diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index 54617540aa3..dad5d934391 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -552,11 +552,11 @@ public class JsonParser extends BaseParser implements IParser { if (primitive) { if (nextValue instanceof ISupportsUndeclaredExtensions) { List ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredExtensions(); - addToHeldExtensions(valueIdx, ext, extensions,false); + addToHeldExtensions(valueIdx, ext, extensions, false); ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredModifierExtensions(); - addToHeldExtensions(valueIdx, ext, modifierExtensions,true); - }else { + addToHeldExtensions(valueIdx, ext, modifierExtensions, true); + } else { if (nextValue instanceof IBaseHasExtensions) { IBaseHasExtensions element = (IBaseHasExtensions) nextValue; List> ext = element.getExtension(); @@ -1378,7 +1378,7 @@ public class JsonParser extends BaseParser implements IParser { if (myModifier) { theEventWriter.writeStartArray("modifierExtension"); - }else { + } else { theEventWriter.writeStartArray("extension"); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 4c7a1788fa7..7ab81f49569 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -822,16 +822,16 @@ class ParserState { } else { if (theIsModifier == false) { if (getCurrentElement() instanceof IBaseHasExtensions) { - IBaseExtension ext = ((IBaseHasExtensions)getCurrentElement()).addExtension(); + IBaseExtension ext = ((IBaseHasExtensions) getCurrentElement()).addExtension(); ext.setUrl(theUrlAttr); ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext); push(newState); } else { throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr); } - }else { + } else { if (getCurrentElement() instanceof IBaseHasModifierExtensions) { - IBaseExtension ext = ((IBaseHasModifierExtensions)getCurrentElement()).addModifierExtension(); + IBaseExtension ext = ((IBaseHasModifierExtensions) getCurrentElement()).addModifierExtension(); ext.setUrl(theUrlAttr); ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext); push(newState); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index 32704db43ea..2564b674a11 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -437,7 +437,7 @@ public class XmlParser extends BaseParser implements IParser { } private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition childDef, - String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException { if (nextValue.isEmpty()) { if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) { // We still want to go in.. @@ -516,7 +516,7 @@ public class XmlParser extends BaseParser implements IParser { } private void encodeCompositeElementChildrenToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List children, - boolean theIncludedResource) throws XMLStreamException, DataFormatException { + boolean theIncludedResource) throws XMLStreamException, DataFormatException { for (BaseRuntimeChildDefinition nextChild : children) { if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) { continue; @@ -598,7 +598,7 @@ public class XmlParser extends BaseParser implements IParser { } private void encodeCompositeElementToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition theElementDefinition, - boolean theIncludedResource) throws XMLStreamException, DataFormatException { + boolean theIncludedResource) throws XMLStreamException, DataFormatException { encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource); encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getExtensions(), theIncludedResource); encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getChildren(), theIncludedResource); @@ -646,7 +646,7 @@ public class XmlParser extends BaseParser implements IParser { } private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, - BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { + BaseRuntimeElementCompositeDefinition resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException { /* * DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy way to make that happen, but hopefully this won't matter as much once we use the * HL7 structures @@ -734,61 +734,18 @@ public class XmlParser extends BaseParser implements IParser { // HL7.org Structures encodeCompositeElementToStreamWriter(theResource, theResource, theEventWriter, resDef, theContainedResource); - InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED); - IdDt resourceId = resource.getId(); - if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) { - theEventWriter.writeStartElement("meta"); - String versionIdPart = resourceId.getVersionIdPart(); - if (isBlank(versionIdPart)) { - versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource); - } - writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart); - if (updated != null) { - writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString()); - } - - Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS); - if (securityLabelRawObj != null) { - List securityLabels = (List) securityLabelRawObj; - if (!securityLabels.isEmpty()) { - - for (BaseCodingDt securityLabel : securityLabels) { - theEventWriter.writeStartElement("security"); - - UriDt system = securityLabel.getSystemElement(); - if (system != null && !system.isEmpty()) - writeOptionalTagWithValue(theEventWriter, "system", system.getValueAsString()); - - CodeDt code = securityLabel.getCodeElement(); - if (code != null && !code.isEmpty()) - writeOptionalTagWithValue(theEventWriter, "code", code.getValueAsString()); - - StringDt display = securityLabel.getDisplayElement(); - if (display != null && !display.isEmpty()) - writeOptionalTagWithValue(theEventWriter, "display", display.getValueAsString()); - - /*todo: handle version - StringDt version = securityLabel.getVersion(); - if (version != null && ! version.isEmpty()) - writeOptionalTagWithValue(theEventWriter, "version", version.getValueAsString()); - */ - theEventWriter.writeEndElement(); - } - - } - } - - theEventWriter.writeEndElement(); - } } else { if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) { // DSTU2+ + + IResource resource = (IResource) theResource; writeOptionalTagWithValue(theEventWriter, "id", theResourceId); + InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED); IdDt resourceId = resource.getId(); if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) { @@ -801,6 +758,36 @@ public class XmlParser extends BaseParser implements IParser { if (updated != null) { writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString()); } + Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS); + if (securityLabelRawObj != null) { + List securityLabels = (List) securityLabelRawObj; + if (!securityLabels.isEmpty()) { + + for (BaseCodingDt securityLabel : securityLabels) { + theEventWriter.writeStartElement("security"); + + UriDt system = securityLabel.getSystemElement(); + if (system != null && !system.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "system", system.getValueAsString()); + + CodeDt code = securityLabel.getCodeElement(); + if (code != null && !code.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "code", code.getValueAsString()); + + StringDt display = securityLabel.getDisplayElement(); + if (display != null && !display.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "display", display.getValueAsString()); + + /*todo: handle version + StringDt version = securityLabel.getVersion(); + if (version != null && ! version.isEmpty()) + writeOptionalTagWithValue(theEventWriter, "version", version.getValueAsString()); + */ + theEventWriter.writeEndElement(); + } + + } + } theEventWriter.writeEndElement(); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java index 41cd049f4d5..0cd4a316e8e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java @@ -59,7 +59,7 @@ public abstract class BaseHttpClientInvocation { public abstract HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams, EncodingEnum theEncoding); protected static void appendExtraParamsWithQuestionMark(Map> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark) { - if (theExtraParams==null) { + if (theExtraParams == null) { return; } boolean first = theWithQuestionMark; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java index 8084e5e204c..613c91eacdc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java @@ -2,8 +2,8 @@ package ca.uhn.fhir.rest.gclient; public interface IBaseQuery { - T where(ICriterion theCriterion); + T where(ICriterion theCriterion); - T and(ICriterion theCriterion); + T and(ICriterion theCriterion); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java index 9bea778502a..85e09f648f4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java @@ -38,12 +38,11 @@ public interface ICreateTyped extends IClientExecutable[ResourceType]?[Parameters]
    , - * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 - * + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 * @since HAPI 0.9 / FHIR DSTU 2 */ ICreateTyped conditionalByUrl(String theSearchUrl); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java index 866c7652ef8..ccd30029fa4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java @@ -32,12 +32,11 @@ public interface IDelete { IDeleteTyped resourceById(String theResourceType, String theLogicalId); /** - * Specifies that the delete should be performed as a conditional delete - * against a given search URL. - * + * Specifies that the delete should be performed as a conditional delete + * against a given search URL. + * * @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters], - * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 - * + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 * @since HAPI 0.9 / FHIR DSTU 2 */ IDeleteTyped resourceConditionalByUrl(String theSearchUrl); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java index 0e14d5cda70..20ab12f4404 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java @@ -24,7 +24,7 @@ import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.rest.method.SearchStyleEnum; -public interface IQuery extends IClientExecutable, IBaseQuery { +public interface IQuery extends IClientExecutable, IBaseQuery { IQuery include(Include theIncludeManagingorganization); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java index e7f98612732..d8874fd1db1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java @@ -29,12 +29,11 @@ public interface IUpdateTyped extends IUpdateExecutable { IUpdateExecutable withId(String theId); /** - * Specifies that the update should be performed as a conditional create - * against a given search URL. - * + * Specifies that the update should be performed as a conditional create + * against a given search URL. + * * @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters], - * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 - * + * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366 * @since HAPI 0.9 / FHIR DSTU 2 */ IUpdateTyped conditionalByUrl(String theSearchUrl); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java index 37c8d260672..4ad33394b8e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java @@ -196,11 +196,11 @@ public class MethodUtil { public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, Map> theMatchParams) { StringBuilder b = new StringBuilder(); - + String resourceType = theContext.getResourceDefinition(theResource).getName(); b.append(resourceType); - - boolean haveQuestionMark=false; + + boolean haveQuestionMark = false; for (Entry> nextEntry : theMatchParams.entrySet()) { for (String nextValue : nextEntry.getValue()) { b.append(haveQuestionMark ? '&' : '?'); @@ -215,7 +215,7 @@ public class MethodUtil { } } - + HttpPutClientInvocation retVal; if (StringUtils.isBlank(theResourceBody)) { retVal = new HttpPutClientInvocation(theContext, theResource, b.toString()); @@ -231,9 +231,9 @@ public class MethodUtil { public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, String theMatchUrl) { HttpPutClientInvocation retVal; if (StringUtils.isBlank(theResourceBody)) { - retVal = new HttpPutClientInvocation(theContext, theResource, theMatchUrl); + retVal = new HttpPutClientInvocation(theContext, theResource, theMatchUrl); } else { - retVal = new HttpPutClientInvocation(theContext, theResourceBody, false,theMatchUrl); + retVal = new HttpPutClientInvocation(theContext, theResourceBody, false, theMatchUrl); } addTagsToPostOrPut(theResource, retVal); @@ -244,10 +244,10 @@ public class MethodUtil { public static EncodingEnum detectEncoding(String theBody) { for (int i = 0; i < theBody.length(); i++) { switch (theBody.charAt(i)) { - case '<': - return EncodingEnum.XML; - case '{': - return EncodingEnum.JSON; + case '<': + return EncodingEnum.XML; + case '{': + return EncodingEnum.JSON; } } return EncodingEnum.XML; @@ -502,26 +502,26 @@ public class MethodUtil { public static IQueryParameterAnd parseQueryParams(RuntimeSearchParam theParamDef, String theUnqualifiedParamName, List theParameters) { QueryParameterAndBinder binder = null; switch (theParamDef.getParamType()) { - case COMPOSITE: - throw new UnsupportedOperationException(); - case DATE: - binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.> emptyList()); - break; - case NUMBER: - binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.> emptyList()); - break; - case QUANTITY: - binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.> emptyList()); - break; - case REFERENCE: - binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.> emptyList()); - break; - case STRING: - binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.> emptyList()); - break; - case TOKEN: - binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.> emptyList()); - break; + case COMPOSITE: + throw new UnsupportedOperationException(); + case DATE: + binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.>emptyList()); + break; + case NUMBER: + binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.>emptyList()); + break; + case QUANTITY: + binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.>emptyList()); + break; + case REFERENCE: + binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.>emptyList()); + break; + case STRING: + binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.>emptyList()); + break; + case TOKEN: + binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.>emptyList()); + break; } return binder.parse(theUnqualifiedParamName, theParameters); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java index dbd875641e6..a087c927640 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java @@ -49,8 +49,7 @@ import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; -public class InternalCodingDt - extends BaseCodingDt implements ICompositeDatatype +public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype { /** diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java index ab56defe694..21eceaedee0 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java @@ -2,24 +2,21 @@ package org.hl7.fhir.instance.model.api; public interface IBaseEnumFactory> { - /** - * Read an enumeration value from the string that represents it on the XML or JSON - * - * @param codeString - * the value found in the XML or JSON - * @return the enumeration value - * @throws IllegalArgumentException - * is the value is not known - */ - public T fromCode(String codeString) throws IllegalArgumentException; + /** + * Read an enumeration value from the string that represents it on the XML or JSON + * + * @param codeString the value found in the XML or JSON + * @return the enumeration value + * @throws IllegalArgumentException is the value is not known + */ + public T fromCode(String codeString) throws IllegalArgumentException; - /** - * Get the XML/JSON representation for an enumerated value - * - * @param code - * - the enumeration value - * @return the XML/JSON representation - */ - public String toCode(T code); + /** + * Get the XML/JSON representation for an enumerated value + * + * @param code - the enumeration value + * @return the XML/JSON representation + */ + public String toCode(T code); } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java index 0d0dbf01aec..6276ba13a8c 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java @@ -6,14 +6,14 @@ import org.hl7.fhir.instance.model.ICompositeType; public interface IBaseExtension extends ICompositeType { - List getExtension(); - + List getExtension(); + String getUrl(); - + IBaseDatatype getValue(); T setUrl(String theUrl); - + T setValue(IBaseDatatype theValue); } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java index 257b7466478..9ae4ffcb334 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java @@ -4,8 +4,8 @@ import java.util.List; public interface IBaseHasExtensions { - public List> getExtension(); + public List> getExtension(); + + public IBaseExtension addExtension(); - public IBaseExtension addExtension(); - } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java index 23cba0358a3..074a3df228d 100644 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java @@ -4,8 +4,8 @@ import java.util.List; public interface IBaseHasModifierExtensions { - public List> getModifierExtension(); + public List> getModifierExtension(); - public IBaseExtension addModifierExtension(); + public IBaseExtension addModifierExtension(); } diff --git a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java index 113baa19ce1..f11e483cad1 100644 --- a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java +++ b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java @@ -21,8 +21,8 @@ public class MultiVersionJsonParserTest { String str = FhirContext.forDstu2().newJsonParser().encodeResourceToString(p); ourLog.info(str); - - assertThat(str,StringContains.containsString("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#ext\",\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}")); + + assertThat(str, StringContains.containsString("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#ext\",\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}")); } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java index 16b747575b4..498cfe17aec 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java @@ -600,12 +600,12 @@ public abstract class BaseFhirDao implements IDao { String qualifier = null; for (int i = 0; i < paramMap.size(); i++) { switch (paramName.charAt(i)) { - case '.': - case ':': - qualifier = paramName.substring(i); - paramName = paramName.substring(0, i); - i = Integer.MAX_VALUE; - break; + case '.': + case ':': + qualifier = paramName.substring(i); + paramName = paramName.substring(0, i); + i = Integer.MAX_VALUE; + break; } } @@ -889,7 +889,7 @@ public abstract class BaseFhirDao implements IDao { } protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull) { - return updateEntity(theResource, entity, theUpdateHistory, theDeletedTimestampOrNull, true,true); + return updateEntity(theResource, entity, theUpdateHistory, theDeletedTimestampOrNull, true, true); } protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull, boolean thePerformIndexing, boolean theUpdateVersion) { @@ -972,7 +972,7 @@ public abstract class BaseFhirDao implements IDao { entity.setHasLinks(links.isEmpty() == false); } else { - + populateResourceIntoEntity(theResource, entity); entity.setUpdated(new Date()); entity.setLanguage(theResource.getLanguage().getValue()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java index 89cef618eab..57491a178a8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java @@ -6,31 +6,31 @@ import ca.uhn.fhir.rest.api.MethodOutcome; public class DaoMethodOutcome extends MethodOutcome { - private ResourceTable myEntity; - private IResource myResource; + private ResourceTable myEntity; + private IResource myResource; - public ResourceTable getEntity() { - return myEntity; - } + public ResourceTable getEntity() { + return myEntity; + } - public IResource getResource() { - return myResource; - } + public IResource getResource() { + return myResource; + } - @Override - public DaoMethodOutcome setCreated(Boolean theCreated) { - super.setCreated(theCreated); - return this; - } + @Override + public DaoMethodOutcome setCreated(Boolean theCreated) { + super.setCreated(theCreated); + return this; + } - public DaoMethodOutcome setEntity(ResourceTable theEntity) { - myEntity = theEntity; - return this; - } + public DaoMethodOutcome setEntity(ResourceTable theEntity) { + myEntity = theEntity; + return this; + } - public DaoMethodOutcome setResource(IResource theResource) { - myResource = theResource; - return this; - } + public DaoMethodOutcome setResource(IResource theResource) { + myResource = theResource; + return this; + } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java index a7f0f8f9e3a..98708c725e6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java @@ -668,7 +668,7 @@ public class FhirResourceDao extends BaseFhirDao implements myEntityManager.persist(newEntity); myEntityManager.merge(entity); notifyWriteCompleted(); - ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId, w.getMillisAndRestart() }); + ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[]{theScheme, theTerm, theId, w.getMillisAndRestart()}); } @Override @@ -911,7 +911,7 @@ public class FhirResourceDao extends BaseFhirDao implements } Long pid = resource.iterator().next(); - + ResourceTable entity = myEntityManager.find(ResourceTable.class, pid); ResourceTable savedEntity = updateEntity(null, entity, true, new Date()); @@ -1190,7 +1190,7 @@ public class FhirResourceDao extends BaseFhirDao implements myEntityManager.merge(entity); - ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId.getValue(), w.getMillisAndRestart() }); + ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[]{theScheme, theTerm, theId.getValue(), w.getMillisAndRestart()}); } @Override @@ -1331,7 +1331,8 @@ public class FhirResourceDao extends BaseFhirDao implements } retVal.addAll(resources); } - } while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit()); + } + while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit()); if (previouslyLoadedPids.size() >= getConfig().getIncludeLimit()) { OperationOutcome oo = new OperationOutcome(); @@ -1351,7 +1352,7 @@ public class FhirResourceDao extends BaseFhirDao implements } }; - ourLog.info("Processed search for {} on {} in {}ms", new Object[] { myResourceName, theParams, w.getMillisAndRestart() }); + ourLog.info("Processed search for {} on {} in {}ms", new Object[]{myResourceName, theParams, w.getMillisAndRestart()}); return retVal; } @@ -1436,62 +1437,62 @@ public class FhirResourceDao extends BaseFhirDao implements RuntimeSearchParam nextParamDef = resourceDef.getSearchParam(nextParamName); if (nextParamDef != null) { switch (nextParamDef.getParamType()) { - case DATE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateDate(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + case DATE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateDate(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case QUANTITY: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateQuantity(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case QUANTITY: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateQuantity(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case REFERENCE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateReference(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case REFERENCE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateReference(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case STRING: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateString(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case STRING: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateString(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case TOKEN: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateToken(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case TOKEN: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateToken(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case NUMBER: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateNumber(nextParamName, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case NUMBER: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateNumber(nextParamName, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; - case COMPOSITE: - for (List nextAnd : nextParamEntry.getValue()) { - pids = addPredicateComposite(nextParamDef, pids, nextAnd); - if (pids.isEmpty()) { - return new HashSet(); + break; + case COMPOSITE: + for (List nextAnd : nextParamEntry.getValue()) { + pids = addPredicateComposite(nextParamDef, pids, nextAnd); + if (pids.isEmpty()) { + return new HashSet(); + } } - } - break; + break; } } } @@ -1568,14 +1569,14 @@ public class FhirResourceDao extends BaseFhirDao implements @Override public DaoMethodOutcome update(T theResource) { - return update(theResource,null); + return update(theResource, null); } - + @Override public DaoMethodOutcome update(T theResource, String theMatchUrl) { return update(theResource, theMatchUrl, true); } - + @Override public DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing) { StopWatch w = new StopWatch(); @@ -1599,7 +1600,7 @@ public class FhirResourceDao extends BaseFhirDao implements resourceId = theResource.getId(); entity = readEntityLatestVersion(resourceId); } - + if (resourceId.hasVersionIdPart() && resourceId.getVersionIdPartAsLong().longValue() != entity.getVersion()) { throw new InvalidRequestException("Trying to update " + resourceId + " but this is not the current version"); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java index ba5bb94376d..447ae924e37 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java @@ -160,91 +160,91 @@ public class FhirSystemDaoDstu2 extends BaseFhirSystemDao { } switch (verb) { - case POST: { - // CREATE - @SuppressWarnings("rawtypes") - IFhirResourceDao resourceDao = getDao(res.getClass()); - res.setId(null); - DaoMethodOutcome outcome; - Entry newEntry = response.addEntry(); - outcome = resourceDao.create(res, nextEntry.getTransaction().getIfNoneExist(), false); - handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); - break; - } - case DELETE: { - // DELETE - Entry newEntry = response.addEntry(); - String url = extractTransactionUrlOrThrowException(nextEntry, verb); - UrlParts parts = parseUrl(verb.getCode(), url); - if (parts.getResourceId() != null) { - parts.getDao().delete(new IdDt(parts.getResourceType(), parts.getResourceId())); - } else { - parts.getDao().deleteByUrl(parts.getResourceType() + '?' + parts.getParams()); - } - - newEntry.getTransactionResponse().setStatus(Integer.toString(Constants.STATUS_HTTP_204_NO_CONTENT)); - break; - } - case PUT: { - // UPDATE - @SuppressWarnings("rawtypes") - IFhirResourceDao resourceDao = getDao(res.getClass()); - - DaoMethodOutcome outcome; - Entry newEntry = response.addEntry(); - - String url = extractTransactionUrlOrThrowException(nextEntry, verb); - - UrlParts parts = parseUrl(verb.getCode(), url); - if (parts.getResourceId() != null) { - res.setId(new IdDt(parts.getResourceType(), parts.getResourceId())); - outcome = resourceDao.update(res, null, false); - } else { + case POST: { + // CREATE + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = getDao(res.getClass()); res.setId(null); - outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false); + DaoMethodOutcome outcome; + Entry newEntry = response.addEntry(); + outcome = resourceDao.create(res, nextEntry.getTransaction().getIfNoneExist(), false); + handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); + break; } - - handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); - break; - } - case GET: { - // SEARCH/READ/VREAD - String url = extractTransactionUrlOrThrowException(nextEntry, verb); - UrlParts parts = parseUrl(verb.getCode(), url); - - @SuppressWarnings("rawtypes") - IFhirResourceDao resourceDao = parts.getDao(); - - if (parts.getResourceId() != null && parts.getParams() == null) { - IResource found; - if (parts.getVersionId() != null) { - found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId(), parts.getVersionId())); + case DELETE: { + // DELETE + Entry newEntry = response.addEntry(); + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + UrlParts parts = parseUrl(verb.getCode(), url); + if (parts.getResourceId() != null) { + parts.getDao().delete(new IdDt(parts.getResourceType(), parts.getResourceId())); } else { - found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId())); + parts.getDao().deleteByUrl(parts.getResourceType() + '?' + parts.getParams()); + } + + newEntry.getTransactionResponse().setStatus(Integer.toString(Constants.STATUS_HTTP_204_NO_CONTENT)); + break; + } + case PUT: { + // UPDATE + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = getDao(res.getClass()); + + DaoMethodOutcome outcome; + Entry newEntry = response.addEntry(); + + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + + UrlParts parts = parseUrl(verb.getCode(), url); + if (parts.getResourceId() != null) { + res.setId(new IdDt(parts.getResourceType(), parts.getResourceId())); + outcome = resourceDao.update(res, null, false); + } else { + res.setId(null); + outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false); + } + + handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry); + break; + } + case GET: { + // SEARCH/READ/VREAD + String url = extractTransactionUrlOrThrowException(nextEntry, verb); + UrlParts parts = parseUrl(verb.getCode(), url); + + @SuppressWarnings("rawtypes") + IFhirResourceDao resourceDao = parts.getDao(); + + if (parts.getResourceId() != null && parts.getParams() == null) { + IResource found; + if (parts.getVersionId() != null) { + found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId(), parts.getVersionId())); + } else { + found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId())); + } + EntryTransactionResponse resp = response.addEntry().setResource(found).getTransactionResponse(); + resp.setLocation(found.getId().toUnqualified().getValue()); + resp.addEtag(found.getId().getVersionIdPart()); + } else if (parts.getParams() != null) { + RuntimeResourceDefinition def = getContext().getResourceDefinition(parts.getDao().getResourceType()); + SearchParameterMap params = translateMatchUrl(url, def); + IBundleProvider bundle = parts.getDao().search(params); + + Bundle searchBundle = new Bundle(); + searchBundle.setTotal(bundle.size()); + + int configuredMax = 100; // this should probably be configurable or something + if (bundle.size() > configuredMax) { + oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Search nested within transaction found more than " + configuredMax + " matches, but paging is not supported in nested transactions"); + } + List resourcesToAdd = bundle.getResources(0, Math.min(bundle.size(), configuredMax)); + for (IResource next : resourcesToAdd) { + searchBundle.addEntry().setResource(next); + } + + response.addEntry().setResource(searchBundle); } - EntryTransactionResponse resp = response.addEntry().setResource(found).getTransactionResponse(); - resp.setLocation(found.getId().toUnqualified().getValue()); - resp.addEtag(found.getId().getVersionIdPart()); - } else if (parts.getParams() != null) { - RuntimeResourceDefinition def = getContext().getResourceDefinition(parts.getDao().getResourceType()); - SearchParameterMap params = translateMatchUrl(url, def); - IBundleProvider bundle = parts.getDao().search(params); - - Bundle searchBundle = new Bundle(); - searchBundle.setTotal(bundle.size()); - - int configuredMax = 100; // this should probably be configurable or something - if (bundle.size() > configuredMax) { - oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Search nested within transaction found more than " + configuredMax + " matches, but paging is not supported in nested transactions"); - } - List resourcesToAdd = bundle.getResources(0, Math.min(bundle.size(), configuredMax)); - for (IResource next : resourcesToAdd) { - searchBundle.addEntry().setResource(next); - } - - response.addEntry().setResource(searchBundle); } - } } } @@ -452,7 +452,7 @@ public class FhirSystemDaoDstu2 extends BaseFhirSystemDao { // } long delay = System.currentTimeMillis() - start; - ourLog.info("Transaction completed in {}ms", new Object[] { delay }); + ourLog.info("Transaction completed in {}ms", new Object[]{delay}); oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDetails("Transaction completed in " + delay + "ms"); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java index e5ac694c129..2fc5724d695 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java @@ -41,9 +41,8 @@ public interface IFhirResourceDao extends IDao { DaoMethodOutcome create(T theResource, String theIfNoneExist); /** - * @param thePerformIndexing - * Use with caution! If you set this to false, you need to manually perform indexing or your resources - * won't be indexed and searches won't work. + * @param thePerformIndexing Use with caution! If you set this to false, you need to manually perform indexing or your resources + * won't be indexed and searches won't work. */ DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing); @@ -75,9 +74,8 @@ public interface IFhirResourceDao extends IDao { BaseHasResource readEntity(IdDt theId); /** - * @param theCheckForForcedId - * If true, this method should fail if the requested ID contains a numeric PID which exists, but is - * obscured by a "forced ID" so should not exist as far as the outside world is concerned. + * @param theCheckForForcedId If true, this method should fail if the requested ID contains a numeric PID which exists, but is + * obscured by a "forced ID" so should not exist as far as the outside world is concerned. */ BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java index b459b0c1ca9..e3c2a0512ea 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java @@ -34,11 +34,11 @@ import javax.persistence.UniqueConstraint; //@formatter:off @Entity() -@Table(name = "HFJ_FORCED_ID", uniqueConstraints = { - @UniqueConstraint(name = "IDX_FORCEDID", columnNames = { "FORCED_ID" }) +@Table(name = "HFJ_FORCED_ID", uniqueConstraints = { + @UniqueConstraint(name = "IDX_FORCEDID", columnNames = {"FORCED_ID"}) }) -@NamedQueries(value= { - @NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID") +@NamedQueries(value = { + @NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID") }) //@formatter:on public class ForcedId { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java index f16b60020fc..47a0b8e9e99 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java @@ -114,7 +114,7 @@ public class FhirResourceDaoTest { p.addIdentifier().setSystem("urn:system").setValue(methodName); p.addName().addFamily("Hello"); p.setId("Patient/" + methodName); - + ourPatientDao.update(p, "Patient?identifier=urn%3Asystem%7C" + methodName); p = ourPatientDao.read(id.toVersionless()); @@ -125,7 +125,7 @@ public class FhirResourceDaoTest { } - + @Test public void testCreateNumericIdFails() { Patient p = new Patient(); @@ -140,7 +140,7 @@ public class FhirResourceDaoTest { } } - + @Test public void testDeleteWithMatchUrl() { String methodName = "testDeleteWithMatchUrl"; @@ -171,14 +171,14 @@ public class FhirResourceDaoTest { IBundleProvider history = ourPatientDao.history(id, null); assertEquals(2, history.size()); - + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0))); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue()); - assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1,1).get(0))); - + assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0))); + } - + @Test public void testCreateWithIfNoneExist() { String methodName = "testCreateWithIfNoneExist"; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java index f50971f412f..fae4bd72bcd 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java @@ -34,381 +34,381 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; public class FhirSystemDaoDstu1Test { - private static ClassPathXmlApplicationContext ourCtx; - private static FhirContext ourFhirContext; - private static IFhirResourceDao ourLocationDao; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu1Test.class); - private static IFhirResourceDao ourObservationDao; - private static IFhirResourceDao ourPatientDao; - private static IFhirSystemDao> ourSystemDao; + private static ClassPathXmlApplicationContext ourCtx; + private static FhirContext ourFhirContext; + private static IFhirResourceDao ourLocationDao; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu1Test.class); + private static IFhirResourceDao ourObservationDao; + private static IFhirResourceDao ourPatientDao; + private static IFhirSystemDao> ourSystemDao; - @Test - public void testGetResourceCounts() { - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01"); - ourObservationDao.create(obs); + @Test + public void testGetResourceCounts() { + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01"); + ourObservationDao.create(obs); - Map oldCounts = ourSystemDao.getResourceCounts(); + Map oldCounts = ourSystemDao.getResourceCounts(); - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01"); - patient.addName().addFamily("Tester").addGiven("Joe"); - ourPatientDao.create(patient); + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01"); + patient.addName().addFamily("Tester").addGiven("Joe"); + ourPatientDao.create(patient); - Map newCounts = ourSystemDao.getResourceCounts(); + Map newCounts = ourSystemDao.getResourceCounts(); - if (oldCounts.containsKey("Patient")) { - assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient")); - } else { - assertEquals(1L, (long) newCounts.get("Patient")); - } + if (oldCounts.containsKey("Patient")) { + assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient")); + } else { + assertEquals(1L, (long) newCounts.get("Patient")); + } - assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation")); + assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation")); - } + } - @Test - public void testHistory() throws Exception { - Date start = new Date(); - Thread.sleep(10); + @Test + public void testHistory() throws Exception { + Date start = new Date(); + Thread.sleep(10); - Patient patient = new Patient(); - patient.addIdentifier().setSystem("urn:system").setValue("testHistory"); - patient.addName().addFamily("Tester").addGiven("Joe"); - IdDt pid = ourPatientDao.create(patient).getId().toVersionless(); + Patient patient = new Patient(); + patient.addIdentifier().setSystem("urn:system").setValue("testHistory"); + patient.addName().addFamily("Tester").addGiven("Joe"); + IdDt pid = ourPatientDao.create(patient).getId().toVersionless(); - Thread.sleep(10); - patient.setId(pid); - IdDt newpid = ourPatientDao.update(patient).getId(); + Thread.sleep(10); + patient.setId(pid); + IdDt newpid = ourPatientDao.update(patient).getId(); - Thread.sleep(10); - patient.setId(pid); - IdDt newpid2 = ourPatientDao.update(patient).getId(); + Thread.sleep(10); + patient.setId(pid); + IdDt newpid2 = ourPatientDao.update(patient).getId(); - Thread.sleep(10); - patient.setId(pid); - IdDt newpid3 = ourPatientDao.update(patient).getId(); + Thread.sleep(10); + patient.setId(pid); + IdDt newpid3 = ourPatientDao.update(patient).getId(); - IBundleProvider values = ourSystemDao.history(start); - assertEquals(4, values.size()); + IBundleProvider values = ourSystemDao.history(start); + assertEquals(4, values.size()); - List res = values.getResources(0, 4); - assertEquals(newpid3, res.get(0).getId()); - assertEquals(newpid2, res.get(1).getId()); - assertEquals(newpid, res.get(2).getId()); - assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless()); + List res = values.getResources(0, 4); + assertEquals(newpid3, res.get(0).getId()); + assertEquals(newpid2, res.get(1).getId()); + assertEquals(newpid, res.get(2).getId()); + assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless()); - Location loc = new Location(); - loc.getAddress().addLine("AAA"); - IdDt lid = ourLocationDao.create(loc).getId(); + Location loc = new Location(); + loc.getAddress().addLine("AAA"); + IdDt lid = ourLocationDao.create(loc).getId(); - Location loc2 = new Location(); - loc2.getAddress().addLine("AAA"); - ourLocationDao.create(loc2).getId(); + Location loc2 = new Location(); + loc2.getAddress().addLine("AAA"); + ourLocationDao.create(loc2).getId(); - Thread.sleep(2000); + Thread.sleep(2000); - values = ourLocationDao.history(start); - assertEquals(2, values.size()); + values = ourLocationDao.history(start); + assertEquals(2, values.size()); - values = ourLocationDao.history(lid.getIdPartAsLong(), start); - assertEquals(1, values.size()); + values = ourLocationDao.history(lid.getIdPartAsLong(), start); + assertEquals(1, values.size()); - } + } - @Test - public void testPersistWithSimpleLink() { - Patient patient = new Patient(); - patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01")); - patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); - patient.addName().addFamily("Tester").addGiven("Joe"); + @Test + public void testPersistWithSimpleLink() { + Patient patient = new Patient(); + patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01")); + patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + patient.addName().addFamily("Tester").addGiven("Joe"); - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01")); + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01")); - ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); + ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); - String patientId = (patient.getId().getIdPart()); - String obsId = (obs.getId().getIdPart()); + String patientId = (patient.getId().getIdPart()); + String obsId = (obs.getId().getIdPart()); - // assertThat(patientId, greaterThan(0L)); - // assertEquals(patientVersion, 1L); - // assertThat(obsId, greaterThan(patientId)); - // assertEquals(obsVersion, 1L); + // assertThat(patientId, greaterThan(0L)); + // assertEquals(patientVersion, 1L); + // assertThat(obsId, greaterThan(patientId)); + // assertEquals(obsVersion, 1L); - // Try to search + // Try to search - IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01")); - assertEquals(1, obsResults.size()); + IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01")); + assertEquals(1, obsResults.size()); - IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01")); - assertEquals(1, obsResults.size()); + IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01")); + assertEquals(1, obsResults.size()); - IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId(); - ResourceReferenceDt subject = obs.getSubject(); - assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart()); + IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId(); + ResourceReferenceDt subject = obs.getSubject(); + assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart()); - // Update + // Update - patient = (Patient) patResults.getResources(0, 1).get(0); - obs = (Observation) obsResults.getResources(0, 1).get(0); - patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02"); + patient = (Patient) patResults.getResources(0, 1).get(0); + obs = (Observation) obsResults.getResources(0, 1).get(0); + patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02"); - ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); + ourSystemDao.transaction(Arrays.asList((IResource) patient, obs)); - String patientId2 = (patient.getId().getIdPart()); - String patientVersion2 = (patient.getId().getVersionIdPart()); - String obsId2 = (obs.getId().getIdPart()); - String obsVersion2 = (obs.getId().getVersionIdPart()); + String patientId2 = (patient.getId().getIdPart()); + String patientVersion2 = (patient.getId().getVersionIdPart()); + String obsId2 = (obs.getId().getIdPart()); + String obsVersion2 = (obs.getId().getVersionIdPart()); - assertEquals(patientId, patientId2); - assertEquals(patientVersion2, "2"); - assertEquals(obsId, obsId2); - assertEquals(obsVersion2, "2"); + assertEquals(patientId, patientId2); + assertEquals(patientVersion2, "2"); + assertEquals(obsId, obsId2); + assertEquals(obsVersion2, "2"); - } + } - @Test - public void testPersistWithUnknownId() { - Observation obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/999998888888")); + @Test + public void testPersistWithUnknownId() { + Observation obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/999998888888")); - try { - ourSystemDao.transaction(Arrays.asList((IResource) obs)); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject")); - } + try { + ourSystemDao.transaction(Arrays.asList((IResource) obs)); + } catch (InvalidRequestException e) { + assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject")); + } - obs = new Observation(); - obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); - obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4")); + obs = new Observation(); + obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01"); + obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4")); - try { - ourSystemDao.transaction(Arrays.asList((IResource) obs)); - } catch (InvalidRequestException e) { - assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject")); - } + try { + ourSystemDao.transaction(Arrays.asList((IResource) obs)); + } catch (InvalidRequestException e) { + assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject")); + } - } + } - @Test - public void testTagOperationss() throws Exception { + @Test + public void testTagOperationss() throws Exception { - TagList preSystemTl = ourSystemDao.getAllTags(); + TagList preSystemTl = ourSystemDao.getAllTags(); - TagList tl1 = new TagList(); - tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1"); - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01"); - ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1); - ourPatientDao.create(p1); + TagList tl1 = new TagList(); + tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1"); + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01"); + ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1); + ourPatientDao.create(p1); - TagList tl2 = new TagList(); - tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2"); - Observation o1 = new Observation(); - o1.getName().setText("testGetAllTags02"); - ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2); - IdDt o1id = ourObservationDao.create(o1).getId(); - assertTrue(o1id.getVersionIdPart() != null); + TagList tl2 = new TagList(); + tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2"); + Observation o1 = new Observation(); + o1.getName().setText("testGetAllTags02"); + ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2); + IdDt o1id = ourObservationDao.create(o1).getId(); + assertTrue(o1id.getVersionIdPart() != null); - TagList postSystemTl = ourSystemDao.getAllTags(); - assertEquals(preSystemTl.size() + 2, postSystemTl.size()); - assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); + TagList postSystemTl = ourSystemDao.getAllTags(); + assertEquals(preSystemTl.size() + 2, postSystemTl.size()); + assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); - TagList tags = ourPatientDao.getAllResourceTags(); - assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); - assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + TagList tags = ourPatientDao.getAllResourceTags(); + assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel()); + assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - TagList tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); + TagList tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); - o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST); - o1.setId(o1id); - IdDt o1id2 = ourObservationDao.update(o1).getId(); - assertTrue(o1id2.getVersionIdPart() != null); + o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST); + o1.setId(o1id); + IdDt o1id2 = ourObservationDao.update(o1).getId(); + assertTrue(o1id2.getVersionIdPart() != null); - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel()); - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); /* - * Remove a tag from a version + * Remove a tag from a version */ - ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2"); - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2"); + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); /* * Add a tag */ - ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3"); - tags2 = ourObservationDao.getTags(o1id2); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3")); - assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel()); + ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3"); + tags2 = ourObservationDao.getTags(o1id2); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3")); + assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel()); - tags2 = ourObservationDao.getTags(o1id); - assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); - assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); + tags2 = ourObservationDao.getTags(o1id); + assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1")); + assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2")); - } + } - @Test(expected = InvalidRequestException.class) - public void testTransactionFailsWithDuplicateIds() { - Patient patient1 = new Patient(); - patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + @Test(expected = InvalidRequestException.class) + public void testTransactionFailsWithDuplicateIds() { + Patient patient1 = new Patient(); + patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); - Patient patient2 = new Patient(); - patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + Patient patient2 = new Patient(); + patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); - ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2)); - } + ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2)); + } - @Test - public void testTransactionFromBundle() throws Exception { + @Test + public void testTransactionFromBundle() throws Exception { - InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml"); - Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes)); - List res = bundle.toListOfResources(); + InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml"); + Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes)); + List res = bundle.toListOfResources(); - ourSystemDao.transaction(res); + ourSystemDao.transaction(res); - Patient p1 = (Patient) res.get(0); - String id = p1.getId().getValue(); - ourLog.info("ID: {}", id); - assertThat(id, not(equalToIgnoringCase("74635"))); - assertThat(id, not(equalToIgnoringCase(""))); - } + Patient p1 = (Patient) res.get(0); + String id = p1.getId().getValue(); + ourLog.info("ID: {}", id); + assertThat(id, not(equalToIgnoringCase("74635"))); + assertThat(id, not(equalToIgnoringCase(""))); + } - /** - * Issue #55 - */ - @Test - public void testTransactionWithCidIds() throws Exception { - List res = new ArrayList(); + /** + * Issue #55 + */ + @Test + public void testTransactionWithCidIds() throws Exception { + List res = new ArrayList(); - Patient p1 = new Patient(); - p1.setId("cid:patient1"); - p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); - res.add(p1); + Patient p1 = new Patient(); + p1.setId("cid:patient1"); + p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); + res.add(p1); - Observation o1 = new Observation(); - o1.setId("cid:observation1"); - o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); - o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - res.add(o1); + Observation o1 = new Observation(); + o1.setId("cid:observation1"); + o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); + o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + res.add(o1); - Observation o2 = new Observation(); - o2.setId("cid:observation2"); - o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); - o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - res.add(o2); + Observation o2 = new Observation(); + o2.setId("cid:observation2"); + o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); + o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + res.add(o2); - ourSystemDao.transaction(res); + ourSystemDao.transaction(res); - assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); - assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); - assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); + assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); + assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); + assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); - assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - } + } - @Test - public void testTransactionWithDelete() throws Exception { + @Test + public void testTransactionWithDelete() throws Exception { /* * Create 3 */ - List res; - res = new ArrayList(); + List res; + res = new ArrayList(); - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p1); + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p1); - Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p2); + Patient p2 = new Patient(); + p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p2); - Patient p3 = new Patient(); - p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - res.add(p3); + Patient p3 = new Patient(); + p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + res.add(p3); - ourSystemDao.transaction(res); + ourSystemDao.transaction(res); /* * Verify */ - IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); - assertEquals(3, results.size()); + IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); + assertEquals(3, results.size()); /* * Now delete 2 */ - res = new ArrayList(); - List existing = results.getResources(0, 3); + res = new ArrayList(); + List existing = results.getResources(0, 3); - p1 = new Patient(); - p1.setId(existing.get(0).getId()); - ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); - res.add(p1); + p1 = new Patient(); + p1.setId(existing.get(0).getId()); + ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); + res.add(p1); - p2 = new Patient(); - p2.setId(existing.get(1).getId()); - ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); - res.add(p2); + p2 = new Patient(); + p2.setId(existing.get(1).getId()); + ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); + res.add(p2); - ourSystemDao.transaction(res); + ourSystemDao.transaction(res); /* * Verify */ - IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); - assertEquals(1, results2.size()); - List existing2 = results2.getResources(0, 1); - assertEquals(existing2.get(0).getId(), existing.get(2).getId()); + IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete")); + assertEquals(1, results2.size()); + List existing2 = results2.getResources(0, 1); + assertEquals(existing2.get(0).getId(), existing.get(2).getId()); - } + } - @AfterClass - public static void afterClass() { - ourCtx.close(); - } + @AfterClass + public static void afterClass() { + ourCtx.close(); + } - @SuppressWarnings("unchecked") - @BeforeClass - public static void beforeClass() { - ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); - ourFhirContext = ourCtx.getBean(FhirContext.class); - ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class); - ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class); - ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class); - ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); - } + @SuppressWarnings("unchecked") + @BeforeClass + public static void beforeClass() { + ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); + ourFhirContext = ourCtx.getBean(FhirContext.class); + ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class); + ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class); + ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class); + ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java index 691a99c877a..82501a6f10a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java @@ -44,638 +44,637 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; public class FhirSystemDaoDstu2Test { - private static ClassPathXmlApplicationContext ourCtx; - private static FhirContext ourFhirContext; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class); - private static IFhirResourceDao ourPatientDao; - private static IFhirSystemDao ourSystemDao; - private static IFhirResourceDao ourObservationDao; - - @Test - public void testTransactionCreateMatchUrlWithOneMatch() { - String methodName = "testTransactionCreateMatchUrlWithOneMatch"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(3, resp.getEntry().size()); - - Entry respEntry = resp.getEntry().get(1); - assertEquals(Constants.STATUS_HTTP_200_OK + "", respEntry.getTransactionResponse().getStatus()); - assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("Patient/" + id.getIdPart() + "/_history/1")); - assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); - - respEntry = resp.getEntry().get(2); - assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); - assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); - assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); - assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); - - o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - assertEquals("1", o.getId().getVersionIdPart()); - - } - - - @Test - public void testTransactionReadAndSearch() { - String methodName = "testTransactionReadAndSearch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt idv1 = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got id: {}", idv1); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Family Name"); - p.setId("Patient/" + methodName); - IdDt idv2 = ourPatientDao.update(p).getId(); - ourLog.info("Updated patient, got id: {}", idv2); - - Bundle request = new Bundle(); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualifiedVersionless().getValue()); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualified().getValue()); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Bundle resp = ourSystemDao.transaction(request); - - assertEquals(4, resp.getEntry().size()); - - Entry nextEntry; - - nextEntry = resp.getEntry().get(1); - assertEquals(Patient.class, nextEntry.getResource().getClass()); - assertEquals(idv2.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); - - nextEntry = resp.getEntry().get(2); - assertEquals(Patient.class, nextEntry.getResource().getClass()); - assertEquals(idv1.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); - - nextEntry = resp.getEntry().get(3); - assertEquals(Bundle.class, nextEntry.getResource().getClass()); - - Bundle respBundle = (Bundle)nextEntry.getResource(); - assertEquals(1, respBundle.getTotal().intValue()); - } - - - - @Test - public void testTransactionCreateMatchUrlWithTwoMatch() { - String methodName = "testTransactionCreateMatchUrlWithTwoMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - Bundle request = new Bundle(); - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - try { - ourSystemDao.transaction(request); - fail(); - } catch (PreconditionFailedException e) { - assertThat(e.getMessage(), containsString("with match URL \"Patient")); - } - } - - @Test - public void testTransactionCreateMatchUrlWithZeroMatch() { - String methodName = "testTransactionCreateMatchUrlWithZeroMatch"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(3, resp.getEntry().size()); - - Entry respEntry = resp.getEntry().get(1); - assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); - String patientId = respEntry.getTransactionResponse().getLocation(); - assertThat(patientId, not(endsWith("Patient/" + methodName + "/_history/1"))); - assertThat(patientId, (endsWith("/_history/1"))); - assertThat(patientId, (containsString("Patient/"))); - assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); - - respEntry = resp.getEntry().get(2); - assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); - assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); - assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); - assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); - - o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); - assertEquals(new IdDt(patientId).toUnqualifiedVersionless(), o.getSubject().getReference()); - } - - @Test - public void testTransactionCreateNoMatchUrl() { - String methodName = "testTransactionCreateNoMatchUrl"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(2, resp.getEntry().size()); - - Entry respEntry = resp.getEntry().get(1); - assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); - String patientId = respEntry.getTransactionResponse().getLocation(); - assertThat(patientId, not(containsString("test"))); - } - - @Test - public void testTransactionDeleteMatchUrlWithOneMatch() { - String methodName = "testTransactionDeleteMatchUrlWithOneMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - Bundle request = new Bundle(); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(2, resp.getEntry().size()); - - Entry nextEntry = resp.getEntry().get(1); - assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", nextEntry.getTransactionResponse().getStatus()); - - try { - ourPatientDao.read(id.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // ok - } - - try { - ourPatientDao.read(new IdDt("Patient/" + methodName)); - fail(); - } catch (ResourceNotFoundException e) { - // ok - } - - IBundleProvider history = ourPatientDao.history(id, null); - assertEquals(2, history.size()); - - assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0))); - assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue()); - assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0))); - - } - - @Test - public void testTransactionDeleteMatchUrlWithTwoMatch() { - String methodName = "testTransactionDeleteMatchUrlWithTwoMatch"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - - Bundle request = new Bundle(); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - try { - ourSystemDao.transaction(request); - fail(); - } catch (ResourceNotFoundException e) { - assertThat(e.getMessage(), containsString("resource with match URL \"Patient?")); - } - } - - @Test - public void testTransactionDeleteByResourceId() { - String methodName = "testTransactionDeleteByResourceId"; - - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id1 = ourPatientDao.create(p1).getId(); - ourLog.info("Created patient, got it: {}", id1); - - Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue(methodName); - p2.setId("Patient/" + methodName); - IdDt id2 = ourPatientDao.create(p2).getId(); - ourLog.info("Created patient, got it: {}", id2); - - Bundle request = new Bundle(); - - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id1.getIdPart()); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id2.getIdPart()); - - ourPatientDao.read(id1.toVersionless()); - ourPatientDao.read(id2.toVersionless()); - - Bundle resp = ourSystemDao.transaction(request); - - assertEquals(3, resp.getEntry().size()); - assertEquals("204", resp.getEntry().get(1).getTransactionResponse().getStatus()); - assertEquals("204", resp.getEntry().get(2).getTransactionResponse().getStatus()); - - try { - ourPatientDao.read(id1.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // good - } - - try { - ourPatientDao.read(id2.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // good - } - - } - - @Test - public void testTransactionDeleteMatchUrlWithZeroMatch() { - String methodName = "testTransactionDeleteMatchUrlWithZeroMatch"; - - Bundle request = new Bundle(); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - try { - ourSystemDao.transaction(request); - fail(); - } catch (ResourceNotFoundException e) { - assertThat(e.getMessage(), containsString("resource matching URL \"Patient?")); - } - } - - @Test - public void testTransactionDeleteNoMatchUrl() { - String methodName = "testTransactionDeleteNoMatchUrl"; - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - Bundle request = new Bundle(); - request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Bundle res = ourSystemDao.transaction(request); - assertEquals(2, res.getEntry().size()); - - assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", res.getEntry().get(1).getTransactionResponse().getStatus()); - - try { - ourPatientDao.read(id.toVersionless()); - fail(); - } catch (ResourceGoneException e) { - // ok - } - } - - @Test(expected = InvalidRequestException.class) - public void testTransactionFailsWithDuplicateIds() { - Bundle request = new Bundle(); - - Patient patient1 = new Patient(); - patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); - request.addEntry().setResource(patient1).getTransaction().setMethod(HTTPVerbEnum.POST); - - Patient patient2 = new Patient(); - patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); - patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); - request.addEntry().setResource(patient2).getTransaction().setMethod(HTTPVerbEnum.POST); - - ourSystemDao.transaction(request); - } - - @Test - public void testTransactionUpdateMatchUrlWithOneMatch() { - String methodName = "testTransactionUpdateMatchUrlWithOneMatch"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(3, resp.getEntry().size()); - - Entry nextEntry = resp.getEntry().get(1); - assertEquals("200", nextEntry.getTransactionResponse().getStatus()); - assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); - assertEquals(id.toVersionless(), p.getId().toVersionless()); - assertNotEquals(id, p.getId()); - assertThat(p.getId().toString(), endsWith("/_history/2")); - - nextEntry = resp.getEntry().get(1); - assertEquals(""+Constants.STATUS_HTTP_200_OK, nextEntry.getTransactionResponse().getStatus()); - assertThat(nextEntry.getTransactionResponse().getLocation(), not(emptyString())); - - nextEntry = resp.getEntry().get(2); - o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - @Test - public void testTransactionUpdateMatchUrlWithTwoMatch() { - String methodName = "testTransactionUpdateMatchUrlWithTwoMatch"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - try { - ourSystemDao.transaction(request); - fail(); - } catch (PreconditionFailedException e) { - assertThat(e.getMessage(), containsString("with match URL \"Patient")); - } - } - - @Test - public void testTransactionUpdateMatchUrlWithZeroMatch() { - String methodName = "testTransactionUpdateMatchUrlWithZeroMatch"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addName().addFamily("Hello"); - IdDt id = ourPatientDao.create(p).getId(); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId(id); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference(id); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(3, resp.getEntry().size()); - - Entry nextEntry = resp.getEntry().get(1); - assertEquals(Constants.STATUS_HTTP_201_CREATED + "", nextEntry.getTransactionResponse().getStatus()); - - assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); - assertNotEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); - - assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); - - nextEntry = resp.getEntry().get(1); - assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); - - nextEntry = resp.getEntry().get(2); - o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - - @Test - public void testTransactionUpdateNoMatchUrl() { - String methodName = "testTransactionUpdateNoMatchUrl"; - Bundle request = new Bundle(); - - Patient p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.setId("Patient/" + methodName); - IdDt id = ourPatientDao.create(p).getId(); - ourLog.info("Created patient, got it: {}", id); - - p = new Patient(); - p.addIdentifier().setSystem("urn:system").setValue(methodName); - p.addName().addFamily("Hello"); - p.setId("Patient/" + methodName); - request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient/"+ id.getIdPart()); - - Observation o = new Observation(); - o.getName().setText("Some Observation"); - o.getSubject().setReference("Patient/" + methodName); - request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); - - Bundle resp = ourSystemDao.transaction(request); - assertEquals(3, resp.getEntry().size()); - - Entry nextEntry = resp.getEntry().get(1); - assertEquals("200", nextEntry.getTransactionResponse().getStatus()); - - assertThat(nextEntry.getTransactionResponse().getLocation(), (containsString("test"))); - assertEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); - assertNotEquals(id, new IdDt(nextEntry.getTransactionResponse().getLocation())); - assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/2")); - - nextEntry = resp.getEntry().get(2); - assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); - - o = ourObservationDao.read(new IdDt(resp.getEntry().get(2).getTransactionResponse().getLocation())); - assertEquals(id.toVersionless(), o.getSubject().getReference()); - - } - - // - // - // /** - // * Issue #55 - // */ - // @Test - // public void testTransactionWithCidIds() throws Exception { - // Bundle request = new Bundle(); - // - // Patient p1 = new Patient(); - // p1.setId("cid:patient1"); - // p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); - // res.add(p1); - // - // Observation o1 = new Observation(); - // o1.setId("cid:observation1"); - // o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); - // o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - // res.add(o1); - // - // Observation o2 = new Observation(); - // o2.setId("cid:observation2"); - // o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); - // o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); - // res.add(o2); - // - // ourSystemDao.transaction(res); - // - // assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); - // assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); - // assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); - // - // assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - // assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); - // - // } - // - // @Test - // public void testTransactionWithDelete() throws Exception { - // Bundle request = new Bundle(); - // - // /* - // * Create 3 - // */ - // - // List res; - // res = new ArrayList(); - // - // Patient p1 = new Patient(); - // p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - // res.add(p1); - // - // Patient p2 = new Patient(); - // p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - // res.add(p2); - // - // Patient p3 = new Patient(); - // p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); - // res.add(p3); - // - // ourSystemDao.transaction(res); - // - // /* - // * Verify - // */ - // - // IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", - // "testTransactionWithDelete")); - // assertEquals(3, results.size()); - // - // /* - // * Now delete 2 - // */ - // - // request = new Bundle(); - // res = new ArrayList(); - // List existing = results.getResources(0, 3); - // - // p1 = new Patient(); - // p1.setId(existing.get(0).getId()); - // ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); - // res.add(p1); - // - // p2 = new Patient(); - // p2.setId(existing.get(1).getId()); - // ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); - // res.add(p2); - // - // ourSystemDao.transaction(res); - // - // /* - // * Verify - // */ - // - // IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", - // "testTransactionWithDelete")); - // assertEquals(1, results2.size()); - // List existing2 = results2.getResources(0, 1); - // assertEquals(existing2.get(0).getId(), existing.get(2).getId()); - // - // } - - @AfterClass - public static void afterClass() { - ourCtx.close(); - } - - @SuppressWarnings("unchecked") - @BeforeClass - public static void beforeClass() { - ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml"); - ourFhirContext = ourCtx.getBean(FhirContext.class); - assertEquals(FhirVersionEnum.DSTU2, ourFhirContext.getVersion().getVersion()); - ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class); - ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class); - ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class); - } + private static ClassPathXmlApplicationContext ourCtx; + private static FhirContext ourFhirContext; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class); + private static IFhirResourceDao ourPatientDao; + private static IFhirSystemDao ourSystemDao; + private static IFhirResourceDao ourObservationDao; + + @Test + public void testTransactionCreateMatchUrlWithOneMatch() { + String methodName = "testTransactionCreateMatchUrlWithOneMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_200_OK + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("Patient/" + id.getIdPart() + "/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + respEntry = resp.getEntry().get(2); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + assertEquals("1", o.getId().getVersionIdPart()); + + } + + + @Test + public void testTransactionReadAndSearch() { + String methodName = "testTransactionReadAndSearch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt idv1 = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got id: {}", idv1); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Family Name"); + p.setId("Patient/" + methodName); + IdDt idv2 = ourPatientDao.update(p).getId(); + ourLog.info("Updated patient, got id: {}", idv2); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualifiedVersionless().getValue()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualified().getValue()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + + assertEquals(4, resp.getEntry().size()); + + Entry nextEntry; + + nextEntry = resp.getEntry().get(1); + assertEquals(Patient.class, nextEntry.getResource().getClass()); + assertEquals(idv2.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); + + nextEntry = resp.getEntry().get(2); + assertEquals(Patient.class, nextEntry.getResource().getClass()); + assertEquals(idv1.toUnqualified(), nextEntry.getResource().getId().toUnqualified()); + + nextEntry = resp.getEntry().get(3); + assertEquals(Bundle.class, nextEntry.getResource().getClass()); + + Bundle respBundle = (Bundle) nextEntry.getResource(); + assertEquals(1, respBundle.getTotal().intValue()); + } + + + @Test + public void testTransactionCreateMatchUrlWithTwoMatch() { + String methodName = "testTransactionCreateMatchUrlWithTwoMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), containsString("with match URL \"Patient")); + } + } + + @Test + public void testTransactionCreateMatchUrlWithZeroMatch() { + String methodName = "testTransactionCreateMatchUrlWithZeroMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + String patientId = respEntry.getTransactionResponse().getLocation(); + assertThat(patientId, not(endsWith("Patient/" + methodName + "/_history/1"))); + assertThat(patientId, (endsWith("/_history/1"))); + assertThat(patientId, (containsString("Patient/"))); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + respEntry = resp.getEntry().get(2); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/")); + assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue()); + + o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement())); + assertEquals(new IdDt(patientId).toUnqualifiedVersionless(), o.getSubject().getReference()); + } + + @Test + public void testTransactionCreateNoMatchUrl() { + String methodName = "testTransactionCreateNoMatchUrl"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(2, resp.getEntry().size()); + + Entry respEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus()); + String patientId = respEntry.getTransactionResponse().getLocation(); + assertThat(patientId, not(containsString("test"))); + } + + @Test + public void testTransactionDeleteMatchUrlWithOneMatch() { + String methodName = "testTransactionDeleteMatchUrlWithOneMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(2, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", nextEntry.getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // ok + } + + try { + ourPatientDao.read(new IdDt("Patient/" + methodName)); + fail(); + } catch (ResourceNotFoundException e) { + // ok + } + + IBundleProvider history = ourPatientDao.history(id, null); + assertEquals(2, history.size()); + + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0))); + assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue()); + assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0))); + + } + + @Test + public void testTransactionDeleteMatchUrlWithTwoMatch() { + String methodName = "testTransactionDeleteMatchUrlWithTwoMatch"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (ResourceNotFoundException e) { + assertThat(e.getMessage(), containsString("resource with match URL \"Patient?")); + } + } + + @Test + public void testTransactionDeleteByResourceId() { + String methodName = "testTransactionDeleteByResourceId"; + + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id1 = ourPatientDao.create(p1).getId(); + ourLog.info("Created patient, got it: {}", id1); + + Patient p2 = new Patient(); + p2.addIdentifier().setSystem("urn:system").setValue(methodName); + p2.setId("Patient/" + methodName); + IdDt id2 = ourPatientDao.create(p2).getId(); + ourLog.info("Created patient, got it: {}", id2); + + Bundle request = new Bundle(); + + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id1.getIdPart()); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id2.getIdPart()); + + ourPatientDao.read(id1.toVersionless()); + ourPatientDao.read(id2.toVersionless()); + + Bundle resp = ourSystemDao.transaction(request); + + assertEquals(3, resp.getEntry().size()); + assertEquals("204", resp.getEntry().get(1).getTransactionResponse().getStatus()); + assertEquals("204", resp.getEntry().get(2).getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id1.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // good + } + + try { + ourPatientDao.read(id2.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // good + } + + } + + @Test + public void testTransactionDeleteMatchUrlWithZeroMatch() { + String methodName = "testTransactionDeleteMatchUrlWithZeroMatch"; + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (ResourceNotFoundException e) { + assertThat(e.getMessage(), containsString("resource matching URL \"Patient?")); + } + } + + @Test + public void testTransactionDeleteNoMatchUrl() { + String methodName = "testTransactionDeleteNoMatchUrl"; + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + Bundle request = new Bundle(); + request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Bundle res = ourSystemDao.transaction(request); + assertEquals(2, res.getEntry().size()); + + assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", res.getEntry().get(1).getTransactionResponse().getStatus()); + + try { + ourPatientDao.read(id.toVersionless()); + fail(); + } catch (ResourceGoneException e) { + // ok + } + } + + @Test(expected = InvalidRequestException.class) + public void testTransactionFailsWithDuplicateIds() { + Bundle request = new Bundle(); + + Patient patient1 = new Patient(); + patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01"); + request.addEntry().setResource(patient1).getTransaction().setMethod(HTTPVerbEnum.POST); + + Patient patient2 = new Patient(); + patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds")); + patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02"); + request.addEntry().setResource(patient2).getTransaction().setMethod(HTTPVerbEnum.POST); + + ourSystemDao.transaction(request); + } + + @Test + public void testTransactionUpdateMatchUrlWithOneMatch() { + String methodName = "testTransactionUpdateMatchUrlWithOneMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals("200", nextEntry.getTransactionResponse().getStatus()); + assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); + assertEquals(id.toVersionless(), p.getId().toVersionless()); + assertNotEquals(id, p.getId()); + assertThat(p.getId().toString(), endsWith("/_history/2")); + + nextEntry = resp.getEntry().get(1); + assertEquals("" + Constants.STATUS_HTTP_200_OK, nextEntry.getTransactionResponse().getStatus()); + assertThat(nextEntry.getTransactionResponse().getLocation(), not(emptyString())); + + nextEntry = resp.getEntry().get(2); + o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + @Test + public void testTransactionUpdateMatchUrlWithTwoMatch() { + String methodName = "testTransactionUpdateMatchUrlWithTwoMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + try { + ourSystemDao.transaction(request); + fail(); + } catch (PreconditionFailedException e) { + assertThat(e.getMessage(), containsString("with match URL \"Patient")); + } + } + + @Test + public void testTransactionUpdateMatchUrlWithZeroMatch() { + String methodName = "testTransactionUpdateMatchUrlWithZeroMatch"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addName().addFamily("Hello"); + IdDt id = ourPatientDao.create(p).getId(); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId(id); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference(id); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals(Constants.STATUS_HTTP_201_CREATED + "", nextEntry.getTransactionResponse().getStatus()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test"))); + assertNotEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/1")); + + nextEntry = resp.getEntry().get(1); + assertEquals("" + Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); + + nextEntry = resp.getEntry().get(2); + o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + + @Test + public void testTransactionUpdateNoMatchUrl() { + String methodName = "testTransactionUpdateNoMatchUrl"; + Bundle request = new Bundle(); + + Patient p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.setId("Patient/" + methodName); + IdDt id = ourPatientDao.create(p).getId(); + ourLog.info("Created patient, got it: {}", id); + + p = new Patient(); + p.addIdentifier().setSystem("urn:system").setValue(methodName); + p.addName().addFamily("Hello"); + p.setId("Patient/" + methodName); + request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient/" + id.getIdPart()); + + Observation o = new Observation(); + o.getName().setText("Some Observation"); + o.getSubject().setReference("Patient/" + methodName); + request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST); + + Bundle resp = ourSystemDao.transaction(request); + assertEquals(3, resp.getEntry().size()); + + Entry nextEntry = resp.getEntry().get(1); + assertEquals("200", nextEntry.getTransactionResponse().getStatus()); + + assertThat(nextEntry.getTransactionResponse().getLocation(), (containsString("test"))); + assertEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless()); + assertNotEquals(id, new IdDt(nextEntry.getTransactionResponse().getLocation())); + assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/2")); + + nextEntry = resp.getEntry().get(2); + assertEquals("" + Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus()); + + o = ourObservationDao.read(new IdDt(resp.getEntry().get(2).getTransactionResponse().getLocation())); + assertEquals(id.toVersionless(), o.getSubject().getReference()); + + } + + // + // + // /** + // * Issue #55 + // */ + // @Test + // public void testTransactionWithCidIds() throws Exception { + // Bundle request = new Bundle(); + // + // Patient p1 = new Patient(); + // p1.setId("cid:patient1"); + // p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01"); + // res.add(p1); + // + // Observation o1 = new Observation(); + // o1.setId("cid:observation1"); + // o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02"); + // o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + // res.add(o1); + // + // Observation o2 = new Observation(); + // o2.setId("cid:observation2"); + // o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03"); + // o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1")); + // res.add(o2); + // + // ourSystemDao.transaction(res); + // + // assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$")); + // assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$")); + // assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$")); + // + // assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + // assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart())); + // + // } + // + // @Test + // public void testTransactionWithDelete() throws Exception { + // Bundle request = new Bundle(); + // + // /* + // * Create 3 + // */ + // + // List res; + // res = new ArrayList(); + // + // Patient p1 = new Patient(); + // p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p1); + // + // Patient p2 = new Patient(); + // p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p2); + // + // Patient p3 = new Patient(); + // p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete"); + // res.add(p3); + // + // ourSystemDao.transaction(res); + // + // /* + // * Verify + // */ + // + // IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", + // "testTransactionWithDelete")); + // assertEquals(3, results.size()); + // + // /* + // * Now delete 2 + // */ + // + // request = new Bundle(); + // res = new ArrayList(); + // List existing = results.getResources(0, 3); + // + // p1 = new Patient(); + // p1.setId(existing.get(0).getId()); + // ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime()); + // res.add(p1); + // + // p2 = new Patient(); + // p2.setId(existing.get(1).getId()); + // ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime()); + // res.add(p2); + // + // ourSystemDao.transaction(res); + // + // /* + // * Verify + // */ + // + // IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", + // "testTransactionWithDelete")); + // assertEquals(1, results2.size()); + // List existing2 = results2.getResources(0, 1); + // assertEquals(existing2.get(0).getId(), existing.get(2).getId()); + // + // } + + @AfterClass + public static void afterClass() { + ourCtx.close(); + } + + @SuppressWarnings("unchecked") + @BeforeClass + public static void beforeClass() { + ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml"); + ourFhirContext = ourCtx.getBean(FhirContext.class); + assertEquals(FhirVersionEnum.DSTU2, ourFhirContext.getVersion().getVersion()); + ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class); + ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class); + ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml index c8c8106e0c4..218e9a4c322 100644 --- a/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml +++ b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml @@ -1,158 +1,184 @@ - Search results for resource type Patient - urn:uuid:d05b8832-2ec2-4df1-9a8f-905ba57823 - - - - - - 2015-02-21T17:08:03Z - 303 - - Patient "74635" Version "2" - http://fhir.healthintersections.com.au/open/Patient/74635 - - 2015-01-29T13:54:03Z - - Anonymous (24.130.25.156) - - 2015-02-21T17:08:03Z - - - - -
    -

    - Generated Narrative -

    -

    - identifier: ??

    -

    - name: Eve Everywoman

    -

    - telecom: ph: 555-555-2003(work)

    -

    - gender: Female - (Details : {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) -

    -

    - birthDate: 1955-01-06

    -

    - address: 2222 Home Street, (home)

    -

    - photo:

    -

    - active: -1

    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - - - - -
    -
    - -
    Generated Narrative identifier: ?? name: Eve Everywoman telecom: ph: 555-555-2003(work) gender: Female (Details : {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) birthDate: 1955-01-06 address: 2222 Home Street…
    -
    -
    - - Patient "8483548" Version "1" - http://fhir.healthintersections.com.au/open/Patient/8483548 - - - 2015-01-29T02:19:50Z - - Anonymous (service) - - 2015-02-21T17:08:03Z - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    NamePeter James - Chalmers("Jim")
    Address534 Erewhon, Pleasantville, Orange County, 3999
    ContactsHome: unknown. Work: (03) 5555 6473
    IdMRN: 12345 (Acme Healthcare)
    -
    - - - - - - - -
    - - - - - - - - -
    - -
    -
    - -
    Name Peter James Chalmers ("Jim") Address 534 Erewhon, Pleasantville, Orange County, 3999 Contacts Home: unknown. Work: (03) 5555 6473 …
    -
    -
    + Search results for resource type Patient + urn:uuid:d05b8832-2ec2-4df1-9a8f-905ba57823 + + + + + + 2015-02-21T17:08:03Z + 303 + + Patient "74635" Version "2" + http://fhir.healthintersections.com.au/open/Patient/74635 + + 2015-01-29T13:54:03Z + + Anonymous (24.130.25.156) + + 2015-02-21T17:08:03Z + + + + +
    +

    + Generated Narrative +

    +

    + identifier: ?? +

    +

    + name: Eve Everywoman +

    +

    + telecom: ph: 555-555-2003(work) +

    +

    + gender: Female + (Details : + {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) + +

    +

    + birthDate: 1955-01-06 +

    +

    + address: 2222 Home Street, (home) +

    +

    + photo: +

    +

    + active: -1 +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + + + + +
    +
    + +
    Generated Narrative identifier: ?? name: Eve + Everywoman telecom: ph: 555-555-2003(work) gender: Female (Details : + {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"}) birthDate: + 1955-01-06 address: 2222 Home Street…
    +
    +
    + + Patient "8483548" Version "1" + http://fhir.healthintersections.com.au/open/Patient/8483548 + + + 2015-01-29T02:19:50Z + + Anonymous (service) + + 2015-02-21T17:08:03Z + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    NamePeter James + Chalmers("Jim") +
    Address534 Erewhon, Pleasantville, Orange County, 3999
    ContactsHome: unknown. Work: (03) 5555 6473
    IdMRN: 12345 (Acme Healthcare)
    +
    +
    + + + + + + + +
    + + + + + + + + +
    + +
    +
    + +
    Name Peter James Chalmers ("Jim") Address + 534 Erewhon, Pleasantville, Orange County, 3999 Contacts Home: unknown. Work: (03) + 5555 6473 …
    +
    +
    diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index e271fca91e4..bd3a2a0640f 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -377,4 +377,5 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } + } diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index 9a924807c49..127c3b3a077 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -99,7 +99,7 @@ public class JsonParserTest { assertThat(out, containsString("hello")); } - + @Test public void testEncodeAndParseExtensions() throws Exception { @@ -113,11 +113,11 @@ public class JsonParserTest { ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); patient.addUndeclaredExtension(parent); - ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1")); parent.addUndeclaredExtension(child1); - ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2")); parent.addUndeclaredExtension(child2); - + ExtensionDt modExt = new ExtensionDt(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateDt("1995-01-02")); @@ -141,74 +141,74 @@ public class JsonParserTest { ourLog.info(output); String enc = ourCtx.newJsonParser().encodeResourceToString(patient); - assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", - "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" - )); - assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + - "{" + - "\"url\":\"http://example.com/extensions#modext\"," + - "\"valueDate\":\"1995-01-02\"" + - "}" + + )); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + "],")); - assertThat(enc, containsString("\"_given\":[" + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext\"," + - "\"valueString\":\"given\"" + - "}" + - "]" + - "}," + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_parent\"," + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_child\"," + - "\"valueString\":\"CHILD\"" + - "}" + - "]" + - "}" + - "]" + + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + "}")); /* * Now parse this back */ - - Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); ext = parsed.getUndeclaredExtensions().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString()); parent = patient.getUndeclaredExtensions().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString()); modExt = parsed.getUndeclaredModifierExtensions().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); ExtensionDt given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue()); } diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index 5e154491072..9592db55a38 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -152,7 +152,7 @@ public class XmlParserTest { } - + @Test public void testEncodeAndParseExtensions() throws Exception { @@ -166,11 +166,11 @@ public class XmlParserTest { ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); patient.addUndeclaredExtension(parent); - ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1")); parent.addUndeclaredExtension(child1); - ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2")); parent.addUndeclaredExtension(child2); - + ExtensionDt modExt = new ExtensionDt(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateDt("1995-01-02")); @@ -205,42 +205,42 @@ public class XmlParserTest { /* * Now parse this back */ - - Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); ext = parsed.getUndeclaredExtensions().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString()); parent = patient.getUndeclaredExtensions().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString()); modExt = parsed.getUndeclaredModifierExtensions().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); ExtensionDt given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue()); } - + @Test public void testEncodeBundle() throws InterruptedException { Bundle b = new Bundle(); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index e41c511eddc..f15a264bf73 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -82,11 +82,11 @@ public class JsonParserTest { ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); patient.addUndeclaredExtension(parent); - ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1")); parent.addUndeclaredExtension(child1); - ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2")); parent.addUndeclaredExtension(child2); - + ExtensionDt modExt = new ExtensionDt(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateDt("1995-01-02")); @@ -110,74 +110,74 @@ public class JsonParserTest { ourLog.info(output); String enc = ourCtx.newJsonParser().encodeResourceToString(patient); - assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", - "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" - )); - assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" + - "{" + - "\"url\":\"http://example.com/extensions#modext\"," + - "\"valueDate\":\"1995-01-02\"" + - "}" + + )); + assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + "],")); - assertThat(enc, containsString("\"_given\":[" + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext\"," + - "\"valueString\":\"given\"" + - "}" + - "]" + - "}," + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_parent\"," + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_child\"," + - "\"valueString\":\"CHILD\"" + - "}" + - "]" + - "}" + - "]" + + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + "}")); /* * Now parse this back */ - - Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); ext = parsed.getUndeclaredExtensions().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString()); parent = patient.getUndeclaredExtensions().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString()); modExt = parsed.getUndeclaredModifierExtensions().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); ExtensionDt given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue()); } diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index f93e9f862c4..8bd31a79eef 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -287,7 +287,7 @@ public class XmlParserTest { parsed = parser.parseResource(Composition.class, string); assertEquals(2, parsed.getContained().getContainedResources().size()); } - + @Test public void testEncodeAndParseExtensions() throws Exception { @@ -301,11 +301,11 @@ public class XmlParserTest { ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent"); patient.addUndeclaredExtension(parent); - ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1")); + ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1")); parent.addUndeclaredExtension(child1); - ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2")); + ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2")); parent.addUndeclaredExtension(child2); - + ExtensionDt modExt = new ExtensionDt(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateDt("1995-01-02")); @@ -340,38 +340,38 @@ public class XmlParserTest { /* * Now parse this back */ - - Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); ext = parsed.getUndeclaredExtensions().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString()); parent = patient.getUndeclaredExtensions().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString()); modExt = parsed.getUndeclaredModifierExtensions().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); ExtensionDt given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue()); } diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java index 7851bbdb3f9..fe208635a73 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java @@ -33,180 +33,180 @@ import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.EncodingEnum; public class GenericClientTestDstu2 { - private static FhirContext ourCtx; - private HttpClient myHttpClient; - private HttpResponse myHttpResponse; + private static FhirContext ourCtx; + private HttpClient myHttpClient; + private HttpResponse myHttpResponse; - @BeforeClass - public static void beforeClass() { - ourCtx = FhirContext.forDstu2(); - } + @BeforeClass + public static void beforeClass() { + ourCtx = FhirContext.forDstu2(); + } - - @Before - public void before() { - myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); - ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient); - ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER); - myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); - } - - @Test - public void testSearchByString() throws Exception { - String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}"; + @Before + public void before() { + myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); + ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient); + ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER); + myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); + } - ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); - when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); - when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); - when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8")); - when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8"))); - IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + @Test + public void testSearchByString() throws Exception { + String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}"; - //@formatter:off - Bundle response = client.search() - .forResource("Patient") - .where(Patient.NAME.matches().value("james")) - .execute(); - //@formatter:on + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8"))); - assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString()); - assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass()); + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); - } + //@formatter:off + Bundle response = client.search() + .forResource("Patient") + .where(Patient.NAME.matches().value("james")) + .execute(); + //@formatter:on - @Test - public void testDeleteConditional() throws Exception { - ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); - when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); - when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString()); + assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass()); + + } + + @Test + public void testDeleteConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); // when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_TEXT + "; charset=UTF-8")); - when(myHttpResponse.getEntity().getContent()).then(new Answer() { - @Override - public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { - return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); - } - }); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); - IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); - int idx = 0; - - client.delete().resourceById(new IdDt("Patient/123")).execute(); - assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); - assertEquals("http://example.com/fhir/Patient/123", capt.getAllValues().get(idx).getURI().toString()); - idx++; - - client.delete().resourceConditionalByUrl("Patient?name=foo").execute(); - assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); - idx++; + int idx = 0; - client.delete().resourceConditionalByType("Patient").where(Patient.NAME.matches().value("foo")).execute(); - assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); - idx++; + client.delete().resourceById(new IdDt("Patient/123")).execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient/123", capt.getAllValues().get(idx).getURI().toString()); + idx++; - } + client.delete().resourceConditionalByUrl("Patient?name=foo").execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; - @Test - public void testCreateConditional() throws Exception { - ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); - when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); - when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); - when(myHttpResponse.getEntity().getContent()).then(new Answer() { - @Override - public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { - return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); - } - }); + client.delete().resourceConditionalByType("Patient").where(Patient.NAME.matches().value("foo")).execute(); + assertEquals("DELETE", capt.getAllValues().get(idx).getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; - IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + } - int idx = 0; - - Patient p = new Patient(); - p.addName().addFamily("FOOFAMILY"); - - client.create().resource(p).conditionalByUrl("Patient?name=foo").execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); - assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); - idx++; + @Test + public void testCreateConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); - client.create().resource(p).conditional().where(Patient.NAME.matches().value("foo")).execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); - assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); - idx++; + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); - } + int idx = 0; + + Patient p = new Patient(); + p.addName().addFamily("FOOFAMILY"); + + client.create().resource(p).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); + assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); + idx++; + + client.create().resource(p).conditional().where(Patient.NAME.matches().value("foo")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue()); + assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod()); + idx++; + + } - @Test - public void testUpdateConditional() throws Exception { - ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); - when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); - when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); - when(myHttpResponse.getEntity().getContent()).then(new Answer() { - @Override - public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { - return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); - } - }); + @Test + public void testUpdateConditional() throws Exception { + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, "")); + when(myHttpResponse.getEntity().getContent()).then(new Answer() { + @Override + public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8")); + } + }); - IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); - int idx = 0; - - Patient p = new Patient(); - p.addName().addFamily("FOOFAMILY"); - - client.update().resource(p).conditionalByUrl("Patient?name=foo").execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); - idx++; + int idx = 0; - client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditionalByUrl("Patient?name=foo").execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); - idx++; + Patient p = new Patient(); + p.addName().addFamily("FOOFAMILY"); - client.update().resource(p).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); - idx++; + client.update().resource(p).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; - client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); - assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); - assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); - assertThat(extractBody(capt, idx), containsString("")); - assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); - assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); - idx++; + client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditionalByUrl("Patient?name=foo").execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString()); + idx++; - } + client.update().resource(p).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); + idx++; - private String extractBody(ArgumentCaptor capt, int count) throws IOException { - String body = IOUtils.toString(((HttpEntityEnclosingRequestBase) capt.getAllValues().get(count)).getEntity().getContent(), "UTF-8"); - return body; - } + client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute(); + assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length); + assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue()); + assertThat(extractBody(capt, idx), containsString("")); + assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod()); + assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString()); + idx++; + + } + + private String extractBody(ArgumentCaptor capt, int count) throws IOException { + String body = IOUtils.toString(((HttpEntityEnclosingRequestBase) capt.getAllValues().get(count)).getEntity().getContent(), "UTF-8"); + return body; + } } diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java index bdf667faa0f..6ad5f41ad10 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java @@ -41,93 +41,92 @@ import ca.uhn.fhir.util.PortUtil; * Created by dsotnikov on 2/25/2014. */ public class UpdateConditionalTest { - private static CloseableHttpClient ourClient; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class); - private static int ourPort; - private static Server ourServer; + private static CloseableHttpClient ourClient; + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class); + private static int ourPort; + private static Server ourServer; - @Test - public void testUpdate() throws Exception { + @Test + public void testUpdate() throws Exception { - Patient patient = new Patient(); - patient.addIdentifier().setValue("002"); + Patient patient = new Patient(); + patient.addIdentifier().setValue("002"); - HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001"); - httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); + HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001"); + httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); - HttpResponse status = ourClient.execute(httpPost); + HttpResponse status = ourClient.execute(httpPost); - String responseContent = IOUtils.toString(status.getEntity().getContent()); - IOUtils.closeQuietly(status.getEntity().getContent()); + String responseContent = IOUtils.toString(status.getEntity().getContent()); + IOUtils.closeQuietly(status.getEntity().getContent()); - ourLog.info("Response was:\n{}", responseContent); + ourLog.info("Response was:\n{}", responseContent); - OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent); - assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails()); + OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent); + assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails()); - assertEquals(200, status.getStatusLine().getStatusCode()); - assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue()); - assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue()); + assertEquals(200, status.getStatusLine().getStatusCode()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue()); - } - - - - @AfterClass - public static void afterClass() throws Exception { - ourServer.stop(); - } + } - @BeforeClass - public static void beforeClass() throws Exception { - ourPort = PortUtil.findFreePort(); - ourServer = new Server(ourPort); - PatientProvider patientProvider = new PatientProvider(); + @AfterClass + public static void afterClass() throws Exception { + ourServer.stop(); + } - ServletHandler proxyHandler = new ServletHandler(); - RestfulServer servlet = new RestfulServer(); - servlet.setResourceProviders(patientProvider); - ServletHolder servletHolder = new ServletHolder(servlet); - proxyHandler.addServletWithMapping(servletHolder, "/*"); - ourServer.setHandler(proxyHandler); - ourServer.start(); + @BeforeClass + public static void beforeClass() throws Exception { + ourPort = PortUtil.findFreePort(); + ourServer = new Server(ourPort); - PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); - HttpClientBuilder builder = HttpClientBuilder.create(); - builder.setConnectionManager(connectionManager); - ourClient = builder.build(); + PatientProvider patientProvider = new PatientProvider(); - } + ServletHandler proxyHandler = new ServletHandler(); + RestfulServer servlet = new RestfulServer(); + servlet.setResourceProviders(patientProvider); + ServletHolder servletHolder = new ServletHolder(servlet); + proxyHandler.addServletWithMapping(servletHolder, "/*"); + ourServer.setHandler(proxyHandler); + ourServer.start(); - private static String ourLastConditionalUrl; - - - @Before - public void before() { - ourLastConditionalUrl=null; - } - - public static class PatientProvider implements IResourceProvider { + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); + HttpClientBuilder builder = HttpClientBuilder.create(); + builder.setConnectionManager(connectionManager); + ourClient = builder.build(); - @Override - public Class getResourceType() { - return Patient.class; - } + } - - @Update() - public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) { - IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue()); - OperationOutcome oo = new OperationOutcome(); - oo.addIssue().setDetails("OODETAILS"); - if (theId.getValueAsString().contains("CREATE")) { - return new MethodOutcome(id,oo, true); - } - - return new MethodOutcome(id,oo); - } + private static String ourLastConditionalUrl; - } + + @Before + public void before() { + ourLastConditionalUrl = null; + } + + public static class PatientProvider implements IResourceProvider { + + @Override + public Class getResourceType() { + return Patient.class; + } + + + @Update() + public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) { + IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue()); + OperationOutcome oo = new OperationOutcome(); + oo.addIssue().setDetails("OODETAILS"); + if (theId.getValueAsString().contains("CREATE")) { + return new MethodOutcome(id, oo, true); + } + + return new MethodOutcome(id, oo); + } + + } } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java index 2e95f7f14fe..1b631e860ed 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java @@ -146,57 +146,57 @@ public class Address extends Type implements ICompositeType { /** * The purpose of this address. */ - @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="home | work | temp | old - purpose of this address", formalDefinition="The purpose of this address." ) protected Enumeration use; /** * A full text representation of the address. */ - @Child(name="text", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "text", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Text representation of the address", formalDefinition="A full text representation of the address." ) protected StringType text; /** - * This component contains the house number, apartment number, street name, street direction, + * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information. */ - @Child(name="line", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "line", type = {StringType.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Street name, number, direction & P.O. Box etc", formalDefinition="This component contains the house number, apartment number, street name, street direction, \nP.O. Box number, delivery hints, and similar address information." ) protected List line; /** * The name of the city, town, village or other community or delivery center. */ - @Child(name="city", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "city", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Name of city, town etc.", formalDefinition="The name of the city, town, village or other community or delivery center." ) protected StringType city; /** * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). */ - @Child(name="state", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "state", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Sub-unit of country (abreviations ok)", formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." ) protected StringType state; /** * A postal code designating a region defined by the postal service. */ - @Child(name="postalCode", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "postalCode", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Postal code for area", formalDefinition="A postal code designating a region defined by the postal service." ) protected StringType postalCode; /** * Country - a nation as commonly understood or generally accepted. */ - @Child(name="country", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "country", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Country (can be ISO 3166 3 letter code)", formalDefinition="Country - a nation as commonly understood or generally accepted." ) protected StringType country; /** * Time period when address was/is in use. */ - @Child(name="period", type={Period.class}, order=7, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Time period when address was/is in use", formalDefinition="Time period when address was/is in use." ) protected Period period; @@ -305,7 +305,7 @@ P.O. Box number, delivery hints, and similar address information. } /** - * @return {@link #line} (This component contains the house number, apartment number, street name, street direction, + * @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 List getLine() { @@ -324,7 +324,7 @@ P.O. Box number, delivery hints, and similar address information.) } /** - * @return {@link #line} (This component contains the house number, apartment number, street name, street direction, + * @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.) */ // syntactic sugar @@ -337,7 +337,7 @@ P.O. Box number, delivery hints, and similar address information.) } /** - * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, + * @param value {@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 Address addLine(String value) { //1 @@ -350,7 +350,7 @@ P.O. Box number, delivery hints, and similar address information.) } /** - * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, + * @param value {@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 boolean hasLine(String value) { diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java index 0583487b9b3..52ce1c943fc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java @@ -134,28 +134,28 @@ public class Alert extends DomainResource { /** * Identifier assigned to the alert for external use (outside the FHIR environment). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the alert for external use (outside the FHIR environment)." ) protected List identifier; /** * Allows an alert to be divided into different categories like clinical, administrative etc. */ - @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an alert to be divided into different categories like clinical, administrative etc." ) protected CodeableConcept category; /** * Supports basic workflow. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="Supports basic workflow." ) protected Enumeration status; /** * The person who this alert concerns. */ - @Child(name="subject", type={Patient.class}, order=3, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Who is alert about?", formalDefinition="The person who this alert concerns." ) protected Reference subject; @@ -167,7 +167,7 @@ public class Alert extends DomainResource { /** * The person or device that created the alert. */ - @Child(name="author", type={Practitioner.class, Patient.class, Device.class}, order=4, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Alert creator", formalDefinition="The person or device that created the alert." ) protected Reference author; @@ -179,17 +179,17 @@ public class Alert extends DomainResource { /** * The coded value or textual component of the alert to display to the user. */ - @Child(name="note", type={CodeableConcept.class}, order=5, min=1, max=1) - @Description(shortDefinition="Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition="The coded value or textual component of the alert to display to the user." ) + @Child(name = "note", type = {CodeableConcept.class}, order = 5, min = 1, max = 1) + @Description(shortDefinition = "Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition = "The coded value or textual component of the alert to display to the user.") protected CodeableConcept note; - private static final long serialVersionUID = -1519932996L; + private static final long serialVersionUID = -1519932996L; public Alert() { super(); } - public Alert(Enumeration status, Reference subject, CodeableConcept note) { + public Alert(Enumeration status, Reference subject, CodeableConcept note) { super(); this.status = status; this.subject = subject; @@ -467,7 +467,7 @@ public class Alert extends DomainResource { @SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) + @SearchParamDefinition(name = "patient", path = "Alert.subject", description = "The identity of a subject to list alerts for", type = "reference") public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java index 516f79d891c..7654f4424ec 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java @@ -1049,21 +1049,21 @@ public class AllergyIntolerance extends DomainResource { /** * This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Date when the sensitivity was recorded. */ - @Child(name="recordedDate", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "recordedDate", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." ) protected DateTimeType recordedDate; /** * Indicates who has responsibility for the record. */ - @Child(name="recorder", type={Practitioner.class, Patient.class}, order=2, min=0, max=1) + @Child(name = "recorder", type = {Practitioner.class, Patient.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Indicates who has responsibility for the record." ) protected Reference recorder; @@ -1075,7 +1075,7 @@ public class AllergyIntolerance extends DomainResource { /** * The patient who has the allergy or intolerance. */ - @Child(name="subject", type={Patient.class}, order=3, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Who the sensitivity is for", formalDefinition="The patient who has the allergy or intolerance." ) protected Reference subject; @@ -1087,56 +1087,56 @@ public class AllergyIntolerance extends DomainResource { /** * Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk. */ - @Child(name="substance", type={CodeableConcept.class}, order=4, min=1, max=1) + @Child(name = "substance", type = {CodeableConcept.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk." ) protected CodeableConcept substance; /** * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. */ - @Child(name="status", type={CodeType.class}, order=5, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="unconfirmed | confirmed | resolved | refuted", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." ) protected Enumeration status; /** * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. */ - @Child(name="criticality", type={CodeType.class}, order=6, min=0, max=1) + @Child(name = "criticality", type = {CodeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="low | high | unassessible - Estimated potential clinical harm", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." ) protected Enumeration criticality; /** * Identification of the underlying physiological mechanism for the Reaction Risk. */ - @Child(name="type", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "type", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="immune | non-immune - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the Reaction Risk." ) protected Enumeration type; /** * Category of the identified Substance. */ - @Child(name="category", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "category", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="food | medication | environment - Category of Substance", formalDefinition="Category of the identified Substance." ) protected Enumeration category; /** * Represents the date and/or time of the last known occurence of a reaction event. */ - @Child(name="lastOccurence", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "lastOccurence", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Date(/time) of last known occurence of a reaction", formalDefinition="Represents the date and/or time of the last known occurence of a reaction event." ) protected DateTimeType lastOccurence; /** * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields. */ - @Child(name="comment", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ) protected StringType comment; /** * Details about each Adverse Reaction Event linked to exposure to the identified Substance. */ - @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "event", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each Adverse Reaction Event linked to exposure to the identified Substance." ) protected List event; @@ -1751,34 +1751,34 @@ public class AllergyIntolerance extends DomainResource { public static final String SP_SEVERITY = "severity"; @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External Ids for this item", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.event.manifestation", description="Clinical symptoms/signs associated with the Event", type="token" ) - public static final String SP_MANIFESTATION = "manifestation"; - @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" ) - public static final String SP_RECORDER = "recorder"; - @SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) - public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "identifier", path = "AllergyIntolerance.identifier", description = "External Ids for this item", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "manifestation", path = "AllergyIntolerance.event.manifestation", description = "Clinical symptoms/signs associated with the Event", type = "token") + public static final String SP_MANIFESTATION = "manifestation"; + @SearchParamDefinition(name = "recorder", path = "AllergyIntolerance.recorder", description = "Who recorded the sensitivity", type = "reference") + public static final String SP_RECORDER = "recorder"; + @SearchParamDefinition(name = "subject", path = "AllergyIntolerance.subject", description = "Who the sensitivity is for", type = "reference") + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance|AllergyIntolerance.event.substance", description="Substance, (or class) considered to be responsible for risk", type="token" ) public static final String SP_SUBSTANCE = "substance"; @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unassessible - Estimated potential clinical harm", type="token" ) public static final String SP_CRITICALITY = "criticality"; - @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="immune | non-immune - Underlying mechanism (if known)", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="onset", path="AllergyIntolerance.event.onset", description="Date(/time) when manifestations showed", type="date" ) - public static final String SP_ONSET = "onset"; + @SearchParamDefinition(name = "type", path = "AllergyIntolerance.type", description = "immune | non-immune - Underlying mechanism (if known)", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "onset", path = "AllergyIntolerance.event.onset", description = "Date(/time) when manifestations showed", type = "date") + public static final String SP_ONSET = "onset"; @SearchParamDefinition(name="duration", path="AllergyIntolerance.event.duration", description="How long Manifestations persisted", type="quantity" ) public static final String SP_DURATION = "duration"; @SearchParamDefinition(name="route", path="AllergyIntolerance.event.exposureRoute", description="How the subject was exposed to the substance", type="token" ) public static final String SP_ROUTE = "route"; - @SearchParamDefinition(name="patient", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment - Category of Substance", type="token" ) - public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurence of a reaction", type="date" ) - public static final String SP_LASTDATE = "last-date"; - @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="unconfirmed | confirmed | resolved | refuted", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "patient", path = "AllergyIntolerance.subject", description = "Who the sensitivity is for", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "category", path = "AllergyIntolerance.category", description = "food | medication | environment - Category of Substance", type = "token") + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name = "last-date", path = "AllergyIntolerance.lastOccurence", description = "Date(/time) of last known occurence of a reaction", type = "date") + public static final String SP_LASTDATE = "last-date"; + @SearchParamDefinition(name = "status", path = "AllergyIntolerance.status", description = "unconfirmed | confirmed | resolved | refuted", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java index 16799d49428..19c245521e9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java @@ -649,63 +649,63 @@ public class Appointment extends DomainResource { /** * This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept). */ - @Child(name="priority", type={IntegerType.class}, order=1, min=0, max=1) + @Child(name = "priority", type = {IntegerType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)." ) protected IntegerType priority; /** * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="pending | booked | arrived | fulfilled | cancelled | noshow", formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." ) protected Enumeration status; /** * The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself). */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)", formalDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)." ) protected CodeableConcept type; /** * The reason that this appointment is being scheduled, this is more clinical than administrative. */ - @Child(name="reason", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative", formalDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative." ) protected CodeableConcept reason; /** * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." ) protected StringType description; /** * Date/Time that the appointment is to take place. */ - @Child(name="start", type={InstantType.class}, order=6, min=1, max=1) + @Child(name = "start", type = {InstantType.class}, order = 6, min = 1, max = 1) @Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) protected InstantType start; /** * Date/Time that the appointment is to conclude. */ - @Child(name="end", type={InstantType.class}, order=7, min=1, max=1) + @Child(name = "end", type = {InstantType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) protected InstantType end; /** * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot. */ - @Child(name="slot", type={Slot.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "slot", type = {Slot.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot", formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot." ) protected List slot; /** @@ -717,7 +717,7 @@ public class Appointment extends DomainResource { /** * The primary location that this appointment is to take place. */ - @Child(name="location", type={Location.class}, order=9, min=0, max=1) + @Child(name = "location", type = {Location.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="The primary location that this appointment is to take place", formalDefinition="The primary location that this appointment is to take place." ) protected Reference location; @@ -729,14 +729,14 @@ public class Appointment extends DomainResource { /** * Additional comments about the appointment. */ - @Child(name="comment", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." ) protected StringType comment; /** * An Order that lead to the creation of this appointment. */ - @Child(name="order", type={Order.class}, order=11, min=0, max=1) + @Child(name = "order", type = {Order.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="An Order that lead to the creation of this appointment", formalDefinition="An Order that lead to the creation of this appointment." ) protected Reference order; @@ -748,14 +748,14 @@ public class Appointment extends DomainResource { /** * List of participants involved in the appointment. */ - @Child(name="participant", type={}, order=12, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "participant", type = {}, order = 12, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of participants involved in the appointment", formalDefinition="List of participants involved in the appointment." ) protected List participant; /** * Who recorded the appointment. */ - @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=1) + @Child(name = "lastModifiedBy", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Who recorded the appointment", formalDefinition="Who recorded the appointment." ) protected Reference lastModifiedBy; @@ -767,7 +767,7 @@ public class Appointment extends DomainResource { /** * Date when the appointment was recorded. */ - @Child(name="lastModified", type={DateTimeType.class}, order=14, min=0, max=1) + @Child(name = "lastModified", type = {DateTimeType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Date when the appointment was recorded", formalDefinition="Date when the appointment was recorded." ) protected DateTimeType lastModified; @@ -1494,10 +1494,10 @@ public class Appointment extends DomainResource { return ResourceType.Appointment; } - @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" ) - public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name = "date", path = "Appointment.start", description = "Appointment date/time.", type = "date") + public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "actor", path = "Appointment.participant.actor", description = "Any one of the individuals participating in the appointment", type = "reference") + public static final String SP_ACTOR = "actor"; @SearchParamDefinition(name="partstatus", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment", type="token" ) public static final String SP_PARTSTATUS = "partstatus"; @SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java index 49ffec5ac3e..6f6ccdbed96 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java @@ -176,14 +176,14 @@ public class AppointmentResponse extends DomainResource { /** * This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Parent appointment that this response is replying to. */ - @Child(name="appointment", type={Appointment.class}, order=1, min=1, max=1) + @Child(name = "appointment", type = {Appointment.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Parent appointment that this response is replying to", formalDefinition="Parent appointment that this response is replying to." ) protected Reference appointment; @@ -195,14 +195,14 @@ public class AppointmentResponse extends DomainResource { /** * Role of participant in the appointment. */ - @Child(name="participantType", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "participantType", type = {CodeableConcept.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) protected List participantType; /** * A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device. */ - @Child(name="individual", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "individual", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device", formalDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device." ) protected List individual; /** @@ -214,35 +214,35 @@ public class AppointmentResponse extends DomainResource { /** * Participation status of the Patient. */ - @Child(name="participantStatus", type={CodeType.class}, order=4, min=1, max=1) + @Child(name = "participantStatus", type = {CodeType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the Patient." ) protected Enumeration participantStatus; /** * Additional comments about the appointment. */ - @Child(name="comment", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." ) protected StringType comment; /** * Date/Time that the appointment is to take place. */ - @Child(name="start", type={InstantType.class}, order=6, min=0, max=1) + @Child(name = "start", type = {InstantType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) protected InstantType start; /** * Date/Time that the appointment is to conclude. */ - @Child(name="end", type={InstantType.class}, order=7, min=0, max=1) + @Child(name = "end", type = {InstantType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) protected InstantType end; /** * Who recorded the appointment response. */ - @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=8, min=0, max=1) + @Child(name = "lastModifiedBy", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Who recorded the appointment response", formalDefinition="Who recorded the appointment response." ) protected Reference lastModifiedBy; @@ -254,7 +254,7 @@ public class AppointmentResponse extends DomainResource { /** * Date when the response was recorded or last updated. */ - @Child(name="lastModified", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "lastModified", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Date when the response was recorded or last updated", formalDefinition="Date when the response was recorded or last updated." ) protected DateTimeType lastModified; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java index 493c048e6a9..f2a69f544a6 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java @@ -41,54 +41,54 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * For referring to data content defined in other formats. */ @DatatypeDef(name="Attachment") -public class Attachment extends Type implements ICompositeType { +public class Attachment extends Type implements ICompositeType { /** * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. */ - @Child(name="contentType", type={CodeType.class}, order=0, min=0, max=1) + @Child(name = "contentType", type = {CodeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." ) protected CodeType contentType; /** * The human language of the content. The value can be any valid value according to BCP 47. */ - @Child(name="language", type={CodeType.class}, order=1, min=0, max=1) + @Child(name = "language", type = {CodeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Human language of the content (BCP-47)", formalDefinition="The human language of the content. The value can be any valid value according to BCP 47." ) protected CodeType language; /** * The actual data of the attachment - a sequence of bytes. In XML, represented using base64. */ - @Child(name="data", type={Base64BinaryType.class}, order=2, min=0, max=1) + @Child(name = "data", type = {Base64BinaryType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Data inline, base64ed", formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." ) protected Base64BinaryType data; /** * An alternative location where the data can be accessed. */ - @Child(name="url", type={UriType.class}, order=3, min=0, max=1) + @Child(name = "url", type = {UriType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Uri where the data can be found", formalDefinition="An alternative location where the data can be accessed." ) protected UriType url; /** * The number of bytes of data that make up this attachment. */ - @Child(name="size", type={IntegerType.class}, order=4, min=0, max=1) + @Child(name = "size", type = {IntegerType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." ) protected IntegerType size; /** * The calculated hash of the data using SHA-1. Represented using base64. */ - @Child(name="hash", type={Base64BinaryType.class}, order=5, min=0, max=1) + @Child(name = "hash", type = {Base64BinaryType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Hash of the data (sha-1, base64ed )", formalDefinition="The calculated hash of the data using SHA-1. Represented using base64." ) protected Base64BinaryType hash; /** * A label or set of text to display in place of the data. */ - @Child(name="title", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "title", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." ) protected StringType title; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java index 8558a11dcc6..a2a98a3300b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java @@ -48,7 +48,7 @@ public abstract class BackboneElement extends Element implements IBackboneElemen /** * May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. */ - @Child(name="modifierExtension", type={Extension.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "modifierExtension", type = {Extension.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) protected List modifierExtension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java index ff748c0b33f..3c6f127f1e8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java @@ -47,21 +47,21 @@ public class Basic extends DomainResource { /** * Identifier assigned to the resource for business purposes, outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) protected List identifier; /** * Identifies the 'type' of resource - equivalent to the resource name for other resources. */ - @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) protected CodeableConcept code; /** * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce. */ - @Child(name="subject", type={}, order=2, min=0, max=1) + @Child(name = "subject", type = {}, order = 2, min = 0, max = 1) @Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." ) protected Reference subject; @@ -73,7 +73,7 @@ public class Basic extends DomainResource { /** * Indicates who was responsible for creating the resource instance. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) protected Reference author; @@ -85,7 +85,7 @@ public class Basic extends DomainResource { /** * Identifies when the resource was first created. */ - @Child(name="created", type={DateType.class}, order=4, min=0, max=1) + @Child(name = "created", type = {DateType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) protected DateType created; @@ -343,12 +343,12 @@ public class Basic extends DomainResource { @SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" ) - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "subject", path = "Basic.subject", description = "Identifies the", type = "reference") + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "created", path = "Basic.created", description = "When created", type = "date") + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name = "patient", path = "Basic.subject", description = "Identifies the", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java index 96beb3cd92d..718db72ffc7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java @@ -48,14 +48,14 @@ public class Binary extends Resource { /** * MimeType of the binary content represented as a standard MimeType (BCP 13). */ - @Child(name="contentType", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "contentType", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." ) protected CodeType contentType; /** * The actual content, base64 encoded. */ - @Child(name="content", type={Base64BinaryType.class}, order=1, min=1, max=1) + @Child(name = "content", type = {Base64BinaryType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." ) protected Base64BinaryType content; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java index 8ef8942ce7e..e62560b9073 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java @@ -393,35 +393,35 @@ public class BodySite extends DomainResource { /** * Identifier for this instance of the anatomical location. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Bodysite identifier", formalDefinition="Identifier for this instance of the anatomical location." ) protected List identifier; /** * The Specific and identified anatomical location. */ - @Child(name="specificLocation", type={}, order=1, min=0, max=1) + @Child(name = "specificLocation", type = {}, order = 1, min = 0, max = 1) @Description(shortDefinition="Specific anatomical location", formalDefinition="The Specific and identified anatomical location." ) protected BodySiteSpecificLocationComponent specificLocation; /** * Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference. */ - @Child(name="relativeLocation", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "relativeLocation", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Relative anatomical location(s)", formalDefinition="Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference." ) protected List relativeLocation; /** * Description of anatomical location. */ - @Child(name="description", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The Description of anatomical location", formalDefinition="Description of anatomical location." ) protected StringType description; /** * Image or images used to identify a location. */ - @Child(name="image", type={Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "image", type = {Attachment.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." ) protected List image; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java index 3cce37099d8..bf527090803 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java @@ -947,7 +947,7 @@ public class Bundle extends Resource implements IBaseBundle { /** * Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention". */ - @Child(name="ifModifiedSince", type={InstantType.class}, order=5, min=0, max=1) + @Child(name = "ifModifiedSince", type = {InstantType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'." ) protected InstantType ifModifiedSince; @@ -1166,7 +1166,7 @@ public class Bundle extends Resource implements IBaseBundle { if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryTransactionComponent.ifModifiedSince"); else if (Configuration.doAutoCreate()) - this.ifModifiedSince = new InstantType(); // bb + this.ifModifiedSince = new InstantType(); // bb return this.ifModifiedSince; } @@ -1196,12 +1196,12 @@ public class Bundle extends Resource implements IBaseBundle { /** * @param value Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention". */ - public BundleEntryTransactionComponent setIfModifiedSince(Date value) { - if (value == null) + public BundleEntryTransactionComponent setIfModifiedSince(Date value) { + if (value == null) this.ifModifiedSince = null; else { if (this.ifModifiedSince == null) - this.ifModifiedSince = new InstantType(); + this.ifModifiedSince = new InstantType(); this.ifModifiedSince.setValue(value); } return this; @@ -1262,7 +1262,7 @@ public class Bundle extends Resource implements IBaseBundle { childrenList.add(new Property("url", "uri", "A search URL for this resource that specifies how the resource is matched to an existing resource when processing a transaction (see transaction documentation).", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch)); childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifMatch)); - childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); + childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see 'Conditional Create'.", 0, java.lang.Integer.MAX_VALUE, ifNoneExist)); } @@ -1330,15 +1330,15 @@ public class Bundle extends Resource implements IBaseBundle { /** * The etag for the resource, it the operation for the entry produced a versioned resource. */ - @Child(name="etag", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "etag", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The etag for the resource (if relevant)", formalDefinition="The etag for the resource, it the operation for the entry produced a versioned resource." ) protected StringType etag; /** * The date/time that the resource was modified on the server. */ - @Child(name="lastModified", type={InstantType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." ) + @Child(name = "lastModified", type = {InstantType.class}, order = 4, min = 0, max = 1) + @Description(shortDefinition = "Server's date time modified", formalDefinition = "The date/time that the resource was modified on the server.") protected InstantType lastModified; private static final long serialVersionUID = -1526413234L; @@ -1451,97 +1451,97 @@ public class Bundle extends Resource implements IBaseBundle { */ public StringType getEtagElement() { if (this.etag == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.etag"); - else if (Configuration.doAutoCreate()) - this.etag = new StringType(); // bb + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.etag"); + else if (Configuration.doAutoCreate()) + this.etag = new StringType(); // bb return this.etag; } - public boolean hasEtagElement() { - return this.etag != null && !this.etag.isEmpty(); + public boolean hasEtagElement() { + return this.etag != null && !this.etag.isEmpty(); } - public boolean hasEtag() { - return this.etag != null && !this.etag.isEmpty(); + public boolean hasEtag() { + return this.etag != null && !this.etag.isEmpty(); } /** * @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value */ - public BundleEntryTransactionResponseComponent setEtagElement(StringType value) { - this.etag = value; - return this; + public BundleEntryTransactionResponseComponent setEtagElement(StringType value) { + this.etag = value; + return this; } /** * @return The etag for the resource, it the operation for the entry produced a versioned resource. */ - public String getEtag() { - return this.etag == null ? null : this.etag.getValue(); + public String getEtag() { + return this.etag == null ? null : this.etag.getValue(); } /** * @param value The etag for the resource, it the operation for the entry produced a versioned resource. */ - public BundleEntryTransactionResponseComponent setEtag(String value) { - if (Utilities.noString(value)) - this.etag = null; - else { - if (this.etag == null) - this.etag = new StringType(); - this.etag.setValue(value); - } + public BundleEntryTransactionResponseComponent setEtag(String value) { + if (Utilities.noString(value)) + this.etag = null; + else { + if (this.etag == null) + this.etag = new StringType(); + this.etag.setValue(value); + } return this; } /** * @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value */ - public InstantType getLastModifiedElement() { - if (this.lastModified == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.lastModified"); - else if (Configuration.doAutoCreate()) - this.lastModified = new InstantType(); // bb - return this.lastModified; + public InstantType getLastModifiedElement() { + if (this.lastModified == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.lastModified"); + else if (Configuration.doAutoCreate()) + this.lastModified = new InstantType(); // bb + return this.lastModified; } - public boolean hasLastModifiedElement() { - return this.lastModified != null && !this.lastModified.isEmpty(); + public boolean hasLastModifiedElement() { + return this.lastModified != null && !this.lastModified.isEmpty(); } - public boolean hasLastModified() { - return this.lastModified != null && !this.lastModified.isEmpty(); + public boolean hasLastModified() { + return this.lastModified != null && !this.lastModified.isEmpty(); } /** * @param value {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value */ - public BundleEntryTransactionResponseComponent setLastModifiedElement(InstantType value) { - this.lastModified = value; - return this; + public BundleEntryTransactionResponseComponent setLastModifiedElement(InstantType value) { + this.lastModified = value; + return this; } /** * @return The date/time that the resource was modified on the server. */ - public Date getLastModified() { - return this.lastModified == null ? null : this.lastModified.getValue(); + public Date getLastModified() { + return this.lastModified == null ? null : this.lastModified.getValue(); } /** * @param value The date/time that the resource was modified on the server. */ - public BundleEntryTransactionResponseComponent setLastModified(Date value) { - if (value == null) - this.lastModified = null; - else { - if (this.lastModified == null) - this.lastModified = new InstantType(); - this.lastModified.setValue(value); - } - return this; + public BundleEntryTransactionResponseComponent setLastModified(Date value) { + if (value == null) + this.lastModified = null; + else { + if (this.lastModified == null) + this.lastModified = new InstantType(); + this.lastModified.setValue(value); + } + return this; } protected void listChildren(List childrenList) { @@ -1549,7 +1549,7 @@ public class Bundle extends Resource implements IBaseBundle { childrenList.add(new Property("status", "string", "The status code returned by processing this entry.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("location", "uri", "The location header created by processing this operation.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("etag", "string", "The etag for the resource, it the operation for the entry produced a versioned resource.", 0, java.lang.Integer.MAX_VALUE, etag)); - childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); + childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); } public BundleEntryTransactionResponseComponent copy() { @@ -1557,8 +1557,8 @@ public class Bundle extends Resource implements IBaseBundle { copyValues(dst); dst.status = status == null ? null : status.copy(); dst.location = location == null ? null : location.copy(); - dst.etag = etag == null ? null : etag.copy(); - dst.lastModified = lastModified == null ? null : lastModified.copy(); + dst.etag = etag == null ? null : etag.copy(); + dst.lastModified = lastModified == null ? null : lastModified.copy(); return dst; } @@ -1570,7 +1570,7 @@ public class Bundle extends Resource implements IBaseBundle { return false; BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other; return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true) - && compareDeep(lastModified, o.lastModified, true); + && compareDeep(lastModified, o.lastModified, true); } @Override @@ -1581,12 +1581,12 @@ public class Bundle extends Resource implements IBaseBundle { return false; BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other; return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true) - && compareValues(lastModified, o.lastModified, true); + && compareValues(lastModified, o.lastModified, true); } public boolean isEmpty() { return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty()) - && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty()); + && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty()); } } @@ -1594,42 +1594,42 @@ public class Bundle extends Resource implements IBaseBundle { /** * Indicates the purpose of this bundle- how it was intended to be used. */ - @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="document | message | transaction | transaction-response | history | searchset | collection", formalDefinition="Indicates the purpose of this bundle- how it was intended to be used." ) protected Enumeration type; /** * The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base). */ - @Child(name="base", type={UriType.class}, order=1, min=0, max=1) + @Child(name = "base", type = {UriType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Stated Base URL", formalDefinition="The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base)." ) protected UriType base; /** * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). */ - @Child(name="total", type={IntegerType.class}, order=2, min=0, max=1) + @Child(name = "total", type = {IntegerType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="If search, the total number of matches", formalDefinition="If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)." ) protected IntegerType total; /** * A series of links that provide context to this bundle. */ - @Child(name="link", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "link", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." ) protected List link; /** * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only). */ - @Child(name="entry", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "entry", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Entry in the bundle - will have a resource, or information", formalDefinition="An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)." ) protected List entry; /** * XML Digital Signature - base64 encoded. */ - @Child(name="signature", type={Base64BinaryType.class}, order=5, min=0, max=1) + @Child(name = "signature", type = {Base64BinaryType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="XML Digital Signature (base64 encoded)", formalDefinition="XML Digital Signature - base64 encoded." ) protected Base64BinaryType signature; @@ -1964,8 +1964,8 @@ public class Bundle extends Resource implements IBaseBundle { public static final String SP_COMPOSITION = "composition"; @SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | history | searchset | collection", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="message", path="", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type="reference" ) - public static final String SP_MESSAGE = "message"; + @SearchParamDefinition(name = "message", path = "", description = "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type = "reference") + public static final String SP_MESSAGE = "message"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java index 9e0c4a4d794..003df978e4f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java @@ -1855,14 +1855,14 @@ public class CarePlan extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -1874,28 +1874,28 @@ public class CarePlan extends DomainResource { /** * Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." ) protected Enumeration status; /** * Indicates when the plan did (or is intended to) come into effect and end. */ - @Child(name="period", type={Period.class}, order=3, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) protected Period period; /** * Identifies the most recent date on which the plan has been revised. */ - @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name = "modified", type = {DateTimeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) protected DateTimeType modified; /** * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. */ - @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) protected List concern; /** @@ -1907,28 +1907,28 @@ public class CarePlan extends DomainResource { /** * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. */ - @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "participant", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) protected List participant; /** * Describes the intended objective(s) of carrying out the Care Plan. */ - @Child(name="goal", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "goal", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." ) protected List goal; /** * Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. */ - @Child(name="activity", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "activity", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Action to occur as part of plan", formalDefinition="Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) protected List activity; /** * General notes about the care plan not covered elsewhere. */ - @Child(name="notes", type={StringType.class}, order=9, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) protected StringType notes; @@ -2416,18 +2416,18 @@ public class CarePlan extends DomainResource { return ResourceType.CarePlan; } - @SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date" ) - public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "date", path = "CarePlan.period", description = "Time period plan covers", type = "date") + public static final String SP_DATE = "date"; @SearchParamDefinition(name="activitycode", path="CarePlan.activity.simple.code", description="Detail type of activity", type="token" ) public static final String SP_ACTIVITYCODE = "activitycode"; @SearchParamDefinition(name="activitydate", path="CarePlan.activity.simple.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" ) public static final String SP_ACTIVITYDATE = "activitydate"; - @SearchParamDefinition(name="activitydetail", path="CarePlan.activity.detail", description="Activity details defined in specific resource", type="reference" ) - public static final String SP_ACTIVITYDETAIL = "activitydetail"; - @SearchParamDefinition(name="condition", path="CarePlan.concern", description="Health issues this plan addresses", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="patient", path="CarePlan.patient", description="Who care plan is for", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "activitydetail", path = "CarePlan.activity.detail", description = "Activity details defined in specific resource", type = "reference") + public static final String SP_ACTIVITYDETAIL = "activitydetail"; + @SearchParamDefinition(name = "condition", path = "CarePlan.concern", description = "Health issues this plan addresses", type = "reference") + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name = "patient", path = "CarePlan.patient", description = "Who care plan is for", type = "reference") + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" ) public static final String SP_PARTICIPANT = "participant"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java index 2f67449bc2d..7addcd6ea0f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java @@ -270,14 +270,14 @@ public class CarePlan2 extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -289,28 +289,28 @@ public class CarePlan2 extends DomainResource { /** * Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." ) protected Enumeration status; /** * Indicates when the plan did (or is intended to) come into effect and end. */ - @Child(name="period", type={Period.class}, order=3, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) protected Period period; /** * Identifies the most recent date on which the plan has been revised. */ - @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name = "modified", type = {DateTimeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) protected DateTimeType modified; /** * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. */ - @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) protected List concern; /** @@ -322,21 +322,21 @@ public class CarePlan2 extends DomainResource { /** * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. */ - @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "participant", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) protected List participant; /** * General notes about the care plan not covered elsewhere. */ - @Child(name="notes", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) protected StringType notes; /** * Describes the intended objective(s) of carrying out the Care Plan. */ - @Child(name="goal", type={Goal.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "goal", type = {Goal.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="CarePlan Goal", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." ) protected List goal; /** @@ -348,7 +348,7 @@ public class CarePlan2 extends DomainResource { /** * Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. */ - @Child(name="activity", type={ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "activity", type = {ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="CarePlan Activity", formalDefinition="Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) protected List activity; /** @@ -871,11 +871,11 @@ public class CarePlan2 extends DomainResource { return ResourceType.CarePlan2; } - @SearchParamDefinition(name="date", path="CarePlan2.period", description="Time period plan covers", type="date" ) + @SearchParamDefinition(name = "date", path = "CarePlan2.period", description = "Time period plan covers", type = "date") public static final String SP_DATE = "date"; @SearchParamDefinition(name="condition", path="CarePlan2.concern", description="Health issues this plan addresses", type="reference" ) public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name="patient", path="CarePlan2.patient", description="Who care plan is for", type="reference" ) + @SearchParamDefinition(name = "patient", path = "CarePlan2.patient", description = "Who care plan is for", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="participant", path="CarePlan2.participant.member", description="Who is involved", type="reference" ) public static final String SP_PARTICIPANT = "participant"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java index 9c83c26786f..28b71852adc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java @@ -2536,14 +2536,14 @@ public class ClaimResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Response number", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource referrence. */ - @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order=1, min=0, max=1) + @Child(name = "request", type = {OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) protected Reference request; @@ -2555,28 +2555,28 @@ public class ClaimResponse extends DomainResource { /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=3, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=5, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -2588,7 +2588,7 @@ public class ClaimResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -2600,7 +2600,7 @@ public class ClaimResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -2612,119 +2612,119 @@ public class ClaimResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "outcome", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=9, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * Party to be reimbursed: Subscriber, provider, other. */ - @Child(name="payeeType", type={Coding.class}, order=10, min=0, max=1) + @Child(name = "payeeType", type = {Coding.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) protected Coding payeeType; /** * The first tier service adjudications for submitted services. */ - @Child(name="item", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Line items", formalDefinition="The first tier service adjudications for submitted services." ) protected List item; /** * The first tier service adjudications for payor added services. */ - @Child(name="additem", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additem", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." ) protected List additem; /** * Mutually exclusive with Services Provided (Item). */ - @Child(name="error", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "error", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) protected List error; /** * The total cost of the services reported. */ - @Child(name="totalCost", type={Money.class}, order=14, min=0, max=1) + @Child(name = "totalCost", type = {Money.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." ) protected Money totalCost; /** * The amount of deductable applied which was not allocated to any particular service line. */ - @Child(name="unallocDeductable", type={Money.class}, order=15, min=0, max=1) + @Child(name = "unallocDeductable", type = {Money.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Unallocated deductable", formalDefinition="The amount of deductable applied which was not allocated to any particular service line." ) protected Money unallocDeductable; /** * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable). */ - @Child(name="totalBenefit", type={Money.class}, order=16, min=0, max=1) + @Child(name = "totalBenefit", type = {Money.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable)." ) protected Money totalBenefit; /** * Adjustment to the payment of this transaction which is not related to adjudication of this transaction. */ - @Child(name="paymentAdjustment", type={Money.class}, order=17, min=0, max=1) + @Child(name = "paymentAdjustment", type = {Money.class}, order = 17, min = 0, max = 1) @Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." ) protected Money paymentAdjustment; /** * Reason for the payment adjustment. */ - @Child(name="paymentAdjustmentReason", type={Coding.class}, order=18, min=0, max=1) + @Child(name = "paymentAdjustmentReason", type = {Coding.class}, order = 18, min = 0, max = 1) @Description(shortDefinition="Reason for Payment adjustment", formalDefinition="Reason for the payment adjustment." ) protected Coding paymentAdjustmentReason; /** * Estimated payment data. */ - @Child(name="paymentDate", type={DateType.class}, order=19, min=0, max=1) + @Child(name = "paymentDate", type = {DateType.class}, order = 19, min = 0, max = 1) @Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." ) protected DateType paymentDate; /** * Payable less any payment adjustment. */ - @Child(name="paymentAmount", type={Money.class}, order=20, min=0, max=1) + @Child(name = "paymentAmount", type = {Money.class}, order = 20, min = 0, max = 1) @Description(shortDefinition="Payment amount", formalDefinition="Payable less any payment adjustment." ) protected Money paymentAmount; /** * Payment identifer. */ - @Child(name="paymentRef", type={Identifier.class}, order=21, min=0, max=1) + @Child(name = "paymentRef", type = {Identifier.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Payment identifier", formalDefinition="Payment identifer." ) protected Identifier paymentRef; /** * Status of funds reservation (For provider, for Patient, None). */ - @Child(name="reserved", type={Coding.class}, order=22, min=0, max=1) + @Child(name = "reserved", type = {Coding.class}, order = 22, min = 0, max = 1) @Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." ) protected Coding reserved; /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=23, min=0, max=1) + @Child(name = "form", type = {Coding.class}, order = 23, min = 0, max = 1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Note text. */ - @Child(name="note", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "note", type = {}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Processing notes", formalDefinition="Note text." ) protected List note; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java index 2ccfc334015..de77414476f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java @@ -470,7 +470,7 @@ public class ClinicalAssessment extends DomainResource { /** * The patient being asssesed. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="The patient being asssesed", formalDefinition="The patient being asssesed." ) protected Reference patient; @@ -482,7 +482,7 @@ public class ClinicalAssessment extends DomainResource { /** * The clinicial performing the assessment. */ - @Child(name="assessor", type={Practitioner.class}, order=1, min=1, max=1) + @Child(name = "assessor", type = {Practitioner.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="The clinicial performing the assessment", formalDefinition="The clinicial performing the assessment." ) protected Reference assessor; @@ -494,21 +494,21 @@ public class ClinicalAssessment extends DomainResource { /** * The point in time at which the assessment was concluded (not when it was recorded). */ - @Child(name="date", type={DateTimeType.class}, order=2, min=1, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." ) protected DateTimeType date; /** * A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. */ - @Child(name="description", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." ) protected StringType description; /** * A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes. */ - @Child(name="previous", type={ClinicalAssessment.class}, order=4, min=0, max=1) + @Child(name = "previous", type = {ClinicalAssessment.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." ) protected Reference previous; @@ -520,7 +520,7 @@ public class ClinicalAssessment extends DomainResource { /** * This a list of the general problems/conditions for a patient. */ - @Child(name="problem", type={Condition.class, AllergyIntolerance.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." ) protected List problem; /** @@ -532,7 +532,7 @@ public class ClinicalAssessment extends DomainResource { /** * A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment. */ - @Child(name="careplan", type={CarePlan.class}, order=6, min=0, max=1) + @Child(name = "careplan", type = {CarePlan.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="A specific careplan that prompted this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment." ) protected Reference careplan; @@ -544,7 +544,7 @@ public class ClinicalAssessment extends DomainResource { /** * A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment. */ - @Child(name="referral", type={ReferralRequest.class}, order=7, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="A specific referral that lead to this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment." ) protected Reference referral; @@ -556,56 +556,56 @@ public class ClinicalAssessment extends DomainResource { /** * One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes. */ - @Child(name="investigations", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "investigations", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="One or more sets of investigations (signs, symptions, etc)", formalDefinition="One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." ) protected List investigations; /** * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. */ - @Child(name="protocol", type={UriType.class}, order=9, min=0, max=1) + @Child(name = "protocol", type = {UriType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." ) protected UriType protocol; /** * A text summary of the investigations and the diagnosis. */ - @Child(name="summary", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "summary", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." ) protected StringType summary; /** * An specific diagnosis that was considered likely or relevant to ongoing treatment. */ - @Child(name="diagnosis", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Possible or likely diagnosis", formalDefinition="An specific diagnosis that was considered likely or relevant to ongoing treatment." ) protected List diagnosis; /** * Diagnoses/conditions resolved since the last assessment. */ - @Child(name="resolved", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "resolved", type = {CodeableConcept.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosies/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." ) protected List resolved; /** * Diagnosis considered not possible. */ - @Child(name="ruledOut", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "ruledOut", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." ) protected List ruledOut; /** * Estimate of likely outcome. */ - @Child(name="prognosis", type={StringType.class}, order=14, min=0, max=1) + @Child(name = "prognosis", type = {StringType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." ) protected StringType prognosis; /** * Plan of action after assessment. */ - @Child(name="plan", type={CarePlan.class}, order=15, min=0, max=1) + @Child(name = "plan", type = {CarePlan.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." ) protected Reference plan; @@ -617,7 +617,7 @@ public class ClinicalAssessment extends DomainResource { /** * Actions taken during assessment. */ - @Child(name="action", type={ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." ) protected List action; /** @@ -1457,29 +1457,29 @@ public class ClinicalAssessment extends DomainResource { @SearchParamDefinition(name="date", path="ClinicalAssessment.date", description="When the assessment occurred", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="previous", path="ClinicalAssessment.previous", description="Reference to last assessment", type="reference" ) + @SearchParamDefinition(name = "previous", path = "ClinicalAssessment.previous", description = "Reference to last assessment", type = "reference") public static final String SP_PREVIOUS = "previous"; - @SearchParamDefinition(name="assessor", path="ClinicalAssessment.assessor", description="The clinicial performing the assessment", type="reference" ) + @SearchParamDefinition(name = "assessor", path = "ClinicalAssessment.assessor", description = "The clinicial performing the assessment", type = "reference") public static final String SP_ASSESSOR = "assessor"; @SearchParamDefinition(name="careplan", path="ClinicalAssessment.careplan", description="A specific careplan that prompted this assessment", type="reference" ) public static final String SP_CAREPLAN = "careplan"; - @SearchParamDefinition(name="diagnosis", path="ClinicalAssessment.diagnosis.item", description="Specific text or code for diagnosis", type="token" ) + @SearchParamDefinition(name = "diagnosis", path = "ClinicalAssessment.diagnosis.item", description = "Specific text or code for diagnosis", type = "token") public static final String SP_DIAGNOSIS = "diagnosis"; @SearchParamDefinition(name="ruledout", path="ClinicalAssessment.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) public static final String SP_RULEDOUT = "ruledout"; - @SearchParamDefinition(name="problem", path="ClinicalAssessment.problem", description="General assessment of patient state", type="reference" ) + @SearchParamDefinition(name = "problem", path = "ClinicalAssessment.problem", description = "General assessment of patient state", type = "reference") public static final String SP_PROBLEM = "problem"; - @SearchParamDefinition(name="referral", path="ClinicalAssessment.referral", description="A specific referral that lead to this assessment", type="reference" ) + @SearchParamDefinition(name = "referral", path = "ClinicalAssessment.referral", description = "A specific referral that lead to this assessment", type = "reference") public static final String SP_REFERRAL = "referral"; @SearchParamDefinition(name="patient", path="ClinicalAssessment.patient", description="The patient being asssesed", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="investigation", path="ClinicalAssessment.investigations.item", description="Record of a specific investigation", type="reference" ) public static final String SP_INVESTIGATION = "investigation"; - @SearchParamDefinition(name="action", path="ClinicalAssessment.action", description="Actions taken during assessment", type="reference" ) + @SearchParamDefinition(name = "action", path = "ClinicalAssessment.action", description = "Actions taken during assessment", type = "reference") public static final String SP_ACTION = "action"; - @SearchParamDefinition(name="plan", path="ClinicalAssessment.plan", description="Plan of action after assessment", type="reference" ) + @SearchParamDefinition(name = "plan", path = "ClinicalAssessment.plan", description = "Plan of action after assessment", type = "reference") public static final String SP_PLAN = "plan"; - @SearchParamDefinition(name="resolved", path="ClinicalAssessment.resolved", description="Diagnosies/conditions resolved since previous assessment", type="token" ) + @SearchParamDefinition(name = "resolved", path = "ClinicalAssessment.resolved", description = "Diagnosies/conditions resolved since previous assessment", type = "token") public static final String SP_RESOLVED = "resolved"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java index 3e11dcd1144..14322f56ad6 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java @@ -35,7 +35,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; /** * Primitive type "code" in FHIR, when not bound to an enumerated list of codes */ -@DatatypeDef(name="code") +@DatatypeDef(name = "code") public class CodeType extends PrimitiveType implements Comparable { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java index 4a205bf6450..41cceda235e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java @@ -41,19 +41,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. */ @DatatypeDef(name="CodeableConcept") -public class CodeableConcept extends Type implements ICompositeType { +public class CodeableConcept extends Type implements ICompositeType { /** * A reference to a code defined by a terminology system. */ - @Child(name="coding", type={Coding.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coding", type = {Coding.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Code defined by a terminology system", formalDefinition="A reference to a code defined by a terminology system." ) protected List coding; /** * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. */ - @Child(name="text", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "text", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Plain text representation of the concept", formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." ) protected StringType text; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java index 6361030272a..5001695b79f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java @@ -47,42 +47,42 @@ public class Coding extends Type implements ICoding, ICompositeType { /** * The identification of the code system that defines the meaning of the symbol in the code. */ - @Child(name="system", type={UriType.class}, order=0, min=0, max=1) + @Child(name = "system", type = {UriType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Identity of the terminology system", formalDefinition="The identification of the code system that defines the meaning of the symbol in the code." ) protected UriType system; /** * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Version of the system - if relevant", formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." ) protected StringType version; /** * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). */ - @Child(name="code", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "code", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Symbol in syntax defined by the system", formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." ) protected CodeType code; /** * A representation of the meaning of the code in the system, following the rules of the system. */ - @Child(name="display", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "display", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Representation defined by the system", formalDefinition="A representation of the meaning of the code in the system, following the rules of the system." ) protected StringType display; /** * Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays). */ - @Child(name="primary", type={BooleanType.class}, order=4, min=0, max=1) + @Child(name = "primary", type = {BooleanType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="If this code was chosen directly by the user", formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." ) protected BooleanType primary; /** * The set of possible coded values this coding was chosen from or constrained by. */ - @Child(name="valueSet", type={ValueSet.class}, order=5, min=0, max=1) + @Child(name = "valueSet", type = {ValueSet.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Set this coding was chosen from", formalDefinition="The set of possible coded values this coding was chosen from or constrained by." ) protected Reference valueSet; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java index 98017f6b27f..24f7e319466 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java @@ -266,21 +266,21 @@ public class Communication extends DomainResource { /** * Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifier", formalDefinition="Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The type of message such as alert, notification, reminder, instruction, etc. */ - @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." ) protected CodeableConcept category; /** * The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication. */ - @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1) + @Child(name = "sender", type = {Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." ) protected Reference sender; @@ -292,7 +292,7 @@ public class Communication extends DomainResource { /** * The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication. */ - @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "recipient", type = {Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication." ) protected List recipient; /** @@ -304,28 +304,28 @@ public class Communication extends DomainResource { /** * Text, attachment(s), or resource(s) to be communicated to the recipient. */ - @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "payload", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) protected List payload; /** * The communication medium, e.g., email, fax. */ - @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "medium", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." ) protected List medium; /** * The status of the transmission. */ - @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the transmission." ) protected Enumeration status; /** * The encounter within which the communication was sent. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication was sent." ) protected Reference encounter; @@ -337,28 +337,28 @@ public class Communication extends DomainResource { /** * The time when this communication was sent. */ - @Child(name="sent", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name = "sent", type = {DateTimeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="When sent", formalDefinition="The time when this communication was sent." ) protected DateTimeType sent; /** * The time when this communication arrived at the destination. */ - @Child(name="received", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "received", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="When received", formalDefinition="The time when this communication arrived at the destination." ) protected DateTimeType received; /** * The reason or justification for the communication. */ - @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication." ) protected List reason; /** * The patient who is the focus of this communication. */ - @Child(name="subject", type={Patient.class}, order=11, min=0, max=1) + @Child(name = "subject", type = {Patient.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication." ) protected Reference subject; @@ -926,27 +926,27 @@ public class Communication extends DomainResource { return ResourceType.Communication; } - @SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" ) + @SearchParamDefinition(name = "identifier", path = "Communication.identifier", description = "Unique identifier", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" ) public static final String SP_SENDER = "sender"; @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" ) + @SearchParamDefinition(name = "patient", path = "Communication.subject", description = "Focus of message", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference" ) + @SearchParamDefinition(name = "recipient", path = "Communication.recipient", description = "Message recipient", type = "reference") public static final String SP_RECIPIENT = "recipient"; @SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" ) public static final String SP_RECEIVED = "received"; @SearchParamDefinition(name="medium", path="Communication.medium", description="Communication medium", type="token" ) public static final String SP_MEDIUM = "medium"; - @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" ) + @SearchParamDefinition(name = "encounter", path = "Communication.encounter", description = "Encounter leading to message", type = "reference") public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" ) + @SearchParamDefinition(name = "category", path = "Communication.category", description = "Message category", type = "token") public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" ) + @SearchParamDefinition(name = "sent", path = "Communication.sent", description = "When sent", type = "date") public static final String SP_SENT = "sent"; - @SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" ) + @SearchParamDefinition(name = "status", path = "Communication.status", description = "in-progress | completed | suspended | rejected | failed", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java index 1cc6f06f053..91e68443758 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java @@ -336,21 +336,21 @@ public class CommunicationRequest extends DomainResource { /** * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifier", formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system." ) protected List identifier; /** * The type of message such as alert, notification, reminder, instruction, etc. */ - @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." ) protected CodeableConcept category; /** * The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication. */ - @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1) + @Child(name = "sender", type = {Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." ) protected Reference sender; @@ -362,7 +362,7 @@ public class CommunicationRequest extends DomainResource { /** * The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication. */ - @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "recipient", type = {Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication." ) protected List recipient; /** @@ -374,21 +374,21 @@ public class CommunicationRequest extends DomainResource { /** * Text, attachment(s), or resource(s) to be communicated to the recipient. */ - @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "payload", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) protected List payload; /** * The communication medium, e.g., email, fax. */ - @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "medium", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." ) protected List medium; /** * The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application. */ - @Child(name="requester", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1) + @Child(name = "requester", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Requester of communication", formalDefinition="The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application." ) protected Reference requester; @@ -400,14 +400,14 @@ public class CommunicationRequest extends DomainResource { /** * The status of the proposal or order. */ - @Child(name="status", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the proposal or order." ) protected Enumeration status; /** * The encounter within which the communication request was created. */ - @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication request was created." ) protected Reference encounter; @@ -419,28 +419,28 @@ public class CommunicationRequest extends DomainResource { /** * The time when this communication is to occur. */ - @Child(name="scheduledTime", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "scheduledTime", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." ) protected DateTimeType scheduledTime; /** * The reason or justification for the communication request. */ - @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication request." ) protected List reason; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=11, min=0, max=1) + @Child(name = "orderedOn", type = {DateTimeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The patient who is the focus of this communication request. */ - @Child(name="subject", type={Patient.class}, order=12, min=0, max=1) + @Child(name = "subject", type = {Patient.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication request." ) protected Reference subject; @@ -452,7 +452,7 @@ public class CommunicationRequest extends DomainResource { /** * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. */ - @Child(name="priority", type={CodeableConcept.class}, order=13, min=0, max=1) + @Child(name = "priority", type = {CodeableConcept.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." ) protected CodeableConcept priority; @@ -1087,27 +1087,27 @@ public class CommunicationRequest extends DomainResource { public static final String SP_REQUESTER = "requester"; @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="ordered", path="CommunicationRequest.orderedOn", description="When ordered or proposed", type="date" ) + @SearchParamDefinition(name = "ordered", path = "CommunicationRequest.orderedOn", description = "When ordered or proposed", type = "date") public static final String SP_ORDERED = "ordered"; - @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + @SearchParamDefinition(name = "subject", path = "CommunicationRequest.subject", description = "Focus of message", type = "reference") public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="Communication medium", type="token" ) public static final String SP_MEDIUM = "medium"; - @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" ) + @SearchParamDefinition(name = "encounter", path = "CommunicationRequest.encounter", description = "Encounter leading to message", type = "reference") public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) + @SearchParamDefinition(name = "priority", path = "CommunicationRequest.priority", description = "Message urgency", type = "token") public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" ) + @SearchParamDefinition(name = "sender", path = "CommunicationRequest.sender", description = "Message sender", type = "reference") public static final String SP_SENDER = "sender"; - @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + @SearchParamDefinition(name = "patient", path = "CommunicationRequest.subject", description = "Focus of message", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" ) public static final String SP_RECIPIENT = "recipient"; - @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledTime", description="When scheduled", type="date" ) + @SearchParamDefinition(name = "time", path = "CommunicationRequest.scheduledTime", description = "When scheduled", type = "date") public static final String SP_TIME = "time"; - @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) + @SearchParamDefinition(name = "category", path = "CommunicationRequest.category", description = "Message category", type = "token") public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" ) + @SearchParamDefinition(name = "status", path = "CommunicationRequest.status", description = "proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java index 8460ee13cfb..6ec043207e8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java @@ -898,56 +898,56 @@ public class Composition extends DomainResource { /** * Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical identifier of composition (version-independent)", formalDefinition="Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time." ) protected Identifier identifier; /** * The composition editing time, when the composition was last logically changed by the author. */ - @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." ) protected DateTimeType date; /** * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." ) protected CodeableConcept type; /** * A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type. */ - @Child(name="class_", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "class_", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type." ) protected CodeableConcept class_; /** * Official human-readable label for the composition. */ - @Child(name="title", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "title", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." ) protected StringType title; /** * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. */ - @Child(name="status", type={CodeType.class}, order=5, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." ) protected Enumeration status; /** * The code specifying the level of confidentiality of the Composition. */ - @Child(name="confidentiality", type={Coding.class}, order=6, min=1, max=1) + @Child(name = "confidentiality", type = {Coding.class}, order = 6, min = 1, max = 1) @Description(shortDefinition="As defined by affinity domain", formalDefinition="The code specifying the level of confidentiality of the Composition." ) protected Coding confidentiality; /** * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order=7, min=1, max=1) + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." ) protected Reference subject; @@ -959,7 +959,7 @@ public class Composition extends DomainResource { /** * Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.). */ - @Child(name="author", type={Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=8, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "author", type = {Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order = 8, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.)." ) protected List author; /** @@ -971,14 +971,14 @@ public class Composition extends DomainResource { /** * A participant who has attested to the accuracy of the composition/document. */ - @Child(name="attester", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "attester", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." ) protected List attester; /** * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information. */ - @Child(name="custodian", type={Organization.class}, order=10, min=0, max=1) + @Child(name = "custodian", type = {Organization.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Org which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." ) protected Reference custodian; @@ -990,14 +990,14 @@ public class Composition extends DomainResource { /** * The clinical service, such as a colonoscopy or an appendectomy, being documented. */ - @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "event", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." ) protected List event; /** * Describes the clinical encounter or type of care this documentation is associated with. */ - @Child(name="encounter", type={Encounter.class}, order=12, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Context of the conposition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." ) protected Reference encounter; @@ -1009,7 +1009,7 @@ public class Composition extends DomainResource { /** * The root of the sections that make up the composition. */ - @Child(name="section", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "section", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." ) protected List section; @@ -1619,34 +1619,34 @@ public class Composition extends DomainResource { @SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) - public static final String SP_PERIOD = "period"; - @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) - public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "identifier", path = "Composition.identifier", description = "Logical identifier of composition (version-independent)", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "period", path = "Composition.event.period", description = "The period covered by the documentation", type = "date") + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name = "subject", path = "Composition.subject", description = "Who and/or what the composition is about", type = "reference") + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" ) public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) - public static final String SP_CONFIDENTIALITY = "confidentiality"; - @SearchParamDefinition(name="section-code", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) - public static final String SP_SECTIONCODE = "section-code"; - @SearchParamDefinition(name="section", path="Composition.section.content", description="The Content of the section", type="reference" ) - public static final String SP_SECTION = "section"; - @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "confidentiality", path = "Composition.confidentiality", description = "As defined by affinity domain", type = "token") + public static final String SP_CONFIDENTIALITY = "confidentiality"; + @SearchParamDefinition(name = "section-code", path = "Composition.section.code", description = "Classification of section (recommended)", type = "token") + public static final String SP_SECTIONCODE = "section-code"; + @SearchParamDefinition(name = "section", path = "Composition.section.content", description = "The Content of the section", type = "reference") + public static final String SP_SECTION = "section"; + @SearchParamDefinition(name = "type", path = "Composition.type", description = "Kind of composition (LOINC if possible)", type = "token") + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) public static final String SP_TITLE = "title"; @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" ) public static final String SP_ATTESTER = "attester"; - @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "patient", path = "Composition.subject", description = "Who and/or what the composition is about", type = "reference") + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) public static final String SP_CONTEXT = "context"; - @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) - public static final String SP_CLASS = "class"; - @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | appended | amended | entered-in-error", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "class", path = "Composition.class", description = "Categorization of Composition", type = "token") + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name = "status", path = "Composition.status", description = "preliminary | final | appended | amended | entered-in-error", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java index 99ab342b186..e14985dc0f1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java @@ -1092,91 +1092,91 @@ public class ConceptMap extends DomainResource { /** * The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical id to reference this concept map", formalDefinition="The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected StringType identifier; /** * The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the concept map", formalDefinition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name describing the concept map. */ - @Child(name="name", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." ) protected StringType name; /** * The name of the individual or organization that published the concept map. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." ) protected StringType publisher; /** * Contacts of the publisher to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." ) protected StringType description; /** * A copyright statement relating to the concept map and/or its contents. */ - @Child(name="copyright", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "copyright", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="About the concept map or its content", formalDefinition="A copyright statement relating to the concept map and/or its contents." ) protected StringType copyright; /** * The status of the concept map. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." ) protected Enumeration status; /** * This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that the concept map status was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Date for given status", formalDefinition="The date that the concept map status was last changed." ) protected DateTimeType date; /** * The source value set that specifies the concepts that are being mapped. */ - @Child(name="source", type={UriType.class, ValueSet.class, Profile.class}, order=10, min=1, max=1) + @Child(name = "source", type = {UriType.class, ValueSet.class, Profile.class}, order = 10, min = 1, max = 1) @Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." ) protected Type source; /** * The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made. */ - @Child(name="target", type={UriType.class, ValueSet.class, Profile.class}, order=11, min=1, max=1) + @Child(name = "target", type = {UriType.class, ValueSet.class, Profile.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." ) protected Type target; /** * Mappings for an individual concept in the source to one or more concepts in the target. */ - @Child(name="element", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "element", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." ) protected List element; @@ -1849,30 +1849,30 @@ public class ConceptMap extends DomainResource { return ResourceType.ConceptMap; } - @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="The identifier of the concept map", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "date", path = "ConceptMap.date", description = "The concept map publication date", type = "date") + public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "identifier", path = "ConceptMap.identifier", description = "The identifier of the concept map", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="token" ) public static final String SP_PRODUCT = "product"; @SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="token" ) public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name="dependson", path="ConceptMap.element.dependsOn.element", description="Reference to element/field/valueset mapping depends on", type="token" ) - public static final String SP_DEPENDSON = "dependson"; + @SearchParamDefinition(name = "dependson", path = "ConceptMap.element.dependsOn.element", description = "Reference to element/field/valueset mapping depends on", type = "token") + public static final String SP_DEPENDSON = "dependson"; @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" ) - public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name = "description", path = "ConceptMap.description", description = "Text search in the description of the concept map", type = "string") + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "source", path = "ConceptMap.source[x]", description = "The system for any concepts mapped by this concept map", type = "reference") + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) - public static final String SP_TARGET = "target"; + @SearchParamDefinition(name = "status", path = "ConceptMap.status", description = "Status of the concept map", type = "token") + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "target", path = "ConceptMap.target[x]", description = "Provides context to the mappings", type = "reference") + public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java index 6d6ab86331e..da9c9a247dc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java @@ -818,14 +818,14 @@ public class Condition extends DomainResource { /** * This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this condition", formalDefinition="This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Indicates the patient who the condition record is associated with. */ - @Child(name="subject", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Who has the condition?", formalDefinition="Indicates the patient who the condition record is associated with." ) protected Reference subject; @@ -837,7 +837,7 @@ public class Condition extends DomainResource { /** * Encounter during which the condition was first asserted. */ - @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Encounter when condition first asserted", formalDefinition="Encounter during which the condition was first asserted." ) protected Reference encounter; @@ -849,7 +849,7 @@ public class Condition extends DomainResource { /** * Person who takes responsibility for asserting the existence of the condition as part of the electronic record. */ - @Child(name="asserter", type={Practitioner.class, Patient.class}, order=3, min=0, max=1) + @Child(name = "asserter", type = {Practitioner.class, Patient.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Person who asserts this condition", formalDefinition="Person who takes responsibility for asserting the existence of the condition as part of the electronic record." ) protected Reference asserter; @@ -861,98 +861,98 @@ public class Condition extends DomainResource { /** * Estimated or actual date the condition/problem/diagnosis was first detected/suspected. */ - @Child(name="dateAsserted", type={DateType.class}, order=4, min=0, max=1) + @Child(name = "dateAsserted", type = {DateType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When first detected/suspected/entered", formalDefinition="Estimated or actual date the condition/problem/diagnosis was first detected/suspected." ) protected DateType dateAsserted; /** * Identification of the condition, problem or diagnosis. */ - @Child(name="code", type={CodeableConcept.class}, order=5, min=1, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." ) protected CodeableConcept code; /** * A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis. */ - @Child(name="category", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="E.g. complaint | symptom | finding | diagnosis", formalDefinition="A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis." ) protected CodeableConcept category; /** * The clinical status of the condition. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="provisional | working | confirmed | refuted", formalDefinition="The clinical status of the condition." ) protected Enumeration status; /** * The degree of confidence that this condition is correct. */ - @Child(name="certainty", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name = "certainty", type = {CodeableConcept.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Degree of confidence", formalDefinition="The degree of confidence that this condition is correct." ) protected CodeableConcept certainty; /** * A subjective assessment of the severity of the condition as evaluated by the clinician. */ - @Child(name="severity", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name = "severity", type = {CodeableConcept.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." ) protected CodeableConcept severity; /** * Estimated or actual date or date-time the condition began, in the opinion of the clinician. */ - @Child(name="onset", type={DateTimeType.class, Age.class}, order=10, min=0, max=1) + @Child(name = "onset", type = {DateTimeType.class, Age.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Estimated or actual date, date-time, or age", formalDefinition="Estimated or actual date or date-time the condition began, in the opinion of the clinician." ) protected Type onset; /** * The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate. */ - @Child(name="abatement", type={DateType.class, Age.class, BooleanType.class}, order=11, min=0, max=1) + @Child(name = "abatement", type = {DateType.class, Age.class, BooleanType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="If/when in resolution/remission", formalDefinition="The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate." ) protected Type abatement; /** * Clinical stage or grade of a condition. May include formal severity assessments. */ - @Child(name="stage", type={}, order=12, min=0, max=1) + @Child(name = "stage", type = {}, order = 12, min = 0, max = 1) @Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." ) protected ConditionStageComponent stage; /** * Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed. */ - @Child(name="evidence", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "evidence", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Supporting evidence", formalDefinition="Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed." ) protected List evidence; /** * The anatomical location where this condition manifests itself. */ - @Child(name="location", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "location", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." ) protected List location; /** * Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition. */ - @Child(name="dueTo", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dueTo", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Causes for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition." ) protected List dueTo; /** * Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition. */ - @Child(name="occurredFollowing", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "occurredFollowing", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Precedent for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition." ) protected List occurredFollowing; /** * Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. */ - @Child(name="notes", type={StringType.class}, order=17, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 17, min = 0, max = 1) @Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." ) protected StringType notes; @@ -1709,35 +1709,35 @@ public class Condition extends DomainResource { public static final String SP_SEVERITY = "severity"; @SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" ) + @SearchParamDefinition(name = "evidence", path = "Condition.evidence.code", description = "Manifestation/symptom", type = "token") public static final String SP_EVIDENCE = "evidence"; @SearchParamDefinition(name="date-asserted", path="Condition.dateAsserted", description="When first detected/suspected/entered", type="date" ) public static final String SP_DATEASSERTED = "date-asserted"; - @SearchParamDefinition(name="subject", path="Condition.subject", description="Who has the condition?", type="reference" ) + @SearchParamDefinition(name = "subject", path = "Condition.subject", description = "Who has the condition?", type = "reference") public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="dueto-item", path="Condition.dueTo.target", description="Relationship target resource", type="reference" ) + @SearchParamDefinition(name = "dueto-item", path = "Condition.dueTo.target", description = "Relationship target resource", type = "reference") public static final String SP_DUETOITEM = "dueto-item"; - @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" ) + @SearchParamDefinition(name = "encounter", path = "Condition.encounter", description = "Encounter when condition first asserted", type = "reference") public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="When the Condition started (if started on a date)", type="date" ) + @SearchParamDefinition(name = "onset", path = "Condition.onset[x]", description = "When the Condition started (if started on a date)", type = "date") public static final String SP_ONSET = "onset"; - @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" ) + @SearchParamDefinition(name = "asserter", path = "Condition.asserter", description = "Person who asserts this condition", type = "reference") public static final String SP_ASSERTER = "asserter"; @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" ) public static final String SP_STAGE = "stage"; - @SearchParamDefinition(name="following-item", path="Condition.occurredFollowing.target", description="Relationship target resource", type="reference" ) + @SearchParamDefinition(name = "following-item", path = "Condition.occurredFollowing.target", description = "Relationship target resource", type = "reference") public static final String SP_FOLLOWINGITEM = "following-item"; @SearchParamDefinition(name="patient", path="Condition.subject", description="Who has the condition?", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="dueto-code", path="Condition.dueTo.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) + @SearchParamDefinition(name = "dueto-code", path = "Condition.dueTo.codeableConcept", description = "Relationship target by means of a predefined code", type = "token") public static final String SP_DUETOCODE = "dueto-code"; - @SearchParamDefinition(name="location", path="Condition.location.code", description="Location - may include laterality", type="token" ) + @SearchParamDefinition(name = "location", path = "Condition.location.code", description = "Location - may include laterality", type = "token") public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" ) + @SearchParamDefinition(name = "category", path = "Condition.category", description = "The category of the condition", type = "token") public static final String SP_CATEGORY = "category"; - @SearchParamDefinition(name="following-code", path="Condition.occurredFollowing.codeableConcept", description="Relationship target by means of a predefined code", type="token" ) + @SearchParamDefinition(name = "following-code", path = "Condition.occurredFollowing.codeableConcept", description = "Relationship target by means of a predefined code", type = "token") public static final String SP_FOLLOWINGCODE = "following-code"; - @SearchParamDefinition(name="status", path="Condition.status", description="The status of the condition", type="token" ) + @SearchParamDefinition(name = "status", path = "Condition.status", description = "The status of the condition", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java index 9f857e107e8..86997a8702c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java @@ -169,15 +169,19 @@ public class Conformance extends DomainResource { } public String getDefinition() { switch (this) { - case CLIENT: return "The application acts as a client for this resource."; - case SERVER: return "The application acts as a server for this resource."; + case CLIENT: + return "The application acts as a client for this resource."; + case SERVER: + return "The application acts as a server for this resource."; default: return "?"; } } public String getDisplay() { switch (this) { - case CLIENT: return "Client"; - case SERVER: return "Server"; + case CLIENT: + return "Client"; + case SERVER: + return "Server"; default: return "?"; } } @@ -4621,105 +4625,105 @@ public class Conformance extends DomainResource { /** * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical id to reference this statement", formalDefinition="The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected StringType identifier; /** * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the conformance statement. */ - @Child(name="name", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." ) protected StringType name; /** * Name of Organization publishing this conformance statement. */ - @Child(name="publisher", type={StringType.class}, order=3, min=1, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Publishing Organization", formalDefinition="Name of Organization publishing this conformance statement." ) protected StringType publisher; /** * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contacts for Organization", formalDefinition="Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc." ) protected List telecom; /** * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) protected StringType description; /** * The status of this conformance statement. */ - @Child(name="status", type={CodeType.class}, order=6, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) protected Enumeration status; /** * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date (and optionally time) when the conformance statement was published. */ - @Child(name="date", type={DateTimeType.class}, order=8, min=1, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published." ) protected DateTimeType date; /** * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. */ - @Child(name="software", type={}, order=9, min=0, max=1) + @Child(name = "software", type = {}, order = 9, min = 0, max = 1) @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation." ) protected ConformanceSoftwareComponent software; /** * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. */ - @Child(name="implementation", type={}, order=10, min=0, max=1) + @Child(name = "implementation", type = {}, order = 10, min = 0, max = 1) @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) protected ConformanceImplementationComponent implementation; /** * The version of the FHIR specification on which this conformance statement is based. */ - @Child(name="fhirVersion", type={IdType.class}, order=11, min=1, max=1) + @Child(name = "fhirVersion", type = {IdType.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="FHIR Version", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) protected IdType fhirVersion; /** * A flag that indicates whether the application accepts unknown elements as part of a resource. */ - @Child(name="acceptUnknown", type={BooleanType.class}, order=12, min=1, max=1) + @Child(name = "acceptUnknown", type = {BooleanType.class}, order = 12, min = 1, max = 1) @Description(shortDefinition="True if application accepts unknown elements", formalDefinition="A flag that indicates whether the application accepts unknown elements as part of a resource." ) protected BooleanType acceptUnknown; /** * A list of the formats supported by this implementation. */ - @Child(name="format", type={CodeType.class}, order=13, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "format", type = {CodeType.class}, order = 13, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation." ) protected List format; /** * A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. */ - @Child(name="profile", type={Profile.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "profile", type = {Profile.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Profiles supported by the system", formalDefinition="A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile." ) protected List profile; /** @@ -4731,21 +4735,21 @@ public class Conformance extends DomainResource { /** * A definition of the restful capabilities of the solution, if any. */ - @Child(name="rest", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "rest", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) protected List rest; /** * A description of the messaging capabilities of the solution. */ - @Child(name="messaging", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "messaging", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) protected List messaging; /** * A document definition. */ - @Child(name="document", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "document", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) protected List document; @@ -5625,38 +5629,38 @@ public class Conformance extends DomainResource { return ResourceType.Conformance; } - @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="Conformance.identifier", description="The identifier of the conformance statement", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) - public static final String SP_SOFTWARE = "software"; + @SearchParamDefinition(name = "date", path = "Conformance.date", description = "The conformance statement publication date", type = "date") + public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "identifier", path = "Conformance.identifier", description = "The identifier of the conformance statement", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "software", path = "Conformance.software.name", description = "Part of a the name of a software application", type = "string") + public static final String SP_SOFTWARE = "software"; @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) public static final String SP_RESOURCE = "resource"; - @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" ) - public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name = "profile", path = "Conformance.rest.resource.profile", description = "A profile id invoked in a conformance statement", type = "reference") + public static final String SP_PROFILE = "profile"; @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) public static final String SP_FORMAT = "format"; - @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) - public static final String SP_FHIRVERSION = "fhirversion"; + @SearchParamDefinition(name = "description", path = "Conformance.description", description = "Text search in the description of the conformance statement", type = "string") + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "fhirversion", path = "Conformance.version", description = "The version of FHIR", type = "token") + public static final String SP_FHIRVERSION = "fhirversion"; @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles supported by the system", type="reference" ) - public static final String SP_SUPPORTEDPROFILE = "supported-profile"; + @SearchParamDefinition(name = "supported-profile", path = "Conformance.profile", description = "Profiles supported by the system", type = "reference") + public static final String SP_SUPPORTEDPROFILE = "supported-profile"; @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) public static final String SP_MODE = "mode"; - @SearchParamDefinition(name="security", path="Conformance.rest.security", description="Information about security of implementation", type="token" ) - public static final String SP_SECURITY = "security"; + @SearchParamDefinition(name = "security", path = "Conformance.rest.security", description = "Information about security of implementation", type = "token") + public static final String SP_SECURITY = "security"; @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) - public static final String SP_EVENT = "event"; - @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "publisher", path = "Conformance.publisher", description = "Name of the publisher of the conformance statement", type = "string") + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name = "event", path = "Conformance.messaging.event.code", description = "Event code in a conformance statement", type = "token") + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name = "status", path = "Conformance.status", description = "The current status of the conformance statement", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java index b99b1af2756..1838393b536 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java @@ -35,6 +35,6 @@ package org.hl7.fhir.instance.model; public class Constants { public final static String VERSION = "0.4.0"; - public final static String REVISION = "4117"; - public final static String DATE = "Wed Feb 18 12:09:23 EST 2015"; + public final static String REVISION = "4117"; + public final static String DATE = "Wed Feb 18 12:09:23 EST 2015"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java index 91571b84f9c..e8fabd25cec 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc. */ @DatatypeDef(name="ContactPoint") -public class ContactPoint extends Type implements ICompositeType { +public class ContactPoint extends Type implements ICompositeType { public enum ContactPointSystem { /** @@ -260,28 +260,28 @@ public class ContactPoint extends Type implements ICompositeType { /** * Telecommunications form for contact point - what communications system is required to make use of the contact. */ - @Child(name="system", type={CodeType.class}, order=0, min=0, max=1) + @Child(name = "system", type = {CodeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="phone | fax | email | url", formalDefinition="Telecommunications form for contact point - what communications system is required to make use of the contact." ) protected Enumeration system; /** * The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). */ - @Child(name="value", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "value", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="The actual contact point details", formalDefinition="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." ) protected StringType value; /** * Identifies the purpose for the contact point. */ - @Child(name="use", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="home | work | temp | old | mobile - purpose of this contact point", formalDefinition="Identifies the purpose for the contact point." ) protected Enumeration use; /** * Time period when the contact point was/is in use. */ - @Child(name="period", type={Period.class}, order=3, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Time period when the contact point was/is in use", formalDefinition="Time period when the contact point was/is in use." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java index 9a666f4160b..731baca1a56 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java @@ -765,14 +765,14 @@ public class Contract extends DomainResource { /** * Unique Id for this contract. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contract identifier", formalDefinition="Unique Id for this contract." ) protected List identifier; /** * Who and/or what this is about: typically Patient, Organization, property. */ - @Child(name="subject", type={}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "subject", type = {}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Subject", formalDefinition="Who and/or what this is about: typically Patient, Organization, property." ) protected List subject; /** @@ -784,7 +784,7 @@ public class Contract extends DomainResource { /** * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. */ - @Child(name="authority", type={Organization.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "authority", type = {Organization.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Authority", formalDefinition="A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc." ) protected List authority; /** @@ -796,7 +796,7 @@ public class Contract extends DomainResource { /** * A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations. */ - @Child(name="domain", type={Location.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "domain", type = {Location.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Domain", formalDefinition="A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations." ) protected List domain; /** @@ -808,70 +808,70 @@ public class Contract extends DomainResource { /** * Type of contract (Privacy-Security, Agreement, Insurance). */ - @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Type of contract", formalDefinition="Type of contract (Privacy-Security, Agreement, Insurance)." ) protected CodeableConcept type; /** * More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat). */ - @Child(name="subtype", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "subtype", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Subtype of contract", formalDefinition="More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat)." ) protected List subtype; /** * When this was issued. */ - @Child(name="issued", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "issued", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="When this was issued", formalDefinition="When this was issued." ) protected DateTimeType issued; /** * Relevant time/time-period when applicable. */ - @Child(name="applies", type={Period.class}, order=7, min=0, max=1) + @Child(name = "applies", type = {Period.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Effective time", formalDefinition="Relevant time/time-period when applicable." ) protected Period applies; /** * The number of repetitions of a service or product. */ - @Child(name="quantity", type={Quantity.class}, order=8, min=0, max=1) + @Child(name = "quantity", type = {Quantity.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected Quantity quantity; /** * The unit price product. */ - @Child(name="unitPrice", type={Money.class}, order=9, min=0, max=1) + @Child(name = "unitPrice", type = {Money.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The unit price product." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name="factor", type={DecimalType.class}, order=10, min=0, max=1) + @Child(name = "factor", type = {DecimalType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name="points", type={DecimalType.class}, order=11, min=0, max=1) + @Child(name = "points", type = {DecimalType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name="net", type={Money.class}, order=12, min=0, max=1) + @Child(name = "net", type = {Money.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * Contract author or responsible party. */ - @Child(name="author", type={Practitioner.class, RelatedPerson.class, Organization.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "author", type = {Practitioner.class, RelatedPerson.class, Organization.class}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contract author or responsible party", formalDefinition="Contract author or responsible party." ) protected List author; /** @@ -883,7 +883,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="grantor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "grantor", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="First Party or delegator", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List grantor; /** @@ -895,7 +895,7 @@ public class Contract extends DomainResource { /** * The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated. */ - @Child(name="grantee", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "grantee", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Second Party or delegatee", formalDefinition="The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated." ) protected List grantee; /** @@ -907,7 +907,7 @@ public class Contract extends DomainResource { /** * Who witnesses the contract. */ - @Child(name="witness", type={Practitioner.class, RelatedPerson.class, Patient.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "witness", type = {Practitioner.class, RelatedPerson.class, Patient.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Witness to the contract", formalDefinition="Who witnesses the contract." ) protected List witness; /** @@ -919,7 +919,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="executor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "executor", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Trustee", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List executor; /** @@ -931,7 +931,7 @@ public class Contract extends DomainResource { /** * First Party to the contract, may be the party who confers or delegates the rights defined in the contract. */ - @Child(name="notary", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notary", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Notary Public", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." ) protected List notary; /** @@ -943,70 +943,70 @@ public class Contract extends DomainResource { /** * List or contract signatures. */ - @Child(name="signer", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "signer", type = {}, order = 19, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Signer", formalDefinition="List or contract signatures." ) protected List signer; /** * The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time. */ - @Child(name="term", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "term", type = {}, order = 20, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The terms of the Contract", formalDefinition="The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time." ) protected List term; /** * Legally binding contract. */ - @Child(name="binding", type={Attachment.class}, order=21, min=0, max=1) + @Child(name = "binding", type = {Attachment.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding contract." ) protected Attachment binding; /** * Relevant time/time-period when applicable. */ - @Child(name="bindingDateTime", type={DateTimeType.class}, order=22, min=0, max=1) + @Child(name = "bindingDateTime", type = {DateTimeType.class}, order = 22, min = 0, max = 1) @Description(shortDefinition="Binding Contract effective time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType bindingDateTime; /** * Friendly Human readable form (might be a reference to the UI used to capture the contract). */ - @Child(name="friendly", type={Attachment.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "friendly", type = {Attachment.class}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Human readable contract text", formalDefinition="Friendly Human readable form (might be a reference to the UI used to capture the contract)." ) protected List friendly; /** * Relevant time/time-period when applicable. */ - @Child(name="friendlyDateTime", type={DateTimeType.class}, order=24, min=0, max=1) + @Child(name = "friendlyDateTime", type = {DateTimeType.class}, order = 24, min = 0, max = 1) @Description(shortDefinition="Human readable contract text effective time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType friendlyDateTime; /** * Legal text in Human readable form. */ - @Child(name="legal", type={Attachment.class}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "legal", type = {Attachment.class}, order = 25, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Legal contract text", formalDefinition="Legal text in Human readable form." ) protected List legal; /** * Relevant time/time-period when applicable. */ - @Child(name="legalDateTime", type={DateTimeType.class}, order=26, min=0, max=1) + @Child(name = "legalDateTime", type = {DateTimeType.class}, order = 26, min = 0, max = 1) @Description(shortDefinition="Legal contract text date time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType legalDateTime; /** * Computable Policy rules (e.g. XACML, DKAL, SecPal). */ - @Child(name="rule", type={Attachment.class}, order=27, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "rule", type = {Attachment.class}, order = 27, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Computable contract text", formalDefinition="Computable Policy rules (e.g. XACML, DKAL, SecPal)." ) protected List rule; /** * Relevant time/time-period when applicable. */ - @Child(name="ruleDateTime", type={DateTimeType.class}, order=28, min=0, max=1) + @Child(name = "ruleDateTime", type = {DateTimeType.class}, order = 28, min = 0, max = 1) @Description(shortDefinition="Computable contract text effect time", formalDefinition="Relevant time/time-period when applicable." ) protected DateTimeType ruleDateTime; @@ -2279,8 +2279,8 @@ public class Contract extends DomainResource { @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "patient", path = "Contract.subject", description = "The identity of the target of the contract (if a patient)", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java index dab774fee1b..33fe7c57768 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java @@ -248,7 +248,7 @@ public class Contraindication extends DomainResource { /** * Indicates the patient whose record the contraindication is associated with. */ - @Child(name="patient", type={Patient.class}, order=0, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the contraindication is associated with." ) protected Reference patient; @@ -260,21 +260,21 @@ public class Contraindication extends DomainResource { /** * Identifies the general type of issue identified. */ - @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="E.g. Drug-drug, duplicate therapy, etc.", formalDefinition="Identifies the general type of issue identified." ) protected CodeableConcept category; /** * Indicates the degree of importance associated with the identified issue based on the potential impact on the patient. */ - @Child(name="severity", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "severity", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="high | medium | low", formalDefinition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." ) protected CodeType severity; /** * Indicates the resource representing the current activity or proposed activity that. */ - @Child(name="implicated", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "implicated", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that." ) protected List implicated; /** @@ -286,21 +286,21 @@ public class Contraindication extends DomainResource { /** * A textual explanation of the contraindication. */ - @Child(name="detail", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "detail", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the contraindication." ) protected StringType detail; /** * The date or date-time when the contraindication was initially identified. */ - @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="When identified", formalDefinition="The date or date-time when the contraindication was initially identified." ) protected DateTimeType date; /** * Identifies the provider or software that identified the. */ - @Child(name="author", type={Practitioner.class, Device.class}, order=6, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Device.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Who found issue?", formalDefinition="Identifies the provider or software that identified the." ) protected Reference author; @@ -312,21 +312,21 @@ public class Contraindication extends DomainResource { /** * Business identifier associated with the contraindication record. */ - @Child(name="identifier", type={Identifier.class}, order=7, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Unique id for the contraindication", formalDefinition="Business identifier associated with the contraindication record." ) protected Identifier identifier; /** * The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified. */ - @Child(name="reference", type={UriType.class}, order=8, min=0, max=1) + @Child(name = "reference", type = {UriType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified." ) protected UriType reference; /** * Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action. */ - @Child(name="mitigation", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mitigation", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." ) protected List mitigation; @@ -815,11 +815,11 @@ public class Contraindication extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Contraindication.identifier", description="Unique id for the contraindication", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="patient", path="Contraindication.patient", description="Associated patient", type="reference" ) + @SearchParamDefinition(name = "patient", path = "Contraindication.patient", description = "Associated patient", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="implicated", path="Contraindication.implicated", description="Problem resource", type="reference" ) + @SearchParamDefinition(name = "implicated", path = "Contraindication.implicated", description = "Problem resource", type = "reference") public static final String SP_IMPLICATED = "implicated"; - @SearchParamDefinition(name="category", path="Contraindication.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" ) + @SearchParamDefinition(name = "category", path = "Contraindication.category", description = "E.g. Drug-drug, duplicate therapy, etc.", type = "token") public static final String SP_CATEGORY = "category"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java index e4b428ffe38..86505890b3a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java @@ -48,7 +48,7 @@ public class Coverage extends DomainResource { /** * The program or plan underwriter or payor. */ - @Child(name="issuer", type={Organization.class}, order=0, min=0, max=1) + @Child(name = "issuer", type = {Organization.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="An identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." ) protected Reference issuer; @@ -60,63 +60,63 @@ public class Coverage extends DomainResource { /** * Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. */ - @Child(name="period", type={Period.class}, order=1, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Coverage start and end dates", formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." ) protected Period period; /** * The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health. */ - @Child(name="type", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "type", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Type of coverage", formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health." ) protected Coding type; /** * The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID. */ - @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The primary coverage ID", formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID." ) protected List identifier; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name="group", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "group", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="An identifier for the group", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType group; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name="plan", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "plan", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="An identifier for the plan", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType plan; /** * Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. */ - @Child(name="subplan", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "subplan", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="An identifier for the subsection of the plan", formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID." ) protected StringType subplan; /** * A unique identifier for a dependent under the coverage. */ - @Child(name="dependent", type={IntegerType.class}, order=7, min=0, max=1) + @Child(name = "dependent", type = {IntegerType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) protected IntegerType dependent; /** * An optional counter for a particular instance of the identified coverage which increments upon each renewal. */ - @Child(name="sequence", type={IntegerType.class}, order=8, min=0, max=1) + @Child(name = "sequence", type = {IntegerType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="The plan instance or sequence counter", formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal." ) protected IntegerType sequence; /** * The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due. */ - @Child(name="subscriber", type={Patient.class}, order=9, min=0, max=1) + @Child(name = "subscriber", type = {Patient.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Plan holder information", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." ) protected Reference subscriber; @@ -128,14 +128,14 @@ public class Coverage extends DomainResource { /** * The identifier for a community of providers. */ - @Child(name="network", type={Identifier.class}, order=10, min=0, max=1) + @Child(name = "network", type = {Identifier.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Insurer network", formalDefinition="The identifier for a community of providers." ) protected Identifier network; /** * The policy(s) which constitute this insurance coverage. */ - @Child(name="contract", type={Contract.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contract", type = {Contract.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." ) protected List contract; /** @@ -712,20 +712,20 @@ public class Coverage extends DomainResource { return ResourceType.Coverage; } - @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "Coverage.identifier", description = "The primary identifier of the insured", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) public static final String SP_SEQUENCE = "sequence"; - @SearchParamDefinition(name="subplan", path="Coverage.subplan", description="Sub-plan identifier", type="token" ) - public static final String SP_SUBPLAN = "subplan"; - @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" ) - public static final String SP_PLAN = "plan"; + @SearchParamDefinition(name = "subplan", path = "Coverage.subplan", description = "Sub-plan identifier", type = "token") + public static final String SP_SUBPLAN = "subplan"; + @SearchParamDefinition(name = "type", path = "Coverage.type", description = "The kind of coverage", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "plan", path = "Coverage.plan", description = "A plan or policy identifier", type = "token") + public static final String SP_PLAN = "plan"; @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" ) public static final String SP_DEPENDENT = "dependent"; - @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" ) - public static final String SP_ISSUER = "issuer"; + @SearchParamDefinition(name = "issuer", path = "Coverage.issuer", description = "The identity of the insurer", type = "reference") + public static final String SP_ISSUER = "issuer"; @SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" ) public static final String SP_GROUP = "group"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java index 8f299c5b446..08a4c90ce5e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java @@ -964,154 +964,154 @@ public class DataElement extends DomainResource { /** * The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical id to reference this data element", formalDefinition="The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance." ) protected Identifier identifier; /** * The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the data element", formalDefinition="The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually." ) protected StringType version; /** * Details of the individual or organization who accepts responsibility for publishing the data element. */ - @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the data element." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * The status of the data element. */ - @Child(name="status", type={CodeType.class}, order=4, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." ) protected Enumeration status; /** * The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired). */ - @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Date for this version of the data element", formalDefinition="The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired)." ) protected DateTimeType date; /** * The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. */ - @Child(name="name", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." ) protected StringType name; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions. */ - @Child(name="category", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "category", type = {CodeableConcept.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions." ) protected List category; /** * Identifies how precise the data element is in its definition. */ - @Child(name="granularity", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "granularity", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." ) protected Enumeration granularity; /** * A code that provides the meaning for a data element according to a particular terminology. */ - @Child(name="code", type={Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "code", type = {Coding.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifying concept", formalDefinition="A code that provides the meaning for a data element according to a particular terminology." ) protected List code; /** * The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey). */ - @Child(name="question", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "question", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Prompt for element phrased as question", formalDefinition="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)." ) protected StringType question; /** * The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. */ - @Child(name="label", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "label", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." ) protected StringType label; /** * Provides a complete explanation of the meaning of the data element for human readability. */ - @Child(name="definition", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "definition", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Definition/description as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability." ) protected StringType definition; /** * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc. */ - @Child(name="comments", type={StringType.class}, order=13, min=0, max=1) + @Child(name = "comments", type = {StringType.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Comments about the use of this element", formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc." ) protected StringType comments; /** * Explains why this element is needed and why it's been constrained as it has. */ - @Child(name="requirements", type={StringType.class}, order=14, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this element is needed and why it's been constrained as it has." ) protected StringType requirements; /** * Identifies additional names by which this element might also be known. */ - @Child(name="synonym", type={StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "synonym", type = {StringType.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) protected List synonym; /** * The FHIR data type that is the type for data that corresponds to this data element. */ - @Child(name="type", type={CodeType.class}, order=16, min=0, max=1) + @Child(name = "type", type = {CodeType.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="Name of Data type", formalDefinition="The FHIR data type that is the type for data that corresponds to this data element." ) protected CodeType type; /** * A sample value for this element demonstrating the type of information that would typically be captured. */ - @Child(name="example", type={}, order=17, min=0, max=1) + @Child(name = "example", type = {}, order = 17, min = 0, max = 1) @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="A sample value for this element demonstrating the type of information that would typically be captured." ) protected org.hl7.fhir.instance.model.Type example; /** * Indicates the shortest length that SHALL be supported by conformant instances without truncation. */ - @Child(name="maxLength", type={IntegerType.class}, order=18, min=0, max=1) + @Child(name = "maxLength", type = {IntegerType.class}, order = 18, min = 0, max = 1) @Description(shortDefinition="Length for strings", formalDefinition="Indicates the shortest length that SHALL be supported by conformant instances without truncation." ) protected IntegerType maxLength; /** * Identifies the units of measure in which the data element should be captured or expressed. */ - @Child(name="units", type={CodeableConcept.class, ValueSet.class}, order=19, min=0, max=1) + @Child(name = "units", type = {CodeableConcept.class, ValueSet.class}, order = 19, min = 0, max = 1) @Description(shortDefinition="Units to use for measured value", formalDefinition="Identifies the units of measure in which the data element should be captured or expressed." ) protected Type units; /** * Binds to a value set if this element is coded (code, Coding, CodeableConcept). */ - @Child(name="binding", type={}, order=20, min=0, max=1) + @Child(name = "binding", type = {}, order = 20, min = 0, max = 1) @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)." ) protected DataElementBindingComponent binding; /** * Identifies a concept from an external specification that roughly corresponds to this element. */ - @Child(name="mapping", type={}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mapping", type = {}, order = 21, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) protected List mapping; @@ -2163,20 +2163,20 @@ public class DataElement extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="DataElement.identifier", description="The identifier of the data element", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="DataElement.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" ) - public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "code", path = "DataElement.code", description = "A code for the data element (server may choose to do subsumption)", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "name", path = "DataElement.name", description = "Name of the data element", type = "string") + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="DataElement.definition", description="Text search in the description of the data element", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="category", path="DataElement.category", description="A category assigned to the data element (server may choose to do subsumption)", type="token" ) - public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name = "description", path = "DataElement.definition", description = "Text search in the description of the data element", type = "string") + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "category", path = "DataElement.category", description = "A category assigned to the data element (server may choose to do subsumption)", type = "token") + public static final String SP_CATEGORY = "category"; @SearchParamDefinition(name="version", path="DataElement.version", description="The version identifier of the data element", type="string" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "DataElement.status", description = "The current status of the data element", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java index 9e563e658ff..2c6f33e0e8b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Device.java @@ -48,63 +48,63 @@ public class Device extends DomainResource { /** * Unique instance identifiers assigned to a device by organizations like manufacturers, owners or regulatory agencies. If the identifier identifies the type of device, Device.type should be used. An example is the FDA Mandated Unique Device Identifier (UDI) which identifies an instance of a device uniquely if the serial number is present, . - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Instance id from manufacturer, owner, regulatory agencies and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers, owners or regulatory agencies. If the identifier identifies the type of device, Device.type should be used. An example is the FDA Mandated Unique Device Identifier (UDI) which identifies an instance of a device uniquely if the serial number is present, . - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) protected List identifier; /** * Code or identifier to identify a kind of device An example is the FDA Mandated Unique Device Identifier (UDI) which identifies a type of a device when the serial number is absent, otherwise it uniquely identifies the device instance and Device.identifier should be used instead of Device.type. - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device An example is the FDA Mandated Unique Device Identifier (UDI) which identifies a type of a device when the serial number is absent, otherwise it uniquely identifies the device instance and Device.identifier should be used instead of Device.type. - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) protected CodeableConcept type; /** * A name of the manufacturer. */ - @Child(name="manufacturer", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "manufacturer", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) protected StringType manufacturer; /** * The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. */ - @Child(name="model", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "model", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The 'model' - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) protected StringType model; /** * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. */ - @Child(name="version", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) protected StringType version; /** * The Date and time when the device was manufactured. */ - @Child(name="manufactureDate", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "manufactureDate", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Manufacture date", formalDefinition="The Date and time when the device was manufactured." ) protected DateTimeType manufactureDate; /** * The date and time beyond which this device is no longer valid or should not be used (if applicable). */ - @Child(name="expiry", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "expiry", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." ) protected DateTimeType expiry; /** * Lot number assigned by the manufacturer. */ - @Child(name="lotNumber", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "lotNumber", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) protected StringType lotNumber; /** * An organization that is responsible for the provision and ongoing maintenance of the device. */ - @Child(name="owner", type={Organization.class}, order=8, min=0, max=1) + @Child(name = "owner", type = {Organization.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) protected Reference owner; @@ -116,7 +116,7 @@ public class Device extends DomainResource { /** * The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. "in/with the patient"), or a coded location. */ - @Child(name="location", type={Location.class}, order=9, min=0, max=1) + @Child(name = "location", type = {Location.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Where the resource is found", formalDefinition="The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. 'in/with the patient'), or a coded location." ) protected Reference location; @@ -128,7 +128,7 @@ public class Device extends DomainResource { /** * Patient information, if the resource is affixed to a person. */ - @Child(name="patient", type={Patient.class}, order=10, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." ) protected Reference patient; @@ -140,14 +140,14 @@ public class Device extends DomainResource { /** * Contact details for an organization or a particular human that is responsible for the device. */ - @Child(name="contact", type={ContactPoint.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contact", type = {ContactPoint.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) protected List contact; /** * A network address on which the device may be contacted directly. */ - @Child(name="url", type={UriType.class}, order=12, min=0, max=1) + @Child(name = "url", type = {UriType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) protected UriType url; @@ -809,10 +809,10 @@ public class Device extends DomainResource { return ResourceType.Device; } - @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, regulatory agencies and others", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "identifier", path = "Device.identifier", description = "Instance id from manufacturer, owner, regulatory agencies and others", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "patient", path = "Device.patient", description = "Patient information, if the resource is affixed to a person", type = "reference") + public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" ) public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" ) @@ -821,8 +821,8 @@ public class Device extends DomainResource { public static final String SP_LOCATION = "location"; @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) - public static final String SP_MANUFACTURER = "manufacturer"; + @SearchParamDefinition(name = "manufacturer", path = "Device.manufacturer", description = "The manufacturer of the device", type = "string") + public static final String SP_MANUFACTURER = "manufacturer"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java index 3b9c740fe3f..475ef8f3b98 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceComponent.java @@ -416,28 +416,28 @@ public class DeviceComponent extends DomainResource { /** * Describes the specific component type as defined in the object-oriented or metric nomenclature partition. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="What kind of component it is", formalDefinition="Describes the specific component type as defined in the object-oriented or metric nomenclature partition." ) protected CodeableConcept type; /** * Describes the local assigned unique identification by the software. For example: handle ID. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=1, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Instance id assigned by the software stack", formalDefinition="Describes the local assigned unique identification by the software. For example: handle ID." ) protected Identifier identifier; /** * Describes the timestamp for the most recent system change which includes device configuration or setting change. */ - @Child(name="lastSystemChange", type={InstantType.class}, order=2, min=1, max=1) + @Child(name = "lastSystemChange", type = {InstantType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Recent system change timestamp", formalDefinition="Describes the timestamp for the most recent system change which includes device configuration or setting change." ) protected InstantType lastSystemChange; /** * Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc. */ - @Child(name="source", type={Device.class}, order=3, min=0, max=1) + @Child(name = "source", type = {Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="A source device of this component", formalDefinition="Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc." ) protected Reference source; @@ -449,7 +449,7 @@ public class DeviceComponent extends DomainResource { /** * Describes the link to the parent resource. For example: Channel is linked to its VMD parent. */ - @Child(name="parent", type={DeviceComponent.class}, order=4, min=0, max=1) + @Child(name = "parent", type = {DeviceComponent.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Parent resource link", formalDefinition="Describes the link to the parent resource. For example: Channel is linked to its VMD parent." ) protected Reference parent; @@ -461,35 +461,35 @@ public class DeviceComponent extends DomainResource { /** * Indicates current operational status of the device. For example: On, Off, Standby, etc. */ - @Child(name="operationalStatus", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "operationalStatus", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Component operational status", formalDefinition="Indicates current operational status of the device. For example: On, Off, Standby, etc." ) protected List operationalStatus; /** * Describes the parameter group supported by the current device component that is based on some nomenclature, e.g., cardiovascular. */ - @Child(name="parameterGroup", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name = "parameterGroup", type = {CodeableConcept.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Current supported parameter group", formalDefinition="Describes the parameter group supported by the current device component that is based on some nomenclature, e.g., cardiovascular." ) protected CodeableConcept parameterGroup; /** * Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. */ - @Child(name="measurementPrinciple", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "measurementPrinciple", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="other | chemical | electrical | impedance | nuclear | optical | thermal | biological | mechanical | acoustical | manual+", formalDefinition="Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) protected Enumeration measurementPrinciple; /** * Describes the production specification such as component revision, serial number, etc. */ - @Child(name="productionSpecification", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "productionSpecification", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Production specification of the component", formalDefinition="Describes the production specification such as component revision, serial number, etc." ) protected List productionSpecification; /** * Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US. */ - @Child(name="languageCode", type={CodeableConcept.class}, order=9, min=0, max=1) + @Child(name = "languageCode", type = {CodeableConcept.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Language code for the human-readable text strings produced by the device", formalDefinition="Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US." ) protected CodeableConcept languageCode; @@ -927,7 +927,7 @@ public class DeviceComponent extends DomainResource { @SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference" ) public static final String SP_PARENT = "parent"; - @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference" ) + @SearchParamDefinition(name = "source", path = "DeviceComponent.source", description = "The device source", type = "reference") public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java index e85ecdc128a..53e75bee1b5 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceMetric.java @@ -655,29 +655,29 @@ public class DeviceMetric extends Resource { /** * Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Type of metric", formalDefinition="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." ) protected CodeableConcept type; /** - * Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. + * Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=1, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Unique identifier of this DeviceMetric", formalDefinition="Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. \nIt should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device." ) protected Identifier identifier; /** * Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc. */ - @Child(name="unit", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name = "unit", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Unit of metric", formalDefinition="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." ) protected CodeableConcept unit; /** * Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc. */ - @Child(name="source", type={Device.class}, order=3, min=0, max=1) + @Child(name = "source", type = {Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Describes the link to the source Device", formalDefinition="Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc." ) protected Reference source; @@ -687,15 +687,15 @@ It should be noted that in order to make the identifier unique, the system eleme protected Device sourceTarget; /** - * Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location. */ - @Child(name="parent", type={DeviceComponent.class}, order=4, min=0, max=1) + @Child(name = "parent", type = {DeviceComponent.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Describes the link to the parent DeviceComponent", formalDefinition="Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device.\nAn example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location." ) protected Reference parent; /** - * The actual object that is the target of the reference (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * The actual object that is the target of the reference (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) */ protected DeviceComponent parentTarget; @@ -703,44 +703,44 @@ An example would be a DeviceComponent that represents a Channel. This reference /** * Indicates current operational state of the device. For example: On, Off, Standby, etc. */ - @Child(name="operationalState", type={CodeType.class}, order=5, min=0, max=1) + @Child(name = "operationalState", type = {CodeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="on | off | standby", formalDefinition="Indicates current operational state of the device. For example: On, Off, Standby, etc." ) protected Enumeration operationalState; /** * Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. */ - @Child(name="measurementMode", type={Identifier.class}, order=6, min=0, max=1) + @Child(name = "measurementMode", type = {Identifier.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Describes the physical principle of the measurement", formalDefinition="Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) protected Identifier measurementMode; /** * Describes the typical color of the representation of observations that have been generated for this DeviceMetric. */ - @Child(name="color", type={Identifier.class}, order=7, min=0, max=1) + @Child(name = "color", type = {Identifier.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Describes the typical color of representation", formalDefinition="Describes the typical color of the representation of observations that have been generated for this DeviceMetric." ) protected Identifier color; /** * Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation. */ - @Child(name="category", type={CodeType.class}, order=8, min=1, max=1) + @Child(name = "category", type = {CodeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="measurement | setting | calculation | unspecified", formalDefinition="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." ) protected Enumeration category; /** - * Describes the measurement repetition time. This is not -necessarily the same as the update + * Describes the measurement repetition time. This is not +necessarily the same as the update period. */ - @Child(name="measurementPeriod", type={Timing.class}, order=9, min=0, max=1) + @Child(name = "measurementPeriod", type = {Timing.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Describes the measurement repetition time", formalDefinition="Describes the measurement repetition time. This is not\nnecessarily the same as the update\nperiod." ) protected Timing measurementPeriod; /** * Describes the calibrations that have been performed or that are required to be performed. */ - @Child(name="calibrationInfo", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "calibrationInfo", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Describes the calibrations that have been performed or that are required to be performed", formalDefinition="Describes the calibrations that have been performed or that are required to be performed." ) protected List calibrationInfo; @@ -782,7 +782,7 @@ period. } /** - * @return {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. + * @return {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) */ public Identifier getIdentifier() { @@ -799,7 +799,7 @@ It should be noted that in order to make the identifier unique, the system eleme } /** - * @param value {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. + * @param value {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) */ public DeviceMetric setIdentifier(Identifier value) { @@ -876,7 +876,7 @@ It should be noted that in order to make the identifier unique, the system eleme } /** - * @return {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * @return {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) */ public Reference getParent() { @@ -893,7 +893,7 @@ An example would be a DeviceComponent that represents a Channel. This reference } /** - * @param value {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * @param value {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) */ public DeviceMetric setParent(Reference value) { @@ -902,7 +902,7 @@ An example would be a DeviceComponent that represents a Channel. This reference } /** - * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) */ public DeviceComponent getParentTarget() { @@ -915,7 +915,7 @@ An example would be a DeviceComponent that represents a Channel. This reference } /** - * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. + * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) */ public DeviceMetric setParentTarget(DeviceComponent value) { @@ -1066,8 +1066,8 @@ An example would be a DeviceComponent that represents a Channel. This reference } /** - * @return {@link #measurementPeriod} (Describes the measurement repetition time. This is not -necessarily the same as the update + * @return {@link #measurementPeriod} (Describes the measurement repetition time. This is not +necessarily the same as the update period.) */ public Timing getMeasurementPeriod() { @@ -1084,8 +1084,8 @@ period.) } /** - * @param value {@link #measurementPeriod} (Describes the measurement repetition time. This is not -necessarily the same as the update + * @param value {@link #measurementPeriod} (Describes the measurement repetition time. This is not +necessarily the same as the update period.) */ public DeviceMetric setMeasurementPeriod(Timing value) { @@ -1205,12 +1205,12 @@ period.) public static final String SP_PARENT = "parent"; @SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference" ) - public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" ) - public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name = "source", path = "DeviceMetric.source", description = "The device resource", type = "reference") + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name = "type", path = "DeviceMetric.type", description = "The component type", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "category", path = "DeviceMetric.category", description = "The category of the metric", type = "token") + public static final String SP_CATEGORY = "category"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java index f5a16a29c74..1bcbe97130e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseRequest.java @@ -332,21 +332,21 @@ public class DeviceUseRequest extends DomainResource { /** * Body site where the device is to be used. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "bodySite", type = {CodeableConcept.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Target body site", formalDefinition="Body site where the device is to be used." ) protected List bodySite; /** * The status of the request. */ - @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the request." ) protected Enumeration status; /** * The details of the device to be used. */ - @Child(name="device", type={Device.class}, order=2, min=1, max=1) + @Child(name = "device", type = {Device.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Device requested", formalDefinition="The details of the device to be used." ) protected Reference device; @@ -358,7 +358,7 @@ public class DeviceUseRequest extends DomainResource { /** * An encounter that provides additional context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Encounter motivating request", formalDefinition="An encounter that provides additional context in which this request is made." ) protected Reference encounter; @@ -370,49 +370,49 @@ public class DeviceUseRequest extends DomainResource { /** * Identifiers assigned to this order by the orderer or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Request identifier", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) protected List identifier; /** * Reason or justification for the use of this device. */ - @Child(name="indication", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "indication", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reason for request", formalDefinition="Reason or justification for the use of this device." ) protected List indication; /** * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. */ - @Child(name="notes", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notes", type = {StringType.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Notes or comments", formalDefinition="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) protected List notes; /** * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%. */ - @Child(name="prnReason", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "prnReason", type = {CodeableConcept.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="PRN", formalDefinition="The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%." ) protected List prnReason; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name = "orderedOn", type = {DateTimeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="When ordered", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The time at which the request was made/recorded. */ - @Child(name="recordedOn", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "recordedOn", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="When recorded", formalDefinition="The time at which the request was made/recorded." ) protected DateTimeType recordedOn; /** * The patient who will use the device. */ - @Child(name="subject", type={Patient.class}, order=10, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 10, min = 1, max = 1) @Description(shortDefinition="Focus of request", formalDefinition="The patient who will use the device." ) protected Reference subject; @@ -424,14 +424,14 @@ public class DeviceUseRequest extends DomainResource { /** * The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". */ - @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=11, min=0, max=1) + @Child(name = "timing", type = {Timing.class, Period.class, DateTimeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Schedule for use", formalDefinition="The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'." ) protected Type timing; /** * Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. */ - @Child(name="priority", type={CodeType.class}, order=12, min=0, max=1) + @Child(name = "priority", type = {CodeType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine." ) protected Enumeration priority; @@ -1096,8 +1096,8 @@ public class DeviceUseRequest extends DomainResource { @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "patient", path = "DeviceUseRequest.subject", description = "Search by subject - a patient", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java index 1a9b2bb2469..7c450546a9e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DeviceUseStatement.java @@ -48,21 +48,21 @@ public class DeviceUseStatement extends DomainResource { /** * Body site where the device was used. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "bodySite", type = {CodeableConcept.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Body site where the device was used." ) protected List bodySite; /** * The time period over which the device was used. */ - @Child(name="whenUsed", type={Period.class}, order=1, min=0, max=1) + @Child(name = "whenUsed", type = {Period.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="", formalDefinition="The time period over which the device was used." ) protected Period whenUsed; /** * The details of the device used. */ - @Child(name="device", type={Device.class}, order=2, min=1, max=1) + @Child(name = "device", type = {Device.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="", formalDefinition="The details of the device used." ) protected Reference device; @@ -74,35 +74,35 @@ public class DeviceUseStatement extends DomainResource { /** * An external identifier for this statement such as an IRI. */ - @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="An external identifier for this statement such as an IRI." ) protected List identifier; /** * Reason or justification for the use of the device. */ - @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "indication", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Reason or justification for the use of the device." ) protected List indication; /** * Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. */ - @Child(name="notes", type={StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notes", type = {StringType.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="", formalDefinition="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) protected List notes; /** * The time at which the statement was made/recorded. */ - @Child(name="recordedOn", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "recordedOn", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="", formalDefinition="The time at which the statement was made/recorded." ) protected DateTimeType recordedOn; /** * The patient who used the device. */ - @Child(name="subject", type={Patient.class}, order=7, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="", formalDefinition="The patient who used the device." ) protected Reference subject; @@ -114,7 +114,7 @@ public class DeviceUseStatement extends DomainResource { /** * How often the device was used. */ - @Child(name="timing", type={Timing.class, Period.class, DateTimeType.class}, order=8, min=0, max=1) + @Child(name = "timing", type = {Timing.class, Period.class, DateTimeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="", formalDefinition="How often the device was used." ) protected Type timing; @@ -566,8 +566,8 @@ public class DeviceUseStatement extends DomainResource { @SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "patient", path = "DeviceUseStatement.subject", description = "Search by subject - a patient", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java index 5fcc1ceb900..a82599a64bc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticOrder.java @@ -49,11 +49,11 @@ public class DiagnosticOrder extends DomainResource { /** * The request has been proposed. */ - PROPOSED, + PROPOSED, /** * The request has been planned. */ - PLANNED, + PLANNED, /** * The request has been placed. */ @@ -97,10 +97,10 @@ public class DiagnosticOrder extends DomainResource { public static DiagnosticOrderStatus fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) return null; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("planned".equals(codeString)) - return PLANNED; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; if ("requested".equals(codeString)) return REQUESTED; if ("received".equals(codeString)) @@ -123,8 +123,10 @@ public class DiagnosticOrder extends DomainResource { } public String toCode() { switch (this) { - case PROPOSED: return "proposed"; - case PLANNED: return "planned"; + case PROPOSED: + return "proposed"; + case PLANNED: + return "planned"; case REQUESTED: return "requested"; case RECEIVED: return "received"; case ACCEPTED: return "accepted"; @@ -139,8 +141,10 @@ public class DiagnosticOrder extends DomainResource { } public String getSystem() { switch (this) { - case PROPOSED: return ""; - case PLANNED: return ""; + case PROPOSED: + return ""; + case PLANNED: + return ""; case REQUESTED: return ""; case RECEIVED: return ""; case ACCEPTED: return ""; @@ -155,8 +159,10 @@ public class DiagnosticOrder extends DomainResource { } public String getDefinition() { switch (this) { - case PROPOSED: return "The request has been proposed."; - case PLANNED: return "The request has been planned."; + case PROPOSED: + return "The request has been proposed."; + case PLANNED: + return "The request has been planned."; case REQUESTED: return "The request has been placed."; case RECEIVED: return "The receiving system has received the order, but not yet decided whether it will be performed."; case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced."; @@ -171,8 +177,10 @@ public class DiagnosticOrder extends DomainResource { } public String getDisplay() { switch (this) { - case PROPOSED: return "proposed"; - case PLANNED: return "planned"; + case PROPOSED: + return "proposed"; + case PLANNED: + return "planned"; case REQUESTED: return "requested"; case RECEIVED: return "received"; case ACCEPTED: return "accepted"; @@ -193,9 +201,9 @@ public class DiagnosticOrder extends DomainResource { if (codeString == null || "".equals(codeString)) return null; if ("proposed".equals(codeString)) - return DiagnosticOrderStatus.PROPOSED; + return DiagnosticOrderStatus.PROPOSED; if ("planned".equals(codeString)) - return DiagnosticOrderStatus.PLANNED; + return DiagnosticOrderStatus.PLANNED; if ("requested".equals(codeString)) return DiagnosticOrderStatus.REQUESTED; if ("received".equals(codeString)) @@ -217,10 +225,10 @@ public class DiagnosticOrder extends DomainResource { throw new IllegalArgumentException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); } public String toCode(DiagnosticOrderStatus code) { - if (code == DiagnosticOrderStatus.PROPOSED) - return "proposed"; - if (code == DiagnosticOrderStatus.PLANNED) - return "planned"; + if (code == DiagnosticOrderStatus.PROPOSED) + return "proposed"; + if (code == DiagnosticOrderStatus.PLANNED) + return "planned"; if (code == DiagnosticOrderStatus.REQUESTED) return "requested"; if (code == DiagnosticOrderStatus.RECEIVED) @@ -349,7 +357,7 @@ public class DiagnosticOrder extends DomainResource { * The status for the event. */ @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) - @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status for the event." ) + @Description(shortDefinition = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition = "The status for the event.") protected Enumeration status; /** @@ -621,7 +629,7 @@ public class DiagnosticOrder extends DomainResource { * The status of this individual item within the order. */ @Child(name="status", type={CodeType.class}, order=4, min=0, max=1) - @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of this individual item within the order." ) + @Description(shortDefinition = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition = "The status of this individual item within the order.") protected Enumeration status; /** @@ -893,7 +901,7 @@ public class DiagnosticOrder extends DomainResource { /** * Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). */ - @Child(name="subject", type={Patient.class, Group.class, Location.class, Device.class}, order=0, min=1, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Who and/or what test is about", formalDefinition="Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) protected Reference subject; @@ -905,7 +913,7 @@ public class DiagnosticOrder extends DomainResource { /** * The practitioner that holds legal responsibility for ordering the investigation. */ - @Child(name="orderer", type={Practitioner.class}, order=1, min=0, max=1) + @Child(name = "orderer", type = {Practitioner.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) protected Reference orderer; @@ -917,14 +925,14 @@ public class DiagnosticOrder extends DomainResource { /** * Identifiers assigned to this order by the order or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order or by the receiver." ) protected List identifier; /** * An encounter that provides additional information about the healthcare context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The encounter that this diagnostic order is associated with", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) protected Reference encounter; @@ -936,15 +944,15 @@ public class DiagnosticOrder extends DomainResource { /** * An explanation or justification for why this diagnostic investigation is being requested. */ - @Child(name="clinicalNotes", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "clinicalNotes", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested." ) protected StringType clinicalNotes; /** * Additional clinical information about the patient or specimen that may influence test interpretations. */ - @Child(name="supportingInformation", type={Observation.class, Condition.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations." ) + @Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "Additional clinical information", formalDefinition = "Additional clinical information about the patient or specimen that may influence test interpretations.") protected List supportingInformation; /** * The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations.) @@ -955,7 +963,7 @@ public class DiagnosticOrder extends DomainResource { /** * One or more specimens that the diagnostic investigation is about. */ - @Child(name="specimen", type={Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "specimen", type = {Specimen.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="If the whole order relates to specific specimens", formalDefinition="One or more specimens that the diagnostic investigation is about." ) protected List specimen; /** @@ -967,28 +975,28 @@ public class DiagnosticOrder extends DomainResource { /** * The status of the order. */ - @Child(name="status", type={CodeType.class}, order=7, min=0, max=1) - @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition="The status of the order." ) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 0, max = 1) + @Description(shortDefinition = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", formalDefinition = "The status of the order.") protected Enumeration status; /** * The clinical priority associated with this order. */ - @Child(name="priority", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) protected Enumeration priority; /** * A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed. */ - @Child(name="event", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "event", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed." ) protected List event; /** * The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested. */ - @Child(name="item", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The items the orderer requested", formalDefinition="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested." ) protected List item; @@ -1464,7 +1472,7 @@ public class DiagnosticOrder extends DomainResource { childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order or by the receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); childrenList.add(new Property("clinicalNotes", "string", "An explanation or justification for why this diagnostic investigation is being requested.", 0, java.lang.Integer.MAX_VALUE, clinicalNotes)); - childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen)); childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); @@ -1551,40 +1559,40 @@ public class DiagnosticOrder extends DomainResource { return ResourceType.DiagnosticOrder; } - @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_ITEMPASTSTATUS = "item-past-status"; - @SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite[x]", description="Location of requested test (if applicable)", type="token" ) - public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name = "item-past-status", path = "DiagnosticOrder.item.event.status", description = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type = "token") + public static final String SP_ITEMPASTSTATUS = "item-past-status"; + @SearchParamDefinition(name = "identifier", path = "DiagnosticOrder.identifier", description = "Identifiers assigned to this order", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "bodysite", path = "DiagnosticOrder.item.bodySite[x]", description = "Location of requested test (if applicable)", type = "token") + public static final String SP_BODYSITE = "bodysite"; @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) - public static final String SP_EVENTDATE = "event-date"; - @SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite" ) - public static final String SP_EVENTSTATUSDATE = "event-status-date"; - @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) - public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "event-date", path = "DiagnosticOrder.event.dateTime", description = "The date at which the event happened", type = "date") + public static final String SP_EVENTDATE = "event-date"; + @SearchParamDefinition(name = "event-status-date", path = "", description = "A combination of past-status and date", type = "composite") + public static final String SP_EVENTSTATUSDATE = "event-status-date"; + @SearchParamDefinition(name = "subject", path = "DiagnosticOrder.subject", description = "Who and/or what test is about", type = "reference") + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor|DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) - public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name = "actor", path = "DiagnosticOrder.event.actor|DiagnosticOrder.item.event.actor", description = "Who recorded or did this", type = "reference") + public static final String SP_ACTOR = "actor"; @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) public static final String SP_ITEMDATE = "item-date"; @SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite" ) public static final String SP_ITEMSTATUSDATE = "item-status-date"; - @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_EVENTSTATUS = "event-status"; - @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_ITEMSTATUS = "item-status"; - @SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) - public static final String SP_ORDERER = "orderer"; - @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen|DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) - public static final String SP_SPECIMEN = "specimen"; - @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "event-status", path = "DiagnosticOrder.event.status", description = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type = "token") + public static final String SP_EVENTSTATUS = "event-status"; + @SearchParamDefinition(name = "item-status", path = "DiagnosticOrder.item.status", description = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type = "token") + public static final String SP_ITEMSTATUS = "item-status"; + @SearchParamDefinition(name = "patient", path = "DiagnosticOrder.subject", description = "Who and/or what test is about", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "orderer", path = "DiagnosticOrder.orderer", description = "Who ordered the test", type = "reference") + public static final String SP_ORDERER = "orderer"; + @SearchParamDefinition(name = "specimen", path = "DiagnosticOrder.specimen|DiagnosticOrder.item.specimen", description = "If the whole order relates to specific specimens", type = "reference") + public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name = "status", path = "DiagnosticOrder.status", description = "proposed | planned | requested | received | accepted | in-progress | review | completed | suspended | rejected | failed", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java index 4d694d1f338..4b7fdd00bdb 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DiagnosticReport.java @@ -370,28 +370,28 @@ public class DiagnosticReport extends DomainResource { /** * A code or name that describes this diagnostic report. */ - @Child(name="name", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name = "name", type = {CodeableConcept.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." ) protected CodeableConcept name; /** * The status of the diagnostic report as a whole. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="registered | partial | final | corrected +", formalDefinition="The status of the diagnostic report as a whole." ) protected Enumeration status; /** * The date and/or time that this version of the report was released from the source diagnostic service. */ - @Child(name="issued", type={DateTimeType.class}, order=2, min=1, max=1) + @Child(name = "issued", type = {DateTimeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Date this version was released", formalDefinition="The date and/or time that this version of the report was released from the source diagnostic service." ) protected DateTimeType issued; /** * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=3, min=1, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="The subject of the report, usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources." ) protected Reference subject; @@ -403,7 +403,7 @@ public class DiagnosticReport extends DomainResource { /** * The diagnostic service that is responsible for issuing the report. */ - @Child(name="performer", type={Practitioner.class, Organization.class}, order=4, min=1, max=1) + @Child(name = "performer", type = {Practitioner.class, Organization.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." ) protected Reference performer; @@ -415,7 +415,7 @@ public class DiagnosticReport extends DomainResource { /** * The link to the health care event (encounter) when the order was made. */ - @Child(name="encounter", type={Encounter.class}, order=5, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Health care event when test ordered", formalDefinition="The link to the health care event (encounter) when the order was made." ) protected Reference encounter; @@ -427,14 +427,14 @@ public class DiagnosticReport extends DomainResource { /** * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider. */ - @Child(name="identifier", type={Identifier.class}, order=6, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Id for external references to this report", formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider." ) protected Identifier identifier; /** * Details concerning a test requested. */ - @Child(name="requestDetail", type={DiagnosticOrder.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "requestDetail", type = {DiagnosticOrder.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="What was requested", formalDefinition="Details concerning a test requested." ) protected List requestDetail; /** @@ -446,21 +446,21 @@ public class DiagnosticReport extends DomainResource { /** * The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI. */ - @Child(name="serviceCategory", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Biochemistry, Hematology etc.", formalDefinition="The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI." ) protected CodeableConcept serviceCategory; /** * The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself. */ - @Child(name="diagnostic", type={DateTimeType.class, Period.class}, order=9, min=1, max=1) + @Child(name = "diagnostic", type = {DateTimeType.class, Period.class}, order = 9, min = 1, max = 1) @Description(shortDefinition="Physiologically Relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." ) protected Type diagnostic; /** * Details about the specimens on which this diagnostic report is based. */ - @Child(name="specimen", type={Specimen.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "specimen", type = {Specimen.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Specimens this report is based on", formalDefinition="Details about the specimens on which this diagnostic report is based." ) protected List specimen; /** @@ -472,7 +472,7 @@ public class DiagnosticReport extends DomainResource { /** * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels"). */ - @Child(name="result", type={Observation.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "result", type = {Observation.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Observations - simple, or complex nested groups", formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels')." ) protected List result; /** @@ -484,7 +484,7 @@ public class DiagnosticReport extends DomainResource { /** * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. */ - @Child(name="imagingStudy", type={ImagingStudy.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "imagingStudy", type = {ImagingStudy.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reference to full details of imaging associated with the diagnostic report", formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images." ) protected List imagingStudy; /** @@ -496,28 +496,28 @@ public class DiagnosticReport extends DomainResource { /** * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest). */ - @Child(name="image", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "image", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Key images associated with this report", formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." ) protected List image; /** * Concise and clinically contextualized narrative interpretation of the diagnostic report. */ - @Child(name="conclusion", type={StringType.class}, order=14, min=0, max=1) + @Child(name = "conclusion", type = {StringType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Clinical Interpretation of test results", formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report." ) protected StringType conclusion; /** * Codes for the conclusion. */ - @Child(name="codedDiagnosis", type={CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "codedDiagnosis", type = {CodeableConcept.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Codes for the conclusion", formalDefinition="Codes for the conclusion." ) protected List codedDiagnosis; /** * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent. */ - @Child(name="presentedForm", type={Attachment.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "presentedForm", type = {Attachment.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Entire Report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." ) protected List presentedForm; @@ -1320,15 +1320,15 @@ public class DiagnosticReport extends DomainResource { return ResourceType.DiagnosticReport; } - @SearchParamDefinition(name="date", path="DiagnosticReport.diagnostic[x]", description="The clinically relevant time of the report", type="date" ) + @SearchParamDefinition(name = "date", path = "DiagnosticReport.diagnostic[x]", description = "The clinically relevant time of the report", type = "date") public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) + @SearchParamDefinition(name = "identifier", path = "DiagnosticReport.identifier", description = "An identifier for the report", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="Reference to the image source", type="reference" ) + @SearchParamDefinition(name = "image", path = "DiagnosticReport.image.link", description = "Reference to the image source", type = "reference") public static final String SP_IMAGE = "image"; - @SearchParamDefinition(name="request", path="DiagnosticReport.requestDetail", description="What was requested", type="reference" ) + @SearchParamDefinition(name = "request", path = "DiagnosticReport.requestDetail", description = "What was requested", type = "reference") public static final String SP_REQUEST = "request"; - @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" ) + @SearchParamDefinition(name = "performer", path = "DiagnosticReport.performer", description = "Who was the source of the report (organization)", type = "reference") public static final String SP_PERFORMER = "performer"; @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" ) public static final String SP_SUBJECT = "subject"; @@ -1336,9 +1336,9 @@ public class DiagnosticReport extends DomainResource { public static final String SP_DIAGNOSIS = "diagnosis"; @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" ) + @SearchParamDefinition(name = "result", path = "DiagnosticReport.result", description = "Link to an atomic result (observation resource)", type = "reference") public static final String SP_RESULT = "result"; - @SearchParamDefinition(name="service", path="DiagnosticReport.serviceCategory", description="Which diagnostic discipline/department created the report", type="token" ) + @SearchParamDefinition(name = "service", path = "DiagnosticReport.serviceCategory", description = "Which diagnostic discipline/department created the report", type = "token") public static final String SP_SERVICE = "service"; @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" ) public static final String SP_PATIENT = "patient"; @@ -1346,9 +1346,9 @@ public class DiagnosticReport extends DomainResource { public static final String SP_SPECIMEN = "specimen"; @SearchParamDefinition(name="name", path="DiagnosticReport.name", description="The name of the report (e.g. the code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result)", type="token" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) + @SearchParamDefinition(name = "issued", path = "DiagnosticReport.issued", description = "When the report was issued", type = "date") public static final String SP_ISSUED = "issued"; - @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) + @SearchParamDefinition(name = "status", path = "DiagnosticReport.status", description = "The status of the report", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java index 2272212044e..6bee9e5f2ac 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentManifest.java @@ -134,21 +134,21 @@ public class DocumentManifest extends DomainResource { /** * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts. */ - @Child(name="masterIdentifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "masterIdentifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Unique Identifier for the set of documents", formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." ) protected Identifier masterIdentifier; /** * Other identifiers associated with the document, including version independent, source record and workflow related identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document, including version independent, source record and workflow related identifiers." ) protected List identifier; /** * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="The subject of the set of documents", formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." ) protected Reference subject; @@ -160,7 +160,7 @@ public class DocumentManifest extends DomainResource { /** * A patient, practitioner, or organization for which this set of documents is intended. */ - @Child(name="recipient", type={Patient.class, Practitioner.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "recipient", type = {Patient.class, Practitioner.class, Organization.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." ) protected List recipient; /** @@ -172,14 +172,14 @@ public class DocumentManifest extends DomainResource { /** * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider. */ - @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="What kind of document set this is", formalDefinition="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider." ) protected CodeableConcept type; /** * Identifies who is responsible for adding the information to the document. */ - @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) protected List author; /** @@ -191,28 +191,28 @@ public class DocumentManifest extends DomainResource { /** * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc). */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc)." ) protected DateTimeType created; /** * Identifies the source system, application, or software that produced the document manifest. */ - @Child(name="source", type={UriType.class}, order=7, min=0, max=1) + @Child(name = "source", type = {UriType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." ) protected UriType source; /** * The status of this document manifest. */ - @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="current | superceded | entered-in-error", formalDefinition="The status of this document manifest." ) protected Enumeration status; /** * Whether this document manifest replaces another. */ - @Child(name="supercedes", type={DocumentManifest.class}, order=9, min=0, max=1) + @Child(name = "supercedes", type = {DocumentManifest.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="If this document manifest replaces another", formalDefinition="Whether this document manifest replaces another." ) protected Reference supercedes; @@ -224,21 +224,21 @@ public class DocumentManifest extends DomainResource { /** * Human-readable description of the source document. This is sometimes known as the "title". */ - @Child(name="description", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the 'title'." ) protected StringType description; /** * A code specifying the level of confidentiality of this set of Documents. */ - @Child(name="confidentiality", type={CodeableConcept.class}, order=11, min=0, max=1) + @Child(name = "confidentiality", type = {CodeableConcept.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Sensitivity of set of documents", formalDefinition="A code specifying the level of confidentiality of this set of Documents." ) protected CodeableConcept confidentiality; /** * The list of resources that describe the parts of this document reference. Usually, these would be document references, but direct references to binary attachments and images are also allowed. */ - @Child(name="content", type={DocumentReference.class, Binary.class, Media.class}, order=12, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "content", type = {DocumentReference.class, Binary.class, Media.class}, order = 12, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of resources that describe the parts of this document reference. Usually, these would be document references, but direct references to binary attachments and images are also allowed." ) protected List content; /** @@ -848,7 +848,7 @@ public class DocumentManifest extends DomainResource { return ResourceType.DocumentManifest; } - @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier|DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" ) + @SearchParamDefinition(name = "identifier", path = "DocumentManifest.masterIdentifier|DocumentManifest.identifier", description = "Unique Identifier for the set of documents", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) public static final String SP_SUBJECT = "subject"; @@ -858,21 +858,21 @@ public class DocumentManifest extends DomainResource { public static final String SP_CREATED = "created"; @SearchParamDefinition(name="confidentiality", path="DocumentManifest.confidentiality", description="Sensitivity of set of documents", type="token" ) public static final String SP_CONFIDENTIALITY = "confidentiality"; - @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) + @SearchParamDefinition(name = "description", path = "DocumentManifest.description", description = "Human-readable description (title)", type = "string") public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="string" ) + @SearchParamDefinition(name = "source", path = "DocumentManifest.source", description = "The source system/application/software", type = "string") public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="type", path="DocumentManifest.type", description="What kind of document set this is", type="token" ) + @SearchParamDefinition(name = "type", path = "DocumentManifest.type", description = "What kind of document set this is", type = "token") public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="content", path="DocumentManifest.content", description="Contents of this set of documents", type="reference" ) + @SearchParamDefinition(name = "content", path = "DocumentManifest.content", description = "Contents of this set of documents", type = "reference") public static final String SP_CONTENT = "content"; - @SearchParamDefinition(name="supersedes", path="DocumentManifest.supercedes", description="If this document manifest replaces another", type="reference" ) + @SearchParamDefinition(name = "supersedes", path = "DocumentManifest.supercedes", description = "If this document manifest replaces another", type = "reference") public static final String SP_SUPERSEDES = "supersedes"; - @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + @SearchParamDefinition(name = "patient", path = "DocumentManifest.subject", description = "The subject of the set of documents", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" ) + @SearchParamDefinition(name = "recipient", path = "DocumentManifest.recipient", description = "Intended to get notified about this set of documents", type = "reference") public static final String SP_RECIPIENT = "recipient"; - @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superceded | entered-in-error", type="token" ) + @SearchParamDefinition(name = "status", path = "DocumentManifest.status", description = "current | superceded | entered-in-error", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java index c5e1791e4b3..83c19be223c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DocumentReference.java @@ -552,21 +552,21 @@ public class DocumentReference extends DomainResource { /** * Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document. */ - @Child(name="masterIdentifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "masterIdentifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Master Version Specific Identifier", formalDefinition="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document." ) protected Identifier masterIdentifier; /** * Other identifiers associated with the document, including version independent, source record and workflow related identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the document", formalDefinition="Other identifiers associated with the document, including version independent, source record and workflow related identifiers." ) protected List identifier; /** * Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Who|what is the subject of the document", formalDefinition="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)." ) protected Reference subject; @@ -578,28 +578,28 @@ public class DocumentReference extends DomainResource { /** * The type code specifies the precise type of document from the user perspective. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.). */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Precice type of document", formalDefinition="The type code specifies the precise type of document from the user perspective. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.)." ) protected CodeableConcept type; /** * The class code specifying the high-level use classification of the document type (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow). */ - @Child(name="class_", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "class_", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="High-level classification of document", formalDefinition="The class code specifying the high-level use classification of the document type (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow)." ) protected CodeableConcept class_; /** * An identifier that identifies the the document encoding, structure and template that the document conforms to beyond the base format indicated in the mimeType. */ - @Child(name="format", type={UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "format", type = {UriType.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Format/content rules for the document", formalDefinition="An identifier that identifies the the document encoding, structure and template that the document conforms to beyond the base format indicated in the mimeType." ) protected List format; /** * Identifies who is responsible for adding the information to the document. */ - @Child(name="author", type={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=6, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order = 6, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) protected List author; /** @@ -611,7 +611,7 @@ public class DocumentReference extends DomainResource { /** * Identifies the organization or group who is responsible for ongoing maintenance of and access to the document. */ - @Child(name="custodian", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "custodian", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Org which maintains the document", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." ) protected Reference custodian; @@ -623,14 +623,14 @@ public class DocumentReference extends DomainResource { /** * A reference to a domain or server that manages policies under which the document is accessed and/or made available. */ - @Child(name="policyManager", type={UriType.class}, order=8, min=0, max=1) + @Child(name = "policyManager", type = {UriType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Manages access policies for the document", formalDefinition="A reference to a domain or server that manages policies under which the document is accessed and/or made available." ) protected UriType policyManager; /** * Which person or organization authenticates that this document is valid. */ - @Child(name="authenticator", type={Practitioner.class, Organization.class}, order=9, min=0, max=1) + @Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Who/What authenticated the document", formalDefinition="Which person or organization authenticates that this document is valid." ) protected Reference authenticator; @@ -642,63 +642,63 @@ public class DocumentReference extends DomainResource { /** * When the document was created. */ - @Child(name="created", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Document creation time", formalDefinition="When the document was created." ) protected DateTimeType created; /** * When the document reference was created. */ - @Child(name="indexed", type={InstantType.class}, order=11, min=1, max=1) + @Child(name = "indexed", type = {InstantType.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="When this document reference created", formalDefinition="When the document reference was created." ) protected InstantType indexed; /** * The status of this document reference. */ - @Child(name="status", type={CodeType.class}, order=12, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 12, min = 1, max = 1) @Description(shortDefinition="current | superceded | entered-in-error", formalDefinition="The status of this document reference." ) protected Enumeration status; /** * The status of the underlying document. */ - @Child(name="docStatus", type={CodeableConcept.class}, order=13, min=0, max=1) + @Child(name = "docStatus", type = {CodeableConcept.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The status of the underlying document." ) protected CodeableConcept docStatus; /** * Relationships that this document has with other document references that already exist. */ - @Child(name="relatesTo", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "relatesTo", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Relationships to other documents", formalDefinition="Relationships that this document has with other document references that already exist." ) protected List relatesTo; /** * Human-readable description of the source document. This is sometimes known as the "title". */ - @Child(name="description", type={StringType.class}, order=15, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the 'title'." ) protected StringType description; /** * A set of Security-Tag codes specifying the level of privacy/security of the Document. */ - @Child(name="confidentiality", type={CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "confidentiality", type = {CodeableConcept.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Sensitivity of source document", formalDefinition="A set of Security-Tag codes specifying the level of privacy/security of the Document." ) protected List confidentiality; /** * The document or url to the document along with critical metadata to prove content has integrity. */ - @Child(name="content", type={Attachment.class}, order=17, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "content", type = {Attachment.class}, order = 17, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Where to access the document", formalDefinition="The document or url to the document along with critical metadata to prove content has integrity." ) protected List content; /** * The clinical context in which the document was prepared. */ - @Child(name="context", type={}, order=18, min=0, max=1) + @Child(name = "context", type = {}, order = 18, min = 0, max = 1) @Description(shortDefinition="Clinical context of document", formalDefinition="The clinical context in which the document was prepared." ) protected DocumentReferenceContextComponent context; @@ -1528,12 +1528,12 @@ public class DocumentReference extends DomainResource { return ResourceType.DocumentReference; } - @SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier|DocumentReference.identifier", description="Master Version Specific Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date" ) - public static final String SP_PERIOD = "period"; - @SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Org which maintains the document", type="reference" ) - public static final String SP_CUSTODIAN = "custodian"; + @SearchParamDefinition(name = "identifier", path = "DocumentReference.masterIdentifier|DocumentReference.identifier", description = "Master Version Specific Identifier", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "period", path = "DocumentReference.context.period", description = "Time of service that is being documented", type = "date") + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name = "custodian", path = "DocumentReference.custodian", description = "Org which maintains the document", type = "reference") + public static final String SP_CUSTODIAN = "custodian"; @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" ) public static final String SP_INDEXED = "indexed"; @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) @@ -1544,34 +1544,34 @@ public class DocumentReference extends DomainResource { public static final String SP_CREATED = "created"; @SearchParamDefinition(name="confidentiality", path="DocumentReference.confidentiality", description="Sensitivity of source document", type="token" ) public static final String SP_CONFIDENTIALITY = "confidentiality"; - @SearchParamDefinition(name="format", path="DocumentReference.format", description="Format/content rules for the document", type="token" ) - public static final String SP_FORMAT = "format"; + @SearchParamDefinition(name = "format", path = "DocumentReference.format", description = "Format/content rules for the document", type = "token") + public static final String SP_FORMAT = "format"; @SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string" ) public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="language", path="DocumentReference.content.language", description="Human language of the content (BCP-47)", type="token" ) public static final String SP_LANGUAGE = "language"; - @SearchParamDefinition(name="type", path="DocumentReference.type", description="Precice type of document", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" ) - public static final String SP_RELATION = "relation"; - @SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="location", path="DocumentReference.content.url", description="Uri where the data can be found", type="string" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" ) - public static final String SP_RELATESTO = "relatesto"; - @SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite" ) - public static final String SP_RELATIONSHIP = "relationship"; - @SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token" ) - public static final String SP_EVENT = "event"; - @SearchParamDefinition(name="class", path="DocumentReference.class", description="High-level classification of document", type="token" ) - public static final String SP_CLASS = "class"; - @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/What authenticated the document", type="reference" ) - public static final String SP_AUTHENTICATOR = "authenticator"; - @SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token" ) - public static final String SP_FACILITY = "facility"; - @SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superceded | entered-in-error", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "type", path = "DocumentReference.type", description = "Precice type of document", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "relation", path = "DocumentReference.relatesTo.code", description = "replaces | transforms | signs | appends", type = "token") + public static final String SP_RELATION = "relation"; + @SearchParamDefinition(name = "patient", path = "DocumentReference.subject", description = "Who|what is the subject of the document", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "location", path = "DocumentReference.content.url", description = "Uri where the data can be found", type = "string") + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name = "relatesto", path = "DocumentReference.relatesTo.target", description = "Target of the relationship", type = "reference") + public static final String SP_RELATESTO = "relatesto"; + @SearchParamDefinition(name = "relationship", path = "", description = "Combination of relation and relatesTo", type = "composite") + public static final String SP_RELATIONSHIP = "relationship"; + @SearchParamDefinition(name = "event", path = "DocumentReference.context.event", description = "Main Clinical Acts Documented", type = "token") + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name = "class", path = "DocumentReference.class", description = "High-level classification of document", type = "token") + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name = "authenticator", path = "DocumentReference.authenticator", description = "Who/What authenticated the document", type = "reference") + public static final String SP_AUTHENTICATOR = "authenticator"; + @SearchParamDefinition(name = "facility", path = "DocumentReference.context.facilityType", description = "Kind of facility where patient was seen", type = "token") + public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name = "status", path = "DocumentReference.status", description = "current | superceded | entered-in-error", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java index 0cdcebb4a41..b80cd8cf9fc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DomainResource.java @@ -49,28 +49,28 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi /** * A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. */ - @Child(name="text", type={Narrative.class}, order=0, min=0, max=1) + @Child(name = "text", type = {Narrative.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Text summary of the resource, for human interpretation", formalDefinition="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ) protected Narrative text; /** * These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. */ - @Child(name="contained", type={Resource.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contained", type = {Resource.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contained, inline Resources", formalDefinition="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ) protected List contained; /** * May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. */ - @Child(name="extension", type={Extension.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "extension", type = {Extension.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) protected List extension; /** * May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. */ - @Child(name="modifierExtension", type={Extension.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "modifierExtension", type = {Extension.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) protected List modifierExtension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java index 732337bccc2..53c10b7c172 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Element.java @@ -46,14 +46,14 @@ public abstract class Element extends Base implements IBaseHasExtensions { /** * unique id for the element within a resource (for internal references). */ - @Child(name="id", type={IdType.class}, order=0, min=0, max=1) + @Child(name = "id", type = {IdType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="xml:id (or equivalent in JSON)", formalDefinition="unique id for the element within a resource (for internal references)." ) protected IdType id; /** * May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. */ - @Child(name="extension", type={Extension.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "extension", type = {Extension.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) protected List extension; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java index a2aafe8766c..cf454a8c3f9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ElementDefinition.java @@ -42,7 +42,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * Captures constraints on each element within the resource, profile, or extension. */ @DatatypeDef(name="ElementDefinition") -public class ElementDefinition extends Type implements ICompositeType { +public class ElementDefinition extends Type implements ICompositeType { public enum PropertyRepresentation { /** @@ -1764,182 +1764,182 @@ public class ElementDefinition extends Type implements ICompositeType { /** * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */ - @Child(name="path", type={StringType.class}, order=0, min=1, max=1) + @Child(name = "path", type = {StringType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="The path of the element (see the Detailed Descriptions)", formalDefinition="The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension." ) protected StringType path; /** * Codes that define how this element is represented in instances, when the deviation varies from the normal case. */ - @Child(name="representation", type={CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "representation", type = {CodeType.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="How this element is represented in instances", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) protected List> representation; /** * The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. */ - @Child(name="name", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Name for this particular element definition (reference target)", formalDefinition="The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element." ) protected StringType name; /** * Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set). */ - @Child(name="slicing", type={}, order=3, min=0, max=1) + @Child(name = "slicing", type = {}, order = 3, min = 0, max = 1) @Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." ) protected ElementDefinitionSlicingComponent slicing; /** * A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification). */ - @Child(name="short_", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "short_", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Concise definition for xml presentation", formalDefinition="A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification)." ) protected StringType short_; /** * The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. */ - @Child(name="formal", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "formal", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Full formal definition in human language", formalDefinition="The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource." ) protected StringType formal; /** * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc. */ - @Child(name="comments", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "comments", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Comments about the use of this element", formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc." ) protected StringType comments; /** * Explains why this element is needed and why it's been constrained as it has. */ - @Child(name="requirements", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this element is needed and why it's been constrained as it has." ) protected StringType requirements; /** * Identifies additional names by which this element might also be known. */ - @Child(name="synonym", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "synonym", type = {StringType.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) protected List synonym; /** * The minimum number of times this element SHALL appear in the instance. */ - @Child(name="min", type={IntegerType.class}, order=9, min=0, max=1) + @Child(name = "min", type = {IntegerType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." ) protected IntegerType min; /** * The maximum number of times this element is permitted to appear in the instance. */ - @Child(name="max", type={StringType.class}, order=10, min=0, max=1) + @Child(name = "max", type = {StringType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." ) protected StringType max; /** * The data type or resource that the value of this element is permitted to be. */ - @Child(name="type", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "type", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." ) protected List type; /** * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. */ - @Child(name="nameReference", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "nameReference", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="To another element constraint (by element.name)", formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element." ) protected StringType nameReference; /** * The value that should be used if there is no value stated in the instance. */ - @Child(name="defaultValue", type={}, order=13, min=0, max=1) + @Child(name = "defaultValue", type = {}, order = 13, min = 0, max = 1) @Description(shortDefinition="Specified value it missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance." ) protected org.hl7.fhir.instance.model.Type defaultValue; /** * The Implicit meaning that is to be understood when this element is missing. */ - @Child(name="meaningWhenMissing", type={StringType.class}, order=14, min=0, max=1) + @Child(name = "meaningWhenMissing", type = {StringType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing." ) protected StringType meaningWhenMissing; /** * Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing. */ - @Child(name="fixed", type={}, order=15, min=0, max=1) + @Child(name = "fixed", type = {}, order = 15, min = 0, max = 1) @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing." ) protected org.hl7.fhir.instance.model.Type fixed; /** * Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.). */ - @Child(name="pattern", type={}, order=16, min=0, max=1) + @Child(name = "pattern", type = {}, order = 16, min = 0, max = 1) @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.)." ) protected org.hl7.fhir.instance.model.Type pattern; /** * An example value for this element. */ - @Child(name="example", type={}, order=17, min=0, max=1) + @Child(name = "example", type = {}, order = 17, min = 0, max = 1) @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="An example value for this element." ) protected org.hl7.fhir.instance.model.Type example; /** * Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. */ - @Child(name="maxLength", type={IntegerType.class}, order=18, min=0, max=1) + @Child(name = "maxLength", type = {IntegerType.class}, order = 18, min = 0, max = 1) @Description(shortDefinition="Max length for strings", formalDefinition="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element." ) protected IntegerType maxLength; /** * A reference to an invariant that may make additional statements about the cardinality or value in the instance. */ - @Child(name="condition", type={IdType.class}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {IdType.class}, order = 19, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reference to invariant about presence", formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance." ) protected List condition; /** * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance. */ - @Child(name="constraint", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "constraint", type = {}, order = 20, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Condition that must evaluate to true", formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." ) protected List constraint; /** * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported. */ - @Child(name="mustSupport", type={BooleanType.class}, order=21, min=0, max=1) + @Child(name = "mustSupport", type = {BooleanType.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="If the element must supported", formalDefinition="If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported." ) protected BooleanType mustSupport; /** * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. */ - @Child(name="isModifier", type={BooleanType.class}, order=22, min=0, max=1) + @Child(name = "isModifier", type = {BooleanType.class}, order = 22, min = 0, max = 1) @Description(shortDefinition="If this modifies the meaning of other elements", formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system." ) protected BooleanType isModifier; /** * Whether the element should be included if a client requests a search with the parameter _summary=true. */ - @Child(name="isSummary", type={BooleanType.class}, order=23, min=0, max=1) + @Child(name = "isSummary", type = {BooleanType.class}, order = 23, min = 0, max = 1) @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." ) protected BooleanType isSummary; /** * Binds to a value set if this element is coded (code, Coding, CodeableConcept). */ - @Child(name="binding", type={}, order=24, min=0, max=1) + @Child(name = "binding", type = {}, order = 24, min = 0, max = 1) @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)." ) protected ElementDefinitionBindingComponent binding; /** * Identifies a concept from an external specification that roughly corresponds to this element. */ - @Child(name="mapping", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mapping", type = {}, order = 25, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) protected List mapping; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java index 4b1bc43673d..7b32bdeb930 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityRequest.java @@ -47,35 +47,35 @@ public class EligibilityRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class EligibilityRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class EligibilityRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java index 6de6e8c0d16..9ca3e853e56 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EligibilityResponse.java @@ -120,14 +120,14 @@ public class EligibilityResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={EligibilityRequest.class}, order=1, min=0, max=1) + @Child(name = "request", type = {EligibilityRequest.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class EligibilityResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class EligibilityResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class EligibilityResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java index d6c35cdb26b..724d376cf73 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Encounter.java @@ -1439,42 +1439,42 @@ public class Encounter extends DomainResource { /** * Identifier(s) by which this encounter is known. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) by which this encounter is known", formalDefinition="Identifier(s) by which this encounter is known." ) protected List identifier; /** * planned | arrived | in-progress | onleave | finished | cancelled. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="planned | arrived | in-progress | onleave | finished | cancelled", formalDefinition="planned | arrived | in-progress | onleave | finished | cancelled." ) protected Enumeration status; /** * The current status is always found in the current version of the resource. This status history permits the encounter resource to contain the status history without the needing to read through the historical versions of the resource, or even have the server store them. */ - @Child(name="statusHistory", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "statusHistory", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of Encounter statuses", formalDefinition="The current status is always found in the current version of the resource. This status history permits the encounter resource to contain the status history without the needing to read through the historical versions of the resource, or even have the server store them." ) protected List statusHistory; /** * inpatient | outpatient | ambulatory | emergency +. */ - @Child(name="class_", type={CodeType.class}, order=3, min=1, max=1) + @Child(name = "class_", type = {CodeType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="inpatient | outpatient | ambulatory | emergency +", formalDefinition="inpatient | outpatient | ambulatory | emergency +." ) protected Enumeration class_; /** * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). */ - @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "type", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Specific type of encounter", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." ) protected List type; /** * The patient present at the encounter. */ - @Child(name="patient", type={Patient.class}, order=5, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The patient present at the encounter", formalDefinition="The patient present at the encounter." ) protected Reference patient; @@ -1486,7 +1486,7 @@ public class Encounter extends DomainResource { /** * Where a specific encounter should be classified as a part of a specific episode of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, or issue tracking. */ - @Child(name="episodeOfCare", type={EpisodeOfCare.class}, order=6, min=0, max=1) + @Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="An episode of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, or issue tracking." ) protected Reference episodeOfCare; @@ -1498,14 +1498,14 @@ public class Encounter extends DomainResource { /** * The main practitioner responsible for providing the service. */ - @Child(name="participant", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "participant", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The main practitioner responsible for providing the service." ) protected List participant; /** * The appointment that scheduled this encounter. */ - @Child(name="fulfills", type={Appointment.class}, order=8, min=0, max=1) + @Child(name = "fulfills", type = {Appointment.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." ) protected Reference fulfills; @@ -1517,28 +1517,28 @@ public class Encounter extends DomainResource { /** * The start and end time of the encounter. */ - @Child(name="period", type={Period.class}, order=9, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="The start and end time of the encounter", formalDefinition="The start and end time of the encounter." ) protected Period period; /** * Quantity of time the encounter lasted. This excludes the time during leaves of absence. */ - @Child(name="length", type={Duration.class}, order=10, min=0, max=1) + @Child(name = "length", type = {Duration.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Quantity of time the encounter lasted", formalDefinition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." ) protected Duration length; /** * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis. */ - @Child(name="reason", type={CodeableConcept.class}, order=11, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Reason the encounter takes place (code)", formalDefinition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." ) protected CodeableConcept reason; /** * Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. */ - @Child(name="indication", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "indication", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reason the encounter takes place (resource)", formalDefinition="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis." ) protected List indication; /** @@ -1550,28 +1550,28 @@ public class Encounter extends DomainResource { /** * Indicates the urgency of the encounter. */ - @Child(name="priority", type={CodeableConcept.class}, order=13, min=0, max=1) + @Child(name = "priority", type = {CodeableConcept.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." ) protected CodeableConcept priority; /** * Details about an admission to a clinic. */ - @Child(name="hospitalization", type={}, order=14, min=0, max=1) + @Child(name = "hospitalization", type = {}, order = 14, min = 0, max = 1) @Description(shortDefinition="Details about an admission to a clinic", formalDefinition="Details about an admission to a clinic." ) protected EncounterHospitalizationComponent hospitalization; /** * List of locations at which the patient has been. */ - @Child(name="location", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "location", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of locations the patient has been at", formalDefinition="List of locations at which the patient has been." ) protected List location; /** * Department or team providing care. */ - @Child(name="serviceProvider", type={Organization.class}, order=16, min=0, max=1) + @Child(name = "serviceProvider", type = {Organization.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="Department or team providing care", formalDefinition="Department or team providing care." ) protected Reference serviceProvider; @@ -1583,7 +1583,7 @@ public class Encounter extends DomainResource { /** * Another Encounter of which this encounter is a part of (administratively or in time). */ - @Child(name="partOf", type={Encounter.class}, order=17, min=0, max=1) + @Child(name = "partOf", type = {Encounter.class}, order = 17, min = 0, max = 1) @Description(shortDefinition="Another Encounter this encounter is part of", formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." ) protected Reference partOf; @@ -2341,32 +2341,32 @@ public class Encounter extends DomainResource { return ResourceType.Encounter; } - @SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="Encounter.identifier", description="Identifier(s) by which this encounter is known", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="An episode of care that this encounter should be recorded against", type="reference" ) - public static final String SP_EPISODEOFCARE = "episodeofcare"; + @SearchParamDefinition(name = "date", path = "Encounter.period", description = "A date within the period the Encounter lasted", type = "date") + public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "identifier", path = "Encounter.identifier", description = "Identifier(s) by which this encounter is known", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "episodeofcare", path = "Encounter.episodeOfCare", description = "An episode of care that this encounter should be recorded against", type = "reference") + public static final String SP_EPISODEOFCARE = "episodeofcare"; @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) public static final String SP_PARTICIPANTTYPE = "participant-type"; - @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) - public static final String SP_LENGTH = "length"; - @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference" ) - public static final String SP_PARTOF = "part-of"; - @SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" ) - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "length", path = "Encounter.length", description = "Length of encounter in days", type = "number") + public static final String SP_LENGTH = "length"; + @SearchParamDefinition(name = "part-of", path = "Encounter.partOf", description = "Another Encounter this encounter is part of", type = "reference") + public static final String SP_PARTOF = "part-of"; + @SearchParamDefinition(name = "type", path = "Encounter.type", description = "Specific type of encounter", type = "token") + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date" ) - public static final String SP_LOCATIONPERIOD = "location-period"; + @SearchParamDefinition(name = "location-period", path = "Encounter.location.period", description = "Time period during which the patient was present at the location", type = "date") + public static final String SP_LOCATIONPERIOD = "location-period"; @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference" ) public static final String SP_LOCATION = "location"; @SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) public static final String SP_INDICATION = "indication"; @SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc", type="token" ) public static final String SP_SPECIALARRANGEMENT = "special-arrangement"; - @SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "Encounter.status", description = "planned | arrived | in-progress | onleave | finished | cancelled", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java index 269458a67c4..7e98d13cbe4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentRequest.java @@ -47,35 +47,35 @@ public class EnrollmentRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class EnrollmentRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class EnrollmentRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class EnrollmentRequest extends DomainResource { /** * Patient Resource. */ - @Child(name="subject", type={Patient.class}, order=7, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference subject; @@ -123,7 +123,7 @@ public class EnrollmentRequest extends DomainResource { /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name="coverage", type={Coverage.class}, order=8, min=1, max=1) + @Child(name = "coverage", type = {Coverage.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) protected Reference coverage; @@ -135,7 +135,7 @@ public class EnrollmentRequest extends DomainResource { /** * The relationship of the patient to the subscriber. */ - @Child(name="relationship", type={Coding.class}, order=9, min=1, max=1) + @Child(name = "relationship", type = {Coding.class}, order = 9, min = 1, max = 1) @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) protected Coding relationship; @@ -599,10 +599,10 @@ public class EnrollmentRequest extends DomainResource { @SearchParamDefinition(name="identifier", path="EnrollmentRequest.identifier", description="The business identifier of the Enrollment", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "subject", path = "EnrollmentRequest.subject", description = "The party to be enrolled", type = "reference") + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "patient", path = "EnrollmentRequest.subject", description = "The party to be enrolled", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java index ee73b0d4a43..ace461673f3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EnrollmentResponse.java @@ -120,14 +120,14 @@ public class EnrollmentResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={EnrollmentRequest.class}, order=1, min=0, max=1) + @Child(name = "request", type = {EnrollmentRequest.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class EnrollmentResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class EnrollmentResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class EnrollmentResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java index 09ce86dd4f9..baebda9959d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/EpisodeOfCare.java @@ -494,35 +494,35 @@ public class EpisodeOfCare extends DomainResource { /** * Identifier(s) by which this EpisodeOfCare is known. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) by which this EpisodeOfCare is known", formalDefinition="Identifier(s) by which this EpisodeOfCare is known." ) protected List identifier; /** * planned | active | onhold | finished | withdrawn | other. */ - @Child(name="currentStatus", type={CodeType.class}, order=1, min=1, max=1) + @Child(name = "currentStatus", type = {CodeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="planned | active | onhold | finished | withdrawn | other", formalDefinition="planned | active | onhold | finished | withdrawn | other." ) protected Enumeration currentStatus; /** * The status history for the EpisodeOfCare. */ - @Child(name="statusHistory", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "statusHistory", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The status history for the EpisodeOfCare", formalDefinition="The status history for the EpisodeOfCare." ) protected List statusHistory; /** * The type can be very important in processing as this could be used in determining if the episodeofcare is relevant to specific government reporting, or other types of classifications. */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "type", type = {CodeableConcept.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Specific type of EpisodeOfcare", formalDefinition="The type can be very important in processing as this could be used in determining if the episodeofcare is relevant to specific government reporting, or other types of classifications." ) protected List type; /** * The patient that this episodeofcare applies to. */ - @Child(name="patient", type={Patient.class}, order=4, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="The patient that this episodeofcare applies to", formalDefinition="The patient that this episodeofcare applies to." ) protected Reference patient; @@ -534,7 +534,7 @@ public class EpisodeOfCare extends DomainResource { /** * The organization that has assumed the specific responsibilities for the specified duration. */ - @Child(name="managingOrganization", type={Organization.class}, order=5, min=0, max=1) + @Child(name = "managingOrganization", type = {Organization.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The organization that has assumed the specific responsibilities for the specified duration", formalDefinition="The organization that has assumed the specific responsibilities for the specified duration." ) protected Reference managingOrganization; @@ -546,14 +546,14 @@ public class EpisodeOfCare extends DomainResource { /** * The interval during which the managing organization assumes the defined responsibility. */ - @Child(name="period", type={Period.class}, order=6, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="The interval during which the managing organization assumes the defined responsibility", formalDefinition="The interval during which the managing organization assumes the defined responsibility." ) protected Period period; /** * A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for. */ - @Child(name="condition", type={Condition.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Condition.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", formalDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." ) protected List condition; /** @@ -565,7 +565,7 @@ public class EpisodeOfCare extends DomainResource { /** * A Referral Request that this EpisodeOfCare manages activities within. */ - @Child(name="referralRequest", type={ReferralRequest.class}, order=8, min=0, max=1) + @Child(name = "referralRequest", type = {ReferralRequest.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="A Referral Request that this EpisodeOfCare manages activities within", formalDefinition="A Referral Request that this EpisodeOfCare manages activities within." ) protected Reference referralRequest; @@ -577,7 +577,7 @@ public class EpisodeOfCare extends DomainResource { /** * The practitioner that is the care manager/care co-ordinator for this patient. */ - @Child(name="careManager", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name = "careManager", type = {Practitioner.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="The practitioner that is the care manager/care co-ordinator for this patient", formalDefinition="The practitioner that is the care manager/care co-ordinator for this patient." ) protected Reference careManager; @@ -589,7 +589,7 @@ public class EpisodeOfCare extends DomainResource { /** * The list of practitioners that may be facilitating this episode of care for specific purposes. */ - @Child(name="careTeam", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "careTeam", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." ) protected List careTeam; @@ -1115,23 +1115,23 @@ public class EpisodeOfCare extends DomainResource { return ResourceType.EpisodeOfCare; } - @SearchParamDefinition(name="date", path="EpisodeOfCare.period", description="The interval during which the managing organization assumes the defined responsibility", type="date" ) + @SearchParamDefinition(name = "date", path = "EpisodeOfCare.period", description = "The interval during which the managing organization assumes the defined responsibility", type = "date") public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="EpisodeOfCare.identifier", description="Identifier(s) by which this EpisodeOfCare is known", type="token" ) + @SearchParamDefinition(name = "identifier", path = "EpisodeOfCare.identifier", description = "Identifier(s) by which this EpisodeOfCare is known", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", type="reference" ) public static final String SP_CONDITION = "condition"; @SearchParamDefinition(name="referral", path="EpisodeOfCare.referralRequest", description="A Referral Request that this EpisodeOfCare manages activities within", type="reference" ) public static final String SP_REFERRAL = "referral"; - @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="The patient that this episodeofcare applies to", type="reference" ) + @SearchParamDefinition(name = "patient", path = "EpisodeOfCare.patient", description = "The patient that this episodeofcare applies to", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities for the specified duration", type="reference" ) + @SearchParamDefinition(name = "organization", path = "EpisodeOfCare.managingOrganization", description = "The organization that has assumed the specific responsibilities for the specified duration", type = "reference") public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Specific type of EpisodeOfcare", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="The practitioner that is the care manager/care co-ordinator for this patient", type="reference" ) + @SearchParamDefinition(name = "care-manager", path = "EpisodeOfCare.careManager", description = "The practitioner that is the care manager/care co-ordinator for this patient", type = "reference") public static final String SP_CAREMANAGER = "care-manager"; - @SearchParamDefinition(name="status", path="EpisodeOfCare.currentStatus", description="planned | active | onhold | finished | withdrawn | other", type="token" ) + @SearchParamDefinition(name = "status", path = "EpisodeOfCare.currentStatus", description = "planned | active | onhold | finished | withdrawn | other", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java index c7aa90e86b4..9d7ca645c9f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java @@ -120,14 +120,14 @@ public class ExplanationOfBenefit extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={OralHealthClaim.class}, order=1, min=0, max=1) + @Child(name = "request", type = {OralHealthClaim.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -139,42 +139,42 @@ public class ExplanationOfBenefit extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java index 8d10bb2c5bc..1c644873286 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Extension.java @@ -48,14 +48,14 @@ public class Extension extends Element implements IBaseExtension, IBa /** * Source of the definition for the extension code - a logical name or a URL. */ - @Child(name="url", type={UriType.class}, order=0, min=1, max=1) + @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="identifies the meaning of the extension", formalDefinition="Source of the definition for the extension code - a logical name or a URL." ) protected UriType url; /** * Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list). */ - @Child(name="value", type={}, order=1, min=0, max=1) + @Child(name = "value", type = {}, order = 1, min = 0, max = 1) @Description(shortDefinition="Value of extension", formalDefinition="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)." ) protected org.hl7.fhir.instance.model.Type value; @@ -177,10 +177,10 @@ public class Extension extends Element implements IBaseExtension, IBa ; } - @Override - public Extension setValue(IBaseDatatype theValue) { - return setValue((Type)theValue); - } + @Override + public Extension setValue(IBaseDatatype theValue) { + return setValue((Type) theValue); + } } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java index 6834b6fa3cb..42c180ab8ce 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java @@ -514,112 +514,112 @@ public class ExtensionDefinition extends DomainResource { /** * The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=0, min=1, max=1) + @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Literal URL used to reference this extension", formalDefinition="The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the extension", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * A free text natural language name identifying the extension. */ - @Child(name="name", type={StringType.class}, order=2, min=1, max=1) + @Child(name = "name", type = {StringType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Descriptional name for this profile", formalDefinition="A free text natural language name identifying the extension." ) protected StringType name; /** * Defined so that applications can use this name when displaying the value of the extension to the user. */ - @Child(name="display", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "display", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) protected StringType display; /** * Details of the individual or organization who accepts responsibility for publishing the extension definition. */ - @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the extension definition." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the extension and its use. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Natural language description of the extension", formalDefinition="A free text natural language description of the extension and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions. */ - @Child(name="code", type={Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "code", type = {Coding.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions." ) protected List code; /** * The status of the extension. */ - @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the extension." ) protected Enumeration status; /** * This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the extension was published. */ - @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Date for this version of the extension", formalDefinition="The date that this version of the extension was published." ) protected DateTimeType date; /** * The Scope and Usage that this extension was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Scope and Usage this extesion is for", formalDefinition="The Scope and Usage that this extension was created to meet." ) protected StringType requirements; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mapping", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * Identifies the type of context to which the extension applies. */ - @Child(name="contextType", type={CodeType.class}, order=13, min=1, max=1) + @Child(name = "contextType", type = {CodeType.class}, order = 13, min = 1, max = 1) @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name="context", type={StringType.class}, order=14, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "context", type = {StringType.class}, order = 14, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** * Definition of the elements that are defined to be in the extension. */ - @Child(name="element", type={ElementDefinition.class}, order=15, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "element", type = {ElementDefinition.class}, order = 15, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Definition of the elements in the extension", formalDefinition="Definition of the elements that are defined to be in the extension." ) protected List element; @@ -1428,20 +1428,20 @@ public class ExtensionDefinition extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="ExtensionDefinition.identifier", description="Other identifiers for the extension", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="ExtensionDefinition.code", description="Assist with indexing and finding", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="valueset", path="ExtensionDefinition.element.binding.reference[x]", description="Source of value set", type="reference" ) - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="name", path="ExtensionDefinition.name", description="Descriptional name for this profile", type="string" ) - public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "code", path = "ExtensionDefinition.code", description = "Assist with indexing and finding", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "valueset", path = "ExtensionDefinition.element.binding.reference[x]", description = "Source of value set", type = "reference") + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name = "name", path = "ExtensionDefinition.name", description = "Descriptional name for this profile", type = "string") + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ExtensionDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="ExtensionDefinition.description", description="Natural language description of the extension", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="url", path="ExtensionDefinition.url", description="Literal URL used to reference this extension", type="token" ) - public static final String SP_URL = "url"; - @SearchParamDefinition(name="status", path="ExtensionDefinition.status", description="draft | active | retired", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "description", path = "ExtensionDefinition.description", description = "Natural language description of the extension", type = "string") + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "url", path = "ExtensionDefinition.url", description = "Literal URL used to reference this extension", type = "token") + public static final String SP_URL = "url"; + @SearchParamDefinition(name = "status", path = "ExtensionDefinition.status", description = "draft | active | retired", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java index cad11df65d8..6597313300f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java @@ -706,14 +706,14 @@ public class FamilyHistory extends DomainResource { /** * This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The person who this history concerns. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) protected Reference patient; @@ -725,21 +725,21 @@ public class FamilyHistory extends DomainResource { /** * The date (and possibly time) when the family history was taken. */ - @Child(name="date", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family history was taken." ) protected DateTimeType date; /** * Conveys information about family history not specific to individual relations. */ - @Child(name="note", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "note", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Additional details not covered elsewhere", formalDefinition="Conveys information about family history not specific to individual relations." ) protected StringType note; /** * The related person. Each FamilyHistory resource contains the entire family history for a single person. */ - @Child(name="relation", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "relation", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Relative described by history", formalDefinition="The related person. Each FamilyHistory resource contains the entire family history for a single person." ) protected List relation; @@ -1022,7 +1022,7 @@ public class FamilyHistory extends DomainResource { @SearchParamDefinition(name="date", path="FamilyHistory.date", description="When history was captured/updated", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="patient", path="FamilyHistory.patient", description="The identity of a subject to list family history items for", type="reference" ) + @SearchParamDefinition(name = "patient", path = "FamilyHistory.patient", description = "The identity of a subject to list family history items for", type = "reference") public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java index 4fd99bba4ab..6aeec33fc02 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Goal.java @@ -204,14 +204,14 @@ public class Goal extends DomainResource { /** * This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this goal", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * Identifies the patient/subject whose intended care is described by the plan. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="The patient for whom this goal is intended for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) protected Reference patient; @@ -223,28 +223,28 @@ public class Goal extends DomainResource { /** * Human-readable description of a specific desired objective of care. */ - @Child(name="description", type={StringType.class}, order=2, min=1, max=1) + @Child(name = "description", type = {StringType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="What's the desired outcome?", formalDefinition="Human-readable description of a specific desired objective of care." ) protected StringType description; /** * Indicates whether the goal has been reached and is still considered relevant. */ - @Child(name="status", type={CodeType.class}, order=3, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="proposed | planned | in-progress | achieved | sustaining | cancelled | accepted | rejected", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." ) protected Enumeration status; /** * Any comments related to the goal. */ - @Child(name="notes", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." ) protected StringType notes; /** * The identified conditions that this goal relates to - the condition that caused it to be created, or that it is intended to address. */ - @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Health issues this goal addresses", formalDefinition="The identified conditions that this goal relates to - the condition that caused it to be created, or that it is intended to address." ) protected List concern; /** diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java index 00ab29b4521..ace0b85436c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Group.java @@ -380,56 +380,56 @@ public class Group extends DomainResource { /** * A unique business identifier for this group. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Unique id", formalDefinition="A unique business identifier for this group." ) protected Identifier identifier; /** * Identifies the broad classification of the kind of resources the group includes. */ - @Child(name="type", type={CodeType.class}, order=1, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="person | animal | practitioner | device | medication | substance", formalDefinition="Identifies the broad classification of the kind of resources the group includes." ) protected Enumeration type; /** * If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. */ - @Child(name="actual", type={BooleanType.class}, order=2, min=1, max=1) + @Child(name = "actual", type = {BooleanType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Descriptive or actual", formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals." ) protected BooleanType actual; /** * Provides a specific type of resource the group includes. E.g. "cow", "syringe", etc. */ - @Child(name="code", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Kind of Group members", formalDefinition="Provides a specific type of resource the group includes. E.g. 'cow', 'syringe', etc." ) protected CodeableConcept code; /** * A label assigned to the group for human identification and communication. */ - @Child(name="name", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Label for Group", formalDefinition="A label assigned to the group for human identification and communication." ) protected StringType name; /** * A count of the number of resource instances that are part of the group. */ - @Child(name="quantity", type={IntegerType.class}, order=5, min=0, max=1) + @Child(name = "quantity", type = {IntegerType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Number of members", formalDefinition="A count of the number of resource instances that are part of the group." ) protected IntegerType quantity; /** * Identifies the traits shared by members of the group. */ - @Child(name="characteristic", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "characteristic", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Trait of group members", formalDefinition="Identifies the traits shared by members of the group." ) protected List characteristic; /** * Identifies the resource instances that are members of the group. */ - @Child(name="member", type={Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "member", type = {Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who is in group", formalDefinition="Identifies the resource instances that are members of the group." ) protected List member; /** @@ -826,21 +826,21 @@ public class Group extends DomainResource { @SearchParamDefinition(name="actual", path="Group.actual", description="Descriptive or actual", type="token" ) public static final String SP_ACTUAL = "actual"; - @SearchParamDefinition(name="identifier", path="Group.identifier", description="Unique id", type="token" ) + @SearchParamDefinition(name = "identifier", path = "Group.identifier", description = "Unique id", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="characteristic-value", path="", description="A composite of both characteristic and value", type="composite" ) + @SearchParamDefinition(name = "characteristic-value", path = "", description = "A composite of both characteristic and value", type = "composite") public static final String SP_CHARACTERISTICVALUE = "characteristic-value"; @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="member", path="Group.member", description="Who is in group", type="reference" ) + @SearchParamDefinition(name = "member", path = "Group.member", description = "Who is in group", type = "reference") public static final String SP_MEMBER = "member"; - @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" ) + @SearchParamDefinition(name = "exclude", path = "Group.characteristic.exclude", description = "Group includes or excludes", type = "token") public static final String SP_EXCLUDE = "exclude"; @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="Value held by characteristic", type="token" ) + @SearchParamDefinition(name = "value", path = "Group.characteristic.value[x]", description = "Value held by characteristic", type = "token") public static final String SP_VALUE = "value"; - @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" ) + @SearchParamDefinition(name = "characteristic", path = "Group.characteristic.code", description = "Kind of characteristic", type = "token") public static final String SP_CHARACTERISTIC = "characteristic"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java index 175768833c5..19717fa99d1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HealthcareService.java @@ -657,14 +657,14 @@ public class HealthcareService extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The location where this healthcare service may be provided. */ - @Child(name="location", type={Location.class}, order=1, min=1, max=1) + @Child(name = "location", type = {Location.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="The location where this healthcare service may be provided", formalDefinition="The location where this healthcare service may be provided." ) protected Reference location; @@ -676,161 +676,161 @@ public class HealthcareService extends DomainResource { /** * Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type. */ - @Child(name="serviceCategory", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type", formalDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type." ) protected CodeableConcept serviceCategory; /** * A specific type of service that may be delivered or performed. */ - @Child(name="serviceType", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "serviceType", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A specific type of service that may be delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." ) protected List serviceType; /** * Further description of the service as it would be presented to a consumer while searching. */ - @Child(name="serviceName", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "serviceName", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Further description of the service as it would be presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." ) protected StringType serviceName; /** * Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. */ - @Child(name="comment", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName", formalDefinition="Additional description of the or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." ) protected StringType comment; /** * Extra details about the service that can't be placed in the other fields. */ - @Child(name="extraDetails", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "extraDetails", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." ) protected StringType extraDetails; /** * The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type. */ - @Child(name="freeProvisionCode", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name = "freeProvisionCode", type = {CodeableConcept.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type", formalDefinition="The free provision code provides a link to the Free Provision reference entity to enable the selection of one free provision type." ) protected CodeableConcept freeProvisionCode; /** * Does this service have specific eligibility requirements that need to be met in order to use the service. */ - @Child(name="eligibility", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name = "eligibility", type = {CodeableConcept.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service." ) protected CodeableConcept eligibility; /** * The description of service eligibility should, in general, not exceed one or two paragraphs. It should be sufficient for a prospective consumer to determine if they are likely to be eligible or not. Where eligibility requirements and conditions are complex, it may simply be noted that an eligibility assessment is required. Where eligibility is determined by an outside source, such as an Act of Parliament, this should be noted, preferably with a reference to a commonly available copy of the source document such as a web page. */ - @Child(name="eligibilityNote", type={StringType.class}, order=9, min=0, max=1) + @Child(name = "eligibilityNote", type = {StringType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="The description of service eligibility should, in general, not exceed one or two paragraphs. It should be sufficient for a prospective consumer to determine if they are likely to be eligible or not. Where eligibility requirements and conditions are complex, it may simply be noted that an eligibility assessment is required. Where eligibility is determined by an outside source, such as an Act of Parliament, this should be noted, preferably with a reference to a commonly available copy of the source document such as a web page." ) protected StringType eligibilityNote; /** * Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum). */ - @Child(name="appointmentRequired", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name = "appointmentRequired", type = {CodeableConcept.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum)", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a Site to be provided by the Organization. Indicates if an appointment is required for access to this service. If this flag is 'NotDefined', then this flag is overridden by the Site's availability flag. (ConditionalIndicator Enum)." ) protected CodeableConcept appointmentRequired; /** * If there is an image associated with this Service Site, its URI can be included here. */ - @Child(name="imageURI", type={UriType.class}, order=11, min=0, max=1) + @Child(name = "imageURI", type = {UriType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="If there is an image associated with this Service Site, its URI can be included here", formalDefinition="If there is an image associated with this Service Site, its URI can be included here." ) protected UriType imageURI; /** * A Collection of times that the Service Site is available. */ - @Child(name="availableTime", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "availableTime", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A Collection of times that the Service Site is available", formalDefinition="A Collection of times that the Service Site is available." ) protected List availableTime; /** * Not avail times - need better description. */ - @Child(name="notAvailableTime", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notAvailableTime", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Not avail times - need better description", formalDefinition="Not avail times - need better description." ) protected List notAvailableTime; /** * A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times. */ - @Child(name="availabilityExceptions", type={StringType.class}, order=14, min=0, max=1) + @Child(name = "availabilityExceptions", type = {StringType.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times", formalDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times." ) protected StringType availabilityExceptions; /** * The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. */ - @Child(name="publicKey", type={StringType.class}, order=15, min=0, max=1) + @Child(name = "publicKey", type = {StringType.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available", formalDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available." ) protected StringType publicKey; /** * Program Names that can be used to categorize the service. */ - @Child(name="programName", type={StringType.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "programName", type = {StringType.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Program Names that can be used to categorize the service", formalDefinition="Program Names that can be used to categorize the service." ) protected List programName; /** * List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts. */ - @Child(name="contactPoint", type={ContactPoint.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contactPoint", type = {ContactPoint.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts", formalDefinition="List of contacts related to this specific healthcare service. If this is empty, then refer to the location's contacts." ) protected List contactPoint; /** * Collection of Characteristics (attributes). */ - @Child(name="characteristic", type={CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "characteristic", type = {CodeableConcept.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Collection of Characteristics (attributes)", formalDefinition="Collection of Characteristics (attributes)." ) protected List characteristic; /** * Ways that the service accepts referrals. */ - @Child(name="referralMethod", type={CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "referralMethod", type = {CodeableConcept.class}, order = 19, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals." ) protected List referralMethod; /** * The setting where this service can be provided, such is in home, or at location in organisation. */ - @Child(name="setting", type={CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "setting", type = {CodeableConcept.class}, order = 20, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The setting where this service can be provided, such is in home, or at location in organisation", formalDefinition="The setting where this service can be provided, such is in home, or at location in organisation." ) protected List setting; /** * Collection of Target Groups for the Service Site (The target audience that this service is for). */ - @Child(name="targetGroup", type={CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "targetGroup", type = {CodeableConcept.class}, order = 21, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Collection of Target Groups for the Service Site (The target audience that this service is for)", formalDefinition="Collection of Target Groups for the Service Site (The target audience that this service is for)." ) protected List targetGroup; /** * Need better description. */ - @Child(name="coverageArea", type={CodeableConcept.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverageArea", type = {CodeableConcept.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Need better description", formalDefinition="Need better description." ) protected List coverageArea; /** * Need better description. */ - @Child(name="catchmentArea", type={CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "catchmentArea", type = {CodeableConcept.class}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Need better description", formalDefinition="Need better description." ) protected List catchmentArea; /** * List of the specific. */ - @Child(name="serviceCode", type={CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "serviceCode", type = {CodeableConcept.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of the specific", formalDefinition="List of the specific." ) protected List serviceCode; @@ -1919,7 +1919,7 @@ public class HealthcareService extends DomainResource { public static final String SP_SERVICETYPE = "servicetype"; @SearchParamDefinition(name="name", path="HealthcareService.serviceName", description="A portion of the Healthcare service name", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference" ) + @SearchParamDefinition(name = "location", path = "HealthcareService.location", description = "The location of the Healthcare Service", type = "reference") public static final String SP_LOCATION = "location"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java index 53ae653b30f..f2dd120c3a0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/HumanName.java @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A human's name with the ability to identify parts and usage. */ @DatatypeDef(name="HumanName") -public class HumanName extends Type implements ICompositeType { +public class HumanName extends Type implements ICompositeType { public enum NameUse { /** @@ -188,49 +188,49 @@ public class HumanName extends Type implements ICompositeType { /** * Identifies the purpose for this name. */ - @Child(name="use", type={CodeType.class}, order=0, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="usual | official | temp | nickname | anonymous | old | maiden", formalDefinition="Identifies the purpose for this name." ) protected Enumeration use; /** * A full text representation of the name. */ - @Child(name="text", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "text", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Text representation of the full name", formalDefinition="A full text representation of the name." ) protected StringType text; /** * 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. */ - @Child(name="family", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "family", type = {StringType.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Family name (often called 'Surname')", formalDefinition="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." ) protected List family; /** * Given name. */ - @Child(name="given", type={StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "given", type = {StringType.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Given names (not always 'first'). Includes middle names", formalDefinition="Given name." ) protected List given; /** * 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. */ - @Child(name="prefix", type={StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "prefix", type = {StringType.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Parts that come before the name", formalDefinition="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." ) protected List prefix; /** * 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. */ - @Child(name="suffix", type={StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "suffix", type = {StringType.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Parts that come after the name", formalDefinition="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." ) protected List suffix; /** * Indicates the period of time when this name was valid for the named person. */ - @Child(name="period", type={Period.class}, order=6, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Time period when name was/is in use", formalDefinition="Indicates the period of time when this name was valid for the named person." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java index c749600981c..2c7e535c408 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Identifier.java @@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A technical identifier - identifies some entity uniquely and unambiguously. */ @DatatypeDef(name="Identifier") -public class Identifier extends Type implements ICompositeType { +public class Identifier extends Type implements ICompositeType { public enum IdentifierUse { /** @@ -146,42 +146,42 @@ public class Identifier extends Type implements ICompositeType { /** * The purpose of this identifier. */ - @Child(name="use", type={CodeType.class}, order=0, min=0, max=1, enumFactory=IdentifierUseEnumFactory.class) + @Child(name = "use", type = {CodeType.class}, order = 0, min = 0, max = 1, enumFactory = IdentifierUseEnumFactory.class) @Description(shortDefinition="usual | official | temp | secondary (If known)", formalDefinition="The purpose of this identifier." ) protected Enumeration use; /** * A text string for the identifier that can be displayed to a human so they can recognize the identifier. */ - @Child(name="label", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "label", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Description of identifier", formalDefinition="A text string for the identifier that can be displayed to a human so they can recognize the identifier." ) protected StringType label; /** * Establishes the namespace in which set of possible id values is unique. */ - @Child(name="system", type={UriType.class}, order=2, min=0, max=1) + @Child(name = "system", type = {UriType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="The namespace for the identifier", formalDefinition="Establishes the namespace in which set of possible id values is unique." ) protected UriType system; /** * The portion of the identifier typically displayed to the user and which is unique within the context of the system. */ - @Child(name="value", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "value", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system." ) protected StringType value; /** * Time period during which identifier is/was valid for use. */ - @Child(name="period", type={Period.class}, order=4, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Time period when id is/was valid for use", formalDefinition="Time period during which identifier is/was valid for use." ) protected Period period; /** * Organization that issued/manages the identifier. */ - @Child(name="assigner", type={Organization.class}, order=5, min=0, max=1) + @Child(name = "assigner", type = {Organization.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Organization that issued id (may be just text)", formalDefinition="Organization that issued/manages the identifier." ) protected Reference assigner; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java index 32d413de0c3..35725caa223 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingObjectSelection.java @@ -889,14 +889,14 @@ public class ImagingObjectSelection extends DomainResource { /** * Instance UID of the DICOM KOS SOP Instances represenetd in this resource. */ - @Child(name="uid", type={OidType.class}, order=0, min=1, max=1) + @Child(name = "uid", type = {OidType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Instance UID", formalDefinition="Instance UID of the DICOM KOS SOP Instances represenetd in this resource." ) protected OidType uid; /** * A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection." ) protected Reference patient; @@ -908,21 +908,21 @@ public class ImagingObjectSelection extends DomainResource { /** * The reason for, or significance of, the selection of objects referenced in the resource. */ - @Child(name="title", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name = "title", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) protected CodeableConcept title; /** * Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. */ - @Child(name="description", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) protected StringType description; /** * Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. */ - @Child(name="author", type={Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) protected Reference author; @@ -934,14 +934,14 @@ public class ImagingObjectSelection extends DomainResource { /** * Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource. */ - @Child(name="authoringTime", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "authoringTime", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource." ) protected DateTimeType authoringTime; /** * Study identity and locating information of the DICOM SOP instances in the selection. */ - @Child(name="study", type={}, order=6, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "study", type = {}, order = 6, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) protected List study; @@ -1305,9 +1305,9 @@ public class ImagingObjectSelection extends DomainResource { return ResourceType.ImagingObjectSelection; } - @SearchParamDefinition(name="identifier", path="ImagingObjectSelection.uid", description="UID of key DICOM object selection", type="token" ) + @SearchParamDefinition(name = "identifier", path = "ImagingObjectSelection.uid", description = "UID of key DICOM object selection", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="authoring-time", path="ImagingObjectSelection.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) + @SearchParamDefinition(name = "authoring-time", path = "ImagingObjectSelection.authoringTime", description = "Time of key DICOM object selection authoring", type = "date") public static final String SP_AUTHORINGTIME = "authoring-time"; @SearchParamDefinition(name="selected-study", path="ImagingObjectSelection.study.uid", description="Study selected in key DICOM object selection", type="token" ) public static final String SP_SELECTEDSTUDY = "selected-study"; @@ -1315,7 +1315,7 @@ public class ImagingObjectSelection extends DomainResource { public static final String SP_AUTHOR = "author"; @SearchParamDefinition(name="patient", path="ImagingObjectSelection.patient", description="Subject of key DICOM object selection", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="title", path="ImagingObjectSelection.title", description="Title of key DICOM object selection", type="token" ) + @SearchParamDefinition(name = "title", path = "ImagingObjectSelection.title", description = "Title of key DICOM object selection", type = "token") public static final String SP_TITLE = "title"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java index 5e5725b8bb7..08ffc24b1b0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImagingStudy.java @@ -2511,14 +2511,14 @@ public class ImagingStudy extends DomainResource { /** * Date and Time the study started. */ - @Child(name="started", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name = "started", type = {DateTimeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="When the study was started (0008,0020)+(0008,0030)", formalDefinition="Date and Time the study started." ) protected DateTimeType started; /** * The patient for whom the images are of. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Who the images are of", formalDefinition="The patient for whom the images are of." ) protected Reference patient; @@ -2530,28 +2530,28 @@ public class ImagingStudy extends DomainResource { /** * Formal identifier for the study. */ - @Child(name="uid", type={OidType.class}, order=2, min=1, max=1) + @Child(name = "uid", type = {OidType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Formal identifier for the study (0020,000D)", formalDefinition="Formal identifier for the study." ) protected OidType uid; /** * Accession Number. */ - @Child(name="accession", type={Identifier.class}, order=3, min=0, max=1) + @Child(name = "accession", type = {Identifier.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Accession Number (0008,0050)", formalDefinition="Accession Number." ) protected Identifier accession; /** * Other identifiers for the study. */ - @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the study (0020,0010)", formalDefinition="Other identifiers for the study." ) protected List identifier; /** * A list of the diagnostic orders that resulted in this imaging study being performed. */ - @Child(name="order", type={DiagnosticOrder.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "order", type = {DiagnosticOrder.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Order(s) that caused this study to be performed", formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed." ) protected List order; /** @@ -2563,14 +2563,14 @@ public class ImagingStudy extends DomainResource { /** * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). */ - @Child(name="modalityList", type={CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "modalityList", type = {CodeType.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="All series.modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) protected List> modalityList; /** * The requesting/referring physician. */ - @Child(name="referrer", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name = "referrer", type = {Practitioner.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Referring physician (0008,0090)", formalDefinition="The requesting/referring physician." ) protected Reference referrer; @@ -2582,49 +2582,49 @@ public class ImagingStudy extends DomainResource { /** * Availability of study (online, offline or nearline). */ - @Child(name="availability", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "availability", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) protected Enumeration availability; /** * WADO-RS URI where Study is available. */ - @Child(name="url", type={UriType.class}, order=9, min=0, max=1) + @Child(name = "url", type = {UriType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Retrieve URI (0008,1190)", formalDefinition="WADO-RS URI where Study is available." ) protected UriType url; /** * Number of Series in Study. */ - @Child(name="numberOfSeries", type={IntegerType.class}, order=10, min=1, max=1) + @Child(name = "numberOfSeries", type = {IntegerType.class}, order = 10, min = 1, max = 1) @Description(shortDefinition="Number of Study Related Series (0020,1206)", formalDefinition="Number of Series in Study." ) protected IntegerType numberOfSeries; /** * Number of SOP Instances in Study. */ - @Child(name="numberOfInstances", type={IntegerType.class}, order=11, min=1, max=1) + @Child(name = "numberOfInstances", type = {IntegerType.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="Number of Study Related Instances (0020,1208)", formalDefinition="Number of SOP Instances in Study." ) protected IntegerType numberOfInstances; /** * Diagnoses etc provided with request. */ - @Child(name="clinicalInformation", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "clinicalInformation", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Diagnoses etc with request (0040,1002)", formalDefinition="Diagnoses etc provided with request." ) protected StringType clinicalInformation; /** * Type of procedure performed. */ - @Child(name="procedure", type={Coding.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "procedure", type = {Coding.class}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Type of procedure performed (0008,1032)", formalDefinition="Type of procedure performed." ) protected List procedure; /** * Who read study and interpreted the images. */ - @Child(name="interpreter", type={Practitioner.class}, order=14, min=0, max=1) + @Child(name = "interpreter", type = {Practitioner.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Who interpreted images (0008,1060)", formalDefinition="Who read study and interpreted the images." ) protected Reference interpreter; @@ -2636,14 +2636,14 @@ public class ImagingStudy extends DomainResource { /** * Institution-generated description or classification of the Study (component) performed. */ - @Child(name="description", type={StringType.class}, order=15, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Institution-generated description (0008,1030)", formalDefinition="Institution-generated description or classification of the Study (component) performed." ) protected StringType description; /** * Each study has one or more series of image instances. */ - @Child(name="series", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "series", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of image instances." ) protected List series; @@ -3512,20 +3512,20 @@ public class ImagingStudy extends DomainResource { public static final String SP_STUDY = "study"; @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopclass", description="DICOM class type (0008,0016)", type="token" ) public static final String SP_DICOMCLASS = "dicom-class"; - @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the image", type="token" ) - public static final String SP_MODALITY = "modality"; - @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="Body part examined (Map from 0018,0015)", type="token" ) - public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name = "modality", path = "ImagingStudy.series.modality", description = "The modality of the image", type = "token") + public static final String SP_MODALITY = "modality"; + @SearchParamDefinition(name = "bodysite", path = "ImagingStudy.series.bodySite", description = "Body part examined (Map from 0018,0015)", type = "token") + public static final String SP_BODYSITE = "bodysite"; @SearchParamDefinition(name="size", path="", description="The size of the image in MB - may include > or < in the value", type="number" ) public static final String SP_SIZE = "size"; - @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The series id for the image", type="token" ) - public static final String SP_SERIES = "series"; - @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) - public static final String SP_STARTED = "started"; - @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession id for the image", type="token" ) - public static final String SP_ACCESSION = "accession"; + @SearchParamDefinition(name = "patient", path = "ImagingStudy.patient", description = "Who the study is about", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "series", path = "ImagingStudy.series.uid", description = "The series id for the image", type = "token") + public static final String SP_SERIES = "series"; + @SearchParamDefinition(name = "started", path = "ImagingStudy.started", description = "When the study was started", type = "date") + public static final String SP_STARTED = "started"; + @SearchParamDefinition(name = "accession", path = "ImagingStudy.accession", description = "The accession id for the image", type = "token") + public static final String SP_ACCESSION = "accession"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java index e4482c5a6d9..d507ff09e2e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Immunization.java @@ -835,28 +835,28 @@ public class Immunization extends DomainResource { /** * A unique identifier assigned to this immunization record. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." ) protected List identifier; /** * Date vaccine administered or was to be administered. */ - @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Vaccination administration date", formalDefinition="Date vaccine administered or was to be administered." ) protected DateTimeType date; /** * Vaccine that was administered or was to be administered. */ - @Child(name="vaccineType", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name = "vaccineType", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." ) protected CodeableConcept vaccineType; /** * The patient who either received or did not receive the immunization. */ - @Child(name="patient", type={Patient.class}, order=3, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Who was immunized?", formalDefinition="The patient who either received or did not receive the immunization." ) protected Reference patient; @@ -868,21 +868,21 @@ public class Immunization extends DomainResource { /** * Indicates if the vaccination was or was not given. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=4, min=1, max=1) + @Child(name = "wasNotGiven", type = {BooleanType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="Was immunization given?", formalDefinition="Indicates if the vaccination was or was not given." ) protected BooleanType wasNotGiven; /** * True if this administration was reported rather than directly administered. */ - @Child(name="reported", type={BooleanType.class}, order=5, min=1, max=1) + @Child(name = "reported", type = {BooleanType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="Is this a self-reported record?", formalDefinition="True if this administration was reported rather than directly administered." ) protected BooleanType reported; /** * Clinician who administered the vaccine. */ - @Child(name="performer", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name = "performer", type = {Practitioner.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Who administered vaccine?", formalDefinition="Clinician who administered the vaccine." ) protected Reference performer; @@ -894,7 +894,7 @@ public class Immunization extends DomainResource { /** * Clinician who ordered the vaccination. */ - @Child(name="requester", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name = "requester", type = {Practitioner.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Who ordered vaccination?", formalDefinition="Clinician who ordered the vaccination." ) protected Reference requester; @@ -906,7 +906,7 @@ public class Immunization extends DomainResource { /** * The visit or admission or other contact between patient and health care provider the immunization was performed as part of. */ - @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." ) protected Reference encounter; @@ -918,7 +918,7 @@ public class Immunization extends DomainResource { /** * Name of vaccine manufacturer. */ - @Child(name="manufacturer", type={Organization.class}, order=9, min=0, max=1) + @Child(name = "manufacturer", type = {Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." ) protected Reference manufacturer; @@ -930,7 +930,7 @@ public class Immunization extends DomainResource { /** * The service delivery location where the vaccine administration occurred. */ - @Child(name="location", type={Location.class}, order=10, min=0, max=1) + @Child(name = "location", type = {Location.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Where did vaccination occur?", formalDefinition="The service delivery location where the vaccine administration occurred." ) protected Reference location; @@ -942,56 +942,56 @@ public class Immunization extends DomainResource { /** * Lot number of the vaccine product. */ - @Child(name="lotNumber", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "lotNumber", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the vaccine product." ) protected StringType lotNumber; /** * Date vaccine batch expires. */ - @Child(name="expirationDate", type={DateType.class}, order=12, min=0, max=1) + @Child(name = "expirationDate", type = {DateType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." ) protected DateType expirationDate; /** * Body site where vaccine was administered. */ - @Child(name="site", type={CodeableConcept.class}, order=13, min=0, max=1) + @Child(name = "site", type = {CodeableConcept.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Body site vaccine was administered", formalDefinition="Body site where vaccine was administered." ) protected CodeableConcept site; /** * The path by which the vaccine product is taken into the body. */ - @Child(name="route", type={CodeableConcept.class}, order=14, min=0, max=1) + @Child(name = "route", type = {CodeableConcept.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." ) protected CodeableConcept route; /** * The quantity of vaccine product that was administered. */ - @Child(name="doseQuantity", type={Quantity.class}, order=15, min=0, max=1) + @Child(name = "doseQuantity", type = {Quantity.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." ) protected Quantity doseQuantity; /** * Reasons why a vaccine was or was not administered. */ - @Child(name="explanation", type={}, order=16, min=0, max=1) + @Child(name = "explanation", type = {}, order = 16, min = 0, max = 1) @Description(shortDefinition="Administration / non-administration reasons", formalDefinition="Reasons why a vaccine was or was not administered." ) protected ImmunizationExplanationComponent explanation; /** * Categorical data indicating that an adverse event is associated in time to an immunization. */ - @Child(name="reaction", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reaction", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Details of a reaction that follows immunization", formalDefinition="Categorical data indicating that an adverse event is associated in time to an immunization." ) protected List reaction; /** * Contains information about the protocol(s) under which the vaccine was administered. */ - @Child(name="vaccinationProtocol", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "vaccinationProtocol", type = {}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="What protocol was followed", formalDefinition="Contains information about the protocol(s) under which the vaccine was administered." ) protected List vaccinationProtocol; @@ -1828,38 +1828,38 @@ public class Immunization extends DomainResource { return ResourceType.Immunization; } - @SearchParamDefinition(name="date", path="Immunization.date", description="Vaccination (non)-Administration Date", type="date" ) - public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "date", path = "Immunization.date", description = "Vaccination (non)-Administration Date", type = "date") + public static final String SP_DATE = "date"; @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference" ) public static final String SP_REQUESTER = "requester"; - @SearchParamDefinition(name="identifier", path="Immunization.identifier", description="Business identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "Immunization.identifier", description = "Business identifier", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="reason", path="Immunization.explanation.reason", description="Why immunization occurred", type="token" ) public static final String SP_REASON = "reason"; - @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference" ) - public static final String SP_PERFORMER = "performer"; - @SearchParamDefinition(name="reaction", path="Immunization.reaction.detail", description="Additional information on reaction", type="reference" ) - public static final String SP_REACTION = "reaction"; - @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" ) - public static final String SP_LOTNUMBER = "lot-number"; + @SearchParamDefinition(name = "performer", path = "Immunization.performer", description = "The practitioner who administered the vaccination", type = "reference") + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name = "reaction", path = "Immunization.reaction.detail", description = "Additional information on reaction", type = "reference") + public static final String SP_REACTION = "reaction"; + @SearchParamDefinition(name = "lot-number", path = "Immunization.lotNumber", description = "Vaccine Lot Number", type = "string") + public static final String SP_LOTNUMBER = "lot-number"; @SearchParamDefinition(name="subject", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="vaccine-type", path="Immunization.vaccineType", description="Vaccine Product Type Administered", type="token" ) - public static final String SP_VACCINETYPE = "vaccine-type"; + @SearchParamDefinition(name = "vaccine-type", path = "Immunization.vaccineType", description = "Vaccine Product Type Administered", type = "token") + public static final String SP_VACCINETYPE = "vaccine-type"; @SearchParamDefinition(name="notgiven", path="Immunization.wasNotGiven", description="Administrations which were not given", type="token" ) public static final String SP_NOTGIVEN = "notgiven"; @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference" ) public static final String SP_MANUFACTURER = "manufacturer"; - @SearchParamDefinition(name="dose-sequence", path="Immunization.vaccinationProtocol.doseSequence", description="What dose number within series?", type="number" ) - public static final String SP_DOSESEQUENCE = "dose-sequence"; - @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="reason-not-given", path="Immunization.explanation.reasonNotGiven", description="Explanation of reason vaccination was not administered", type="token" ) - public static final String SP_REASONNOTGIVEN = "reason-not-given"; - @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference" ) - public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When did reaction start?", type="date" ) - public static final String SP_REACTIONDATE = "reaction-date"; + @SearchParamDefinition(name = "dose-sequence", path = "Immunization.vaccinationProtocol.doseSequence", description = "What dose number within series?", type = "number") + public static final String SP_DOSESEQUENCE = "dose-sequence"; + @SearchParamDefinition(name = "patient", path = "Immunization.patient", description = "The patient for the vaccination record", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "reason-not-given", path = "Immunization.explanation.reasonNotGiven", description = "Explanation of reason vaccination was not administered", type = "token") + public static final String SP_REASONNOTGIVEN = "reason-not-given"; + @SearchParamDefinition(name = "location", path = "Immunization.location", description = "The service delivery location or facility in which the vaccine was / was to be administered", type = "reference") + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name = "reaction-date", path = "Immunization.reaction.date", description = "When did reaction start?", type = "date") + public static final String SP_REACTIONDATE = "reaction-date"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java index 670574074f7..dcdb6679919 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ImmunizationRecommendation.java @@ -895,14 +895,14 @@ public class ImmunizationRecommendation extends DomainResource { /** * A unique identifier assigned to this particular recommendation record. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this particular recommendation record." ) protected List identifier; /** * The patient for whom the recommendations are for. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Who this profile is for", formalDefinition="The patient for whom the recommendations are for." ) protected Reference patient; @@ -914,7 +914,7 @@ public class ImmunizationRecommendation extends DomainResource { /** * Vaccine administration recommendations. */ - @Child(name="recommendation", type={}, order=2, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "recommendation", type = {}, order = 2, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Vaccine administration recommendations", formalDefinition="Vaccine administration recommendations." ) protected List recommendation; @@ -1092,13 +1092,13 @@ public class ImmunizationRecommendation extends DomainResource { return ResourceType.ImmunizationRecommendation; } - @SearchParamDefinition(name="date", path="ImmunizationRecommendation.recommendation.date", description="Date recommendation created", type="date" ) + @SearchParamDefinition(name = "date", path = "ImmunizationRecommendation.recommendation.date", description = "Date recommendation created", type = "date") public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="Business identifier", type="token" ) + @SearchParamDefinition(name = "identifier", path = "ImmunizationRecommendation.identifier", description = "Business identifier", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Number of dose within sequence", type="token" ) public static final String SP_DOSESEQUENCE = "dose-sequence"; - @SearchParamDefinition(name="subject", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) + @SearchParamDefinition(name = "subject", path = "ImmunizationRecommendation.patient", description = "Who this profile is for", type = "reference") public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) public static final String SP_PATIENT = "patient"; @@ -1106,11 +1106,11 @@ public class ImmunizationRecommendation extends DomainResource { public static final String SP_VACCINETYPE = "vaccine-type"; @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" ) public static final String SP_DOSENUMBER = "dose-number"; - @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="Patient observations supporting recommendation", type="reference" ) + @SearchParamDefinition(name = "information", path = "ImmunizationRecommendation.recommendation.supportingPatientInformation", description = "Patient observations supporting recommendation", type = "reference") public static final String SP_INFORMATION = "information"; - @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="Past immunizations supporting recommendation", type="reference" ) + @SearchParamDefinition(name = "support", path = "ImmunizationRecommendation.recommendation.supportingImmunization", description = "Past immunizations supporting recommendation", type = "reference") public static final String SP_SUPPORT = "support"; - @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="Vaccine administration status", type="token" ) + @SearchParamDefinition(name = "status", path = "ImmunizationRecommendation.recommendation.forecastStatus", description = "Vaccine administration status", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java index cad6c0f4a54..a95a5532181 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstantType.java @@ -45,7 +45,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; *
  • {@link TemporalPrecisionEnum#MILLI} * */ -@DatatypeDef(name="instant") +@DatatypeDef(name = "instant") public class InstantType extends BaseDateTimeType { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java index b405402f3af..0c37d7e3c43 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java @@ -2688,35 +2688,35 @@ public class InstitutionalClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class InstitutionalClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class InstitutionalClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class InstitutionalClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) + @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class InstitutionalClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=11, min=0, max=1) + @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,14 +2797,14 @@ public class InstitutionalClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=12, min=0, max=1) + @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2816,21 +2816,21 @@ public class InstitutionalClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2842,56 +2842,56 @@ public class InstitutionalClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=19, min=0, max=1) + @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) + @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) + @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additionalMaterials", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3939,10 +3939,10 @@ public class InstitutionalClaim extends DomainResource { return ResourceType.InstitutionalClaim; } - @SearchParamDefinition(name="identifier", path="InstitutionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="use", path="InstitutionalClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; + @SearchParamDefinition(name = "identifier", path = "InstitutionalClaim.identifier", description = "The primary identifier of the financial resource", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "use", path = "InstitutionalClaim.use", description = "The kind of financial resource", type = "token") + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="InstitutionalClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="InstitutionalClaim.priority", description="Processing priority requested", type="token" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java index 6b8e205ed80..e75f6bca10d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/List_.java @@ -42,7 +42,7 @@ import org.hl7.fhir.instance.model.annotations.Description; /** * A set of information summarized from a list of other resources. */ -@ResourceDef(name="List_", profile="http://hl7.org/fhir/Profile/List_") +@ResourceDef(name = "List_", profile = "http://hl7.org/fhir/Profile/List_") public class List_ extends DomainResource { public enum ListMode { @@ -393,21 +393,21 @@ public class List_ extends DomainResource { /** * Identifier for the List assigned for business purposes outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR." ) protected List identifier; /** * This code defines the purpose of the list - why it was created. */ - @Child(name="code", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="What the purpose of this list is", formalDefinition="This code defines the purpose of the list - why it was created." ) protected CodeableConcept code; /** * The common subject (or patient) of the resources that are in the list, if there is one. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=2, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="If all resources have the same subject", formalDefinition="The common subject (or patient) of the resources that are in the list, if there is one." ) protected Reference subject; @@ -419,7 +419,7 @@ public class List_ extends DomainResource { /** * The entity responsible for deciding what the contents of the list were. */ - @Child(name="source", type={Practitioner.class, Patient.class, Device.class}, order=3, min=0, max=1) + @Child(name = "source", type = {Practitioner.class, Patient.class, Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who and/or what defined the list contents", formalDefinition="The entity responsible for deciding what the contents of the list were." ) protected Reference source; @@ -431,35 +431,35 @@ public class List_ extends DomainResource { /** * The date that the list was prepared. */ - @Child(name="date", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When the list was prepared", formalDefinition="The date that the list was prepared." ) protected DateTimeType date; /** * Whether items in the list have a meaningful order. */ - @Child(name="ordered", type={BooleanType.class}, order=5, min=0, max=1) + @Child(name = "ordered", type = {BooleanType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Whether items in the list have a meaningful order", formalDefinition="Whether items in the list have a meaningful order." ) protected BooleanType ordered; /** * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. */ - @Child(name="mode", type={CodeType.class}, order=6, min=1, max=1) + @Child(name = "mode", type = {CodeType.class}, order = 6, min = 1, max = 1) @Description(shortDefinition="working | snapshot | changes", formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) protected Enumeration mode; /** * Entries in this list. */ - @Child(name="entry", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "entry", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Entries in the list", formalDefinition="Entries in this list." ) protected List entry; /** * If the list is empty, why the list is empty. */ - @Child(name="emptyReason", type={CodeableConcept.class}, order=8, min=0, max=1) + @Child(name = "emptyReason", type = {CodeableConcept.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Why list is empty", formalDefinition="If the list is empty, why the list is empty." ) protected CodeableConcept emptyReason; @@ -877,17 +877,17 @@ public class List_ extends DomainResource { @SearchParamDefinition(name="date", path="List.date", description="When the list was prepared", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="item", path="List.entry.item", description="Actual entry", type="reference" ) + @SearchParamDefinition(name = "item", path = "List.entry.item", description = "Actual entry", type = "reference") public static final String SP_ITEM = "item"; @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="Why list is empty", type="token" ) public static final String SP_EMPTYREASON = "empty-reason"; - @SearchParamDefinition(name="code", path="List.code", description="What the purpose of this list is", type="token" ) + @SearchParamDefinition(name = "code", path = "List.code", description = "What the purpose of this list is", type = "token") public static final String SP_CODE = "code"; - @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference" ) + @SearchParamDefinition(name = "subject", path = "List.subject", description = "If all resources have the same subject", type = "reference") public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="List.subject", description="If all resources have the same subject", type="reference" ) + @SearchParamDefinition(name = "patient", path = "List.subject", description = "If all resources have the same subject", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents", type="reference" ) + @SearchParamDefinition(name = "source", path = "List.source", description = "Who and/or what defined the list contents", type = "reference") public static final String SP_SOURCE = "source"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java index 8832fd37afa..409c11ced5b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Location.java @@ -426,63 +426,63 @@ public class Location extends DomainResource { /** * Unique code or number identifying the location to its users. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) protected List identifier; /** * Name of the location as used by humans. Does not need to be unique. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) protected StringType name; /** * Description of the Location, which helps in finding or referencing the place. */ - @Child(name="description", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Description of the Location, which helps in finding or referencing the place", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) protected StringType description; /** * Indicates the type of function performed at the location. */ - @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Indicates the type of function performed at the location", formalDefinition="Indicates the type of function performed at the location." ) protected CodeableConcept type; /** * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) protected List telecom; /** * Physical location. */ - @Child(name="address", type={Address.class}, order=5, min=0, max=1) + @Child(name = "address", type = {Address.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) protected Address address; /** * Physical form of the location, e.g. building, room, vehicle, road. */ - @Child(name="physicalType", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name = "physicalType", type = {CodeableConcept.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) protected CodeableConcept physicalType; /** * The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML). */ - @Child(name="position", type={}, order=7, min=0, max=1) + @Child(name = "position", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML)." ) protected LocationPositionComponent position; /** * The organization that is responsible for the provisioning and upkeep of the location. */ - @Child(name="managingOrganization", type={Organization.class}, order=8, min=0, max=1) + @Child(name = "managingOrganization", type = {Organization.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="The organization that is responsible for the provisioning and upkeep of the location", formalDefinition="The organization that is responsible for the provisioning and upkeep of the location." ) protected Reference managingOrganization; @@ -494,14 +494,14 @@ public class Location extends DomainResource { /** * active | suspended | inactive. */ - @Child(name="status", type={CodeType.class}, order=9, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="active | suspended | inactive", formalDefinition="active | suspended | inactive." ) protected Enumeration status; /** * Another Location which this Location is physically part of. */ - @Child(name="partOf", type={Location.class}, order=10, min=0, max=1) + @Child(name = "partOf", type = {Location.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Another Location which this Location is physically part of", formalDefinition="Another Location which this Location is physically part of." ) protected Reference partOf; @@ -513,7 +513,7 @@ public class Location extends DomainResource { /** * Indicates whether a resource instance represents a specific location or a class of locations. */ - @Child(name="mode", type={CodeType.class}, order=11, min=0, max=1) + @Child(name = "mode", type = {CodeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) protected Enumeration mode; @@ -1048,24 +1048,24 @@ public class Location extends DomainResource { return ResourceType.Location; } - @SearchParamDefinition(name="identifier", path="Location.identifier", description="Unique code or number identifying the location to its users", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "Location.identifier", description = "Unique code or number identifying the location to its users", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" ) public static final String SP_PARTOF = "partof"; - @SearchParamDefinition(name="near-distance", path="", description="A distance quantity to limit the near search to locations within a specific distance", type="token" ) - public static final String SP_NEARDISTANCE = "near-distance"; + @SearchParamDefinition(name = "near-distance", path = "", description = "A distance quantity to limit the near search to locations within a specific distance", type = "token") + public static final String SP_NEARDISTANCE = "near-distance"; @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name = "organization", path = "Location.managingOrganization", description = "Searches for locations that are managed by the provided organization", type = "reference") + public static final String SP_ORGANIZATION = "organization"; @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="near", path="", description="The coordinates expressed as [lat],[long] (using KML, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" ) - public static final String SP_NEAR = "near"; + @SearchParamDefinition(name = "near", path = "", description = "The coordinates expressed as [lat],[long] (using KML, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type = "token") + public static final String SP_NEAR = "near"; @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "Location.status", description = "Searches for locations with a specific kind of status", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java index ba92d15be09..8833e76b1c8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Media.java @@ -134,35 +134,35 @@ public class Media extends DomainResource { /** * Whether the media is a photo (still image), an audio recording, or a video recording. */ - @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="photo | video | audio", formalDefinition="Whether the media is a photo (still image), an audio recording, or a video recording." ) protected Enumeration type; /** * Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality. */ - @Child(name="subtype", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "subtype", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="The type of acquisition equipment/process", formalDefinition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." ) protected CodeableConcept subtype; /** * Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers. */ - @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier(s) for the image", formalDefinition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." ) protected List identifier; /** * The date/time when the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the start of the recording. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="When the media was taken/recorded (start)", formalDefinition="The date/time when the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the start of the recording." ) protected DateTimeType created; /** * Who/What this Media is a record of. */ - @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order=4, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Who/What this Media is a record of", formalDefinition="Who/What this Media is a record of." ) protected Reference subject; @@ -174,7 +174,7 @@ public class Media extends DomainResource { /** * The person who administered the collection of the image. */ - @Child(name="operator", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "operator", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The person who generated the image", formalDefinition="The person who administered the collection of the image." ) protected Reference operator; @@ -186,49 +186,49 @@ public class Media extends DomainResource { /** * The name of the imaging view e.g Lateral or Antero-posterior (AP). */ - @Child(name="view", type={CodeableConcept.class}, order=6, min=0, max=1) + @Child(name = "view", type = {CodeableConcept.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Imaging view e.g Lateral or Antero-posterior", formalDefinition="The name of the imaging view e.g Lateral or Antero-posterior (AP)." ) protected CodeableConcept view; /** * The name of the device / manufacturer of the device that was used to make the recording. */ - @Child(name="deviceName", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "deviceName", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Name of the device/manufacturer", formalDefinition="The name of the device / manufacturer of the device that was used to make the recording." ) protected StringType deviceName; /** * Height of the image in pixels(photo/video). */ - @Child(name="height", type={IntegerType.class}, order=8, min=0, max=1) + @Child(name = "height", type = {IntegerType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Height of the image in pixels(photo/video)", formalDefinition="Height of the image in pixels(photo/video)." ) protected IntegerType height; /** * Width of the image in pixels (photo/video). */ - @Child(name="width", type={IntegerType.class}, order=9, min=0, max=1) + @Child(name = "width", type = {IntegerType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) protected IntegerType width; /** * The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. */ - @Child(name="frames", type={IntegerType.class}, order=10, min=0, max=1) + @Child(name = "frames", type = {IntegerType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." ) protected IntegerType frames; /** * The duration of the recording in seconds - for audio and video. */ - @Child(name="duration", type={IntegerType.class}, order=11, min=0, max=1) + @Child(name = "duration", type = {IntegerType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) protected IntegerType duration; /** * The actual content of the media - inline or by direct reference to the media source file. */ - @Child(name="content", type={Attachment.class}, order=12, min=1, max=1) + @Child(name = "content", type = {Attachment.class}, order = 12, min = 1, max = 1) @Description(shortDefinition="Actual Media - reference or data", formalDefinition="The actual content of the media - inline or by direct reference to the media source file." ) protected Attachment content; @@ -836,17 +836,17 @@ public class Media extends DomainResource { return ResourceType.Media; } - @SearchParamDefinition(name="identifier", path="Media.identifier", description="Identifier(s) for the image", type="token" ) + @SearchParamDefinition(name = "identifier", path = "Media.identifier", description = "Identifier(s) for the image", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="view", path="Media.view", description="Imaging view e.g Lateral or Antero-posterior", type="token" ) + @SearchParamDefinition(name = "view", path = "Media.view", description = "Imaging view e.g Lateral or Antero-posterior", type = "token") public static final String SP_VIEW = "view"; - @SearchParamDefinition(name="subtype", path="Media.subtype", description="The type of acquisition equipment/process", type="token" ) + @SearchParamDefinition(name = "subtype", path = "Media.subtype", description = "The type of acquisition equipment/process", type = "token") public static final String SP_SUBTYPE = "subtype"; @SearchParamDefinition(name="created", path="Media.created", description="When the media was taken/recorded (start)", type="date" ) public static final String SP_CREATED = "created"; @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) + @SearchParamDefinition(name = "patient", path = "Media.subject", description = "Who/What this Media is a record of", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="type", path="Media.type", description="photo | video | audio", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java index dc95b018adf..6f132b6f284 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Medication.java @@ -846,28 +846,28 @@ public class Medication extends DomainResource { /** * The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code. */ - @Child(name="name", type={StringType.class}, order=0, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Common / Commercial name", formalDefinition="The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code." ) protected StringType name; /** * A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes. */ - @Child(name="code", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Codes that identify this medication", formalDefinition="A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes." ) protected CodeableConcept code; /** * Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is). */ - @Child(name="isBrand", type={BooleanType.class}, order=2, min=0, max=1) + @Child(name = "isBrand", type = {BooleanType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="True if a brand", formalDefinition="Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)." ) protected BooleanType isBrand; /** * Describes the details of the manufacturer. */ - @Child(name="manufacturer", type={Organization.class}, order=3, min=0, max=1) + @Child(name = "manufacturer", type = {Organization.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Manufacturer of the item", formalDefinition="Describes the details of the manufacturer." ) protected Reference manufacturer; @@ -879,21 +879,21 @@ public class Medication extends DomainResource { /** * Medications are either a single administrable product or a package that contains one or more products. */ - @Child(name="kind", type={CodeType.class}, order=4, min=0, max=1) + @Child(name = "kind", type = {CodeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="product | package", formalDefinition="Medications are either a single administrable product or a package that contains one or more products." ) protected Enumeration kind; /** * Information that only applies to products (not packages). */ - @Child(name="product", type={}, order=5, min=0, max=1) + @Child(name = "product", type = {}, order = 5, min = 0, max = 1) @Description(shortDefinition="Administrable medication details", formalDefinition="Information that only applies to products (not packages)." ) protected MedicationProductComponent product; /** * Information that only applies to packages (not products). */ - @Child(name="package_", type={}, order=6, min=0, max=1) + @Child(name = "package_", type = {}, order = 6, min = 0, max = 1) @Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." ) protected MedicationPackageComponent package_; @@ -1229,15 +1229,15 @@ public class Medication extends DomainResource { public static final String SP_CONTAINER = "container"; @SearchParamDefinition(name="code", path="Medication.code", description="Codes that identify this medication", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="The product contained", type="reference" ) + @SearchParamDefinition(name = "ingredient", path = "Medication.product.ingredient.item", description = "The product contained", type = "reference") public static final String SP_INGREDIENT = "ingredient"; - @SearchParamDefinition(name="form", path="Medication.product.form", description="powder | tablets | carton +", type="token" ) + @SearchParamDefinition(name = "form", path = "Medication.product.form", description = "powder | tablets | carton +", type = "token") public static final String SP_FORM = "form"; - @SearchParamDefinition(name="name", path="Medication.name", description="Common / Commercial name", type="string" ) + @SearchParamDefinition(name = "name", path = "Medication.name", description = "Common / Commercial name", type = "string") public static final String SP_NAME = "name"; - @SearchParamDefinition(name="content", path="Medication.package.content.item", description="A product in the package", type="reference" ) + @SearchParamDefinition(name = "content", path = "Medication.package.content.item", description = "A product in the package", type = "reference") public static final String SP_CONTENT = "content"; - @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="Manufacturer of the item", type="reference" ) + @SearchParamDefinition(name = "manufacturer", path = "Medication.manufacturer", description = "Manufacturer of the item", type = "reference") public static final String SP_MANUFACTURER = "manufacturer"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java index e60db46811e..96ab51bcf7d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationAdministration.java @@ -40,7 +40,9 @@ import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; /** - * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. + +Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. */ @ResourceDef(name="MedicationAdministration", profile="http://hl7.org/fhir/Profile/MedicationAdministration") public class MedicationAdministration extends DomainResource { @@ -183,7 +185,9 @@ public class MedicationAdministration extends DomainResource { protected CodeableConcept route; /** - * A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration. + * A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration. */ @Child(name="method", type={CodeableConcept.class}, order=4, min=0, max=1) @Description(shortDefinition="How drug was administered", formalDefinition="A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV.\r\rTerminologies used often pre-coordinate this term with the route and or form of administration." ) @@ -307,7 +311,9 @@ public class MedicationAdministration extends DomainResource { } /** - * @return {@link #method} (A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @return {@link #method} (A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public CodeableConcept getMethod() { if (this.method == null) @@ -323,7 +329,9 @@ public class MedicationAdministration extends DomainResource { } /** - * @param value {@link #method} (A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @param value {@link #method} (A coded value indicating the method by which the medication was introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public MedicationAdministrationDosageComponent setMethod(CodeableConcept value) { this.method = value; @@ -433,21 +441,21 @@ public class MedicationAdministration extends DomainResource { /** * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External identifier", formalDefinition="External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) protected List identifier; /** * Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way. */ - @Child(name="status", type={CodeType.class}, order=1, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way." ) protected Enumeration status; /** * The person or animal to whom the medication was given. */ - @Child(name="patient", type={Patient.class}, order=2, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Who received medication?", formalDefinition="The person or animal to whom the medication was given." ) protected Reference patient; @@ -459,7 +467,7 @@ public class MedicationAdministration extends DomainResource { /** * The individual who was responsible for giving the medication to the patient. */ - @Child(name="practitioner", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name = "practitioner", type = {Practitioner.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who administered substance?", formalDefinition="The individual who was responsible for giving the medication to the patient." ) protected Reference practitioner; @@ -471,7 +479,7 @@ public class MedicationAdministration extends DomainResource { /** * The visit or admission the or other contact between patient and health care provider the medication administration was performed as part of. */ - @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission the or other contact between patient and health care provider the medication administration was performed as part of." ) protected Reference encounter; @@ -483,7 +491,7 @@ public class MedicationAdministration extends DomainResource { /** * The original request, instruction or authority to perform the administration. */ - @Child(name="prescription", type={MedicationPrescription.class}, order=5, min=0, max=1) + @Child(name = "prescription", type = {MedicationPrescription.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Order administration performed against", formalDefinition="The original request, instruction or authority to perform the administration." ) protected Reference prescription; @@ -495,35 +503,35 @@ public class MedicationAdministration extends DomainResource { /** * Set this to true if the record is saying that the medication was NOT administered. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=6, min=0, max=1) + @Child(name = "wasNotGiven", type = {BooleanType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="True if medication not administered", formalDefinition="Set this to true if the record is saying that the medication was NOT administered." ) protected BooleanType wasNotGiven; /** * A code indicating why the administration was not performed. */ - @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reason administration not performed", formalDefinition="A code indicating why the administration was not performed." ) protected List reasonNotGiven; /** * A code indicating why the medication was given. */ - @Child(name="reasonGiven", type={CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reasonGiven", type = {CodeableConcept.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reason administration performed", formalDefinition="A code indicating why the medication was given." ) protected List reasonGiven; /** * An interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate. */ - @Child(name="effectiveTime", type={DateTimeType.class, Period.class}, order=9, min=1, max=1) + @Child(name = "effectiveTime", type = {DateTimeType.class, Period.class}, order = 9, min = 1, max = 1) @Description(shortDefinition="Start and end time of administration", formalDefinition="An interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." ) protected Type effectiveTime; /** * Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=10, min=0, max=1) + @Child(name = "medication", type = {Medication.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="What was administered?", formalDefinition="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -535,7 +543,7 @@ public class MedicationAdministration extends DomainResource { /** * The device used in administering the medication to the patient. E.g. a particular infusion pump. */ - @Child(name="device", type={Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "device", type = {Device.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Device used to administer", formalDefinition="The device used in administering the medication to the patient. E.g. a particular infusion pump." ) protected List device; /** @@ -547,14 +555,14 @@ public class MedicationAdministration extends DomainResource { /** * Extra information about the medication administration that is not conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "note", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Information about the administration", formalDefinition="Extra information about the medication administration that is not conveyed by the other attributes." ) protected StringType note; /** * Indicates how the medication is/was used by the patient. */ - @Child(name="dosage", type={}, order=13, min=0, max=1) + @Child(name = "dosage", type = {}, order = 13, min = 0, max = 1) @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) protected MedicationAdministrationDosageComponent dosage; @@ -1232,24 +1240,24 @@ public class MedicationAdministration extends DomainResource { return ResourceType.MedicationAdministration; } - @SearchParamDefinition(name="identifier", path="MedicationAdministration.identifier", description="Return administrations with this external identity", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="prescription", path="MedicationAdministration.prescription", description="The identity of a prescription to list administrations from", type="reference" ) - public static final String SP_PRESCRIPTION = "prescription"; + @SearchParamDefinition(name = "identifier", path = "MedicationAdministration.identifier", description = "Return administrations with this external identity", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "prescription", path = "MedicationAdministration.prescription", description = "The identity of a prescription to list administrations from", type = "reference") + public static final String SP_PRESCRIPTION = "prescription"; @SearchParamDefinition(name="effectivetime", path="MedicationAdministration.effectiveTime[x]", description="Date administration happened (or did not happen)", type="date" ) public static final String SP_EFFECTIVETIME = "effectivetime"; @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="medication", path="MedicationAdministration.medication", description="Return administrations of this medication", type="reference" ) - public static final String SP_MEDICATION = "medication"; - @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference" ) - public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name = "medication", path = "MedicationAdministration.medication", description = "Return administrations of this medication", type = "reference") + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name = "encounter", path = "MedicationAdministration.encounter", description = "Return administrations that share this encounter", type = "reference") + public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity", type="reference" ) public static final String SP_DEVICE = "device"; @SearchParamDefinition(name="notgiven", path="MedicationAdministration.wasNotGiven", description="Administrations that were not made", type="token" ) public static final String SP_NOTGIVEN = "notgiven"; - @SearchParamDefinition(name="status", path="MedicationAdministration.status", description="MedicationAdministration event status (for example one of active/paused/completed/nullified)", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "MedicationAdministration.status", description = "MedicationAdministration event status (for example one of active/paused/completed/nullified)", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java index 5da54ba7322..0f03f066292 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationDispense.java @@ -197,7 +197,9 @@ public class MedicationDispense extends DomainResource { protected CodeableConcept route; /** - * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration. + * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration. */ @Child(name="method", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="Technique for administering medication", formalDefinition="A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV.\r\rTerminologies used often pre-coordinate this term with the route and or form of administration." ) @@ -386,7 +388,9 @@ public class MedicationDispense extends DomainResource { } /** - * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public CodeableConcept getMethod() { if (this.method == null) @@ -402,7 +406,9 @@ public class MedicationDispense extends DomainResource { } /** - * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public MedicationDispenseDosageInstructionComponent setMethod(CodeableConcept value) { this.method = value; @@ -754,21 +760,21 @@ public class MedicationDispense extends DomainResource { /** * Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="External identifier", formalDefinition="Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR." ) protected Identifier identifier; /** * A code specifying the state of the set of dispense events. */ - @Child(name="status", type={CodeType.class}, order=1, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="A code specifying the state of the set of dispense events." ) protected Enumeration status; /** * A link to a resource representing the person to whom the medication will be given. */ - @Child(name="patient", type={Patient.class}, order=2, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Who the dispense is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) protected Reference patient; @@ -780,7 +786,7 @@ public class MedicationDispense extends DomainResource { /** * The individual responsible for dispensing the medication. */ - @Child(name="dispenser", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name = "dispenser", type = {Practitioner.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Practitioner responsible for dispensing medication", formalDefinition="The individual responsible for dispensing the medication." ) protected Reference dispenser; @@ -792,7 +798,7 @@ public class MedicationDispense extends DomainResource { /** * Indicates the medication order that is being dispensed against. */ - @Child(name="authorizingPrescription", type={MedicationPrescription.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "authorizingPrescription", type = {MedicationPrescription.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Medication order that authorizes the dispense", formalDefinition="Indicates the medication order that is being dispensed against." ) protected List authorizingPrescription; /** @@ -804,28 +810,28 @@ public class MedicationDispense extends DomainResource { /** * Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. */ - @Child(name="type", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Trial fill, partial fill, emergency fill, etc.", formalDefinition="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ) protected CodeableConcept type; /** * The amount of medication that has been dispensed. Includes unit of measure. */ - @Child(name="quantity", type={Quantity.class}, order=6, min=0, max=1) + @Child(name = "quantity", type = {Quantity.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of medication that has been dispensed. Includes unit of measure." ) protected Quantity quantity; /** * The amount of medication expressed as a timing amount. */ - @Child(name="daysSupply", type={Quantity.class}, order=7, min=0, max=1) + @Child(name = "daysSupply", type = {Quantity.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Days Supply", formalDefinition="The amount of medication expressed as a timing amount." ) protected Quantity daysSupply; /** * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=8, min=0, max=1) + @Child(name = "medication", type = {Medication.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="What medication was supplied", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -837,21 +843,21 @@ public class MedicationDispense extends DomainResource { /** * The time when the dispensed product was packaged and reviewed. */ - @Child(name="whenPrepared", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "whenPrepared", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Dispense processing time", formalDefinition="The time when the dispensed product was packaged and reviewed." ) protected DateTimeType whenPrepared; /** * The time the dispensed product was provided to the patient or their representative. */ - @Child(name="whenHandedOver", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name = "whenHandedOver", type = {DateTimeType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Handover time", formalDefinition="The time the dispensed product was provided to the patient or their representative." ) protected DateTimeType whenHandedOver; /** * Identification of the facility/location where the medication was shipped to, as part of the dispense event. */ - @Child(name="destination", type={Location.class}, order=11, min=0, max=1) + @Child(name = "destination", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Where the medication was sent", formalDefinition="Identification of the facility/location where the medication was shipped to, as part of the dispense event." ) protected Reference destination; @@ -863,7 +869,7 @@ public class MedicationDispense extends DomainResource { /** * Identifies the person who picked up the medication. This will usually be a patient or their carer, but some cases exist where it can be a healthcare professional. */ - @Child(name="receiver", type={Patient.class, Practitioner.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "receiver", type = {Patient.class, Practitioner.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who collected the medication", formalDefinition="Identifies the person who picked up the medication. This will usually be a patient or their carer, but some cases exist where it can be a healthcare professional." ) protected List receiver; /** @@ -875,21 +881,21 @@ public class MedicationDispense extends DomainResource { /** * Extra information about the dispense that could not be conveyed in the other attributes. */ - @Child(name="note", type={StringType.class}, order=13, min=0, max=1) + @Child(name = "note", type = {StringType.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Information about the dispense", formalDefinition="Extra information about the dispense that could not be conveyed in the other attributes." ) protected StringType note; /** * Indicates how the medication is to be used by the patient. */ - @Child(name="dosageInstruction", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dosageInstruction", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Medicine administration instructions to the patient/carer", formalDefinition="Indicates how the medication is to be used by the patient." ) protected List dosageInstruction; /** * Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen. This block explains what substitition did or did not happen and why. */ - @Child(name="substitution", type={}, order=15, min=0, max=1) + @Child(name = "substitution", type = {}, order = 15, min = 0, max = 1) @Description(shortDefinition="Deals with substitution of one medicine for another", formalDefinition="Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen. This block explains what substitition did or did not happen and why." ) protected MedicationDispenseSubstitutionComponent substitution; @@ -1611,28 +1617,28 @@ public class MedicationDispense extends DomainResource { return ResourceType.MedicationDispense; } - @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific indiividual", type="reference" ) - public static final String SP_DISPENSER = "dispenser"; - @SearchParamDefinition(name="identifier", path="MedicationDispense.identifier", description="Return dispenses with this external identity", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "dispenser", path = "MedicationDispense.dispenser", description = "Return all dispenses performed by a specific indiividual", type = "reference") + public static final String SP_DISPENSER = "dispenser"; + @SearchParamDefinition(name = "identifier", path = "MedicationDispense.identifier", description = "Return dispenses with this external identity", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="prescription", path="MedicationDispense.authorizingPrescription", description="The identity of a prescription to list dispenses from", type="reference" ) public static final String SP_PRESCRIPTION = "prescription"; - @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="destination", path="MedicationDispense.destination", description="Return dispenses that should be sent to a secific destination", type="reference" ) - public static final String SP_DESTINATION = "destination"; - @SearchParamDefinition(name="medication", path="MedicationDispense.medication", description="Returns dispenses of this medicine", type="reference" ) - public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name = "patient", path = "MedicationDispense.patient", description = "The identity of a patient to list dispenses for", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "destination", path = "MedicationDispense.destination", description = "Return dispenses that should be sent to a secific destination", type = "reference") + public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name = "medication", path = "MedicationDispense.medication", description = "Returns dispenses of this medicine", type = "reference") + public static final String SP_MEDICATION = "medication"; @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference" ) public static final String SP_RESPONSIBLEPARTY = "responsibleparty"; @SearchParamDefinition(name="type", path="MedicationDispense.type", description="Return all dispenses of a specific type", type="token" ) public static final String SP_TYPE = "type"; @SearchParamDefinition(name="whenhandedover", path="MedicationDispense.whenHandedOver", description="Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)", type="date" ) public static final String SP_WHENHANDEDOVER = "whenhandedover"; - @SearchParamDefinition(name="whenprepared", path="MedicationDispense.whenPrepared", description="Date when medication prepared", type="date" ) - public static final String SP_WHENPREPARED = "whenprepared"; - @SearchParamDefinition(name="status", path="MedicationDispense.status", description="Status of the dispense", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "whenprepared", path = "MedicationDispense.whenPrepared", description = "Date when medication prepared", type = "date") + public static final String SP_WHENPREPARED = "whenprepared"; + @SearchParamDefinition(name = "status", path = "MedicationDispense.status", description = "Status of the dispense", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java index 9267677f5be..91942e7980c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationPrescription.java @@ -232,7 +232,9 @@ public class MedicationPrescription extends DomainResource { protected CodeableConcept route; /** - * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration. + * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration. */ @Child(name="method", type={CodeableConcept.class}, order=7, min=0, max=1) @Description(shortDefinition="Technique for administering medication", formalDefinition="A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV.\r\rTerminologies used often pre-coordinate this term with the route and or form of administration." ) @@ -470,7 +472,9 @@ public class MedicationPrescription extends DomainResource { } /** - * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public CodeableConcept getMethod() { if (this.method == null) @@ -486,7 +490,9 @@ public class MedicationPrescription extends DomainResource { } /** - * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public MedicationPrescriptionDosageInstructionComponent setMethod(CodeableConcept value) { this.method = value; @@ -656,14 +662,17 @@ public class MedicationPrescription extends DomainResource { protected Medication medicationTarget; /** - * Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription. + * Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) +It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. +Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription. */ @Child(name="validityPeriod", type={Period.class}, order=2, min=0, max=1) @Description(shortDefinition="Time period supply is authorized for", formalDefinition="Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) \rIt reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. \rRationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription." ) protected Period validityPeriod; /** - * An integer indicating the number of repeats of the Dispense. UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. + * An integer indicating the number of repeats of the Dispense. +UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. */ @Child(name="numberOfRepeatsAllowed", type={IntegerType.class}, order=3, min=0, max=1) @Description(shortDefinition="# of refills authorized", formalDefinition="An integer indicating the number of repeats of the Dispense. \rUsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill." ) @@ -677,7 +686,8 @@ public class MedicationPrescription extends DomainResource { protected Quantity quantity; /** - * Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors. + * Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. +In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors. */ @Child(name="expectedSupplyDuration", type={Duration.class}, order=5, min=0, max=1) @Description(shortDefinition="Days supply per dispense", formalDefinition="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. \rIn some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors." ) @@ -734,7 +744,9 @@ public class MedicationPrescription extends DomainResource { } /** - * @return {@link #validityPeriod} (Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.) + * @return {@link #validityPeriod} (Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) +It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. +Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.) */ public Period getValidityPeriod() { if (this.validityPeriod == null) @@ -750,7 +762,9 @@ public class MedicationPrescription extends DomainResource { } /** - * @param value {@link #validityPeriod} (Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.) + * @param value {@link #validityPeriod} (Design Comments: This indicates the validity period of a prescription (stale dating the Prescription) +It reflects the prescriber perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations. +Rationale: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.) */ public MedicationPrescriptionDispenseComponent setValidityPeriod(Period value) { this.validityPeriod = value; @@ -758,7 +772,8 @@ public class MedicationPrescription extends DomainResource { } /** - * @return {@link #numberOfRepeatsAllowed} (An integer indicating the number of repeats of the Dispense. UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value + * @return {@link #numberOfRepeatsAllowed} (An integer indicating the number of repeats of the Dispense. +UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value */ public IntegerType getNumberOfRepeatsAllowedElement() { if (this.numberOfRepeatsAllowed == null) @@ -778,7 +793,8 @@ public class MedicationPrescription extends DomainResource { } /** - * @param value {@link #numberOfRepeatsAllowed} (An integer indicating the number of repeats of the Dispense. UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value + * @param value {@link #numberOfRepeatsAllowed} (An integer indicating the number of repeats of the Dispense. +UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value */ public MedicationPrescriptionDispenseComponent setNumberOfRepeatsAllowedElement(IntegerType value) { this.numberOfRepeatsAllowed = value; @@ -786,14 +802,16 @@ public class MedicationPrescription extends DomainResource { } /** - * @return An integer indicating the number of repeats of the Dispense. UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. + * @return An integer indicating the number of repeats of the Dispense. +UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. */ public int getNumberOfRepeatsAllowed() { return this.numberOfRepeatsAllowed == null ? 0 : this.numberOfRepeatsAllowed.getValue(); } /** - * @param value An integer indicating the number of repeats of the Dispense. UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. + * @param value An integer indicating the number of repeats of the Dispense. +UsageNotes: For example, the number of times the prescribed quantity is to be supplied including the initial standard fill. */ public MedicationPrescriptionDispenseComponent setNumberOfRepeatsAllowed(int value) { if (this.numberOfRepeatsAllowed == null) @@ -827,7 +845,8 @@ public class MedicationPrescription extends DomainResource { } /** - * @return {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.) + * @return {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. +In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.) */ public Duration getExpectedSupplyDuration() { if (this.expectedSupplyDuration == null) @@ -843,7 +862,8 @@ public class MedicationPrescription extends DomainResource { } /** - * @param value {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.) + * @param value {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. +In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage) When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.) */ public MedicationPrescriptionDispenseComponent setExpectedSupplyDuration(Duration value) { this.expectedSupplyDuration = value; @@ -1019,28 +1039,28 @@ public class MedicationPrescription extends DomainResource { /** * External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an erntire workflow process where records have to be tracked through an entire system. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External identifier", formalDefinition="External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an erntire workflow process where records have to be tracked through an entire system." ) protected List identifier; /** * The date (and perhaps time) when the prescription was written. */ - @Child(name="dateWritten", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "dateWritten", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) protected DateTimeType dateWritten; /** * A code specifying the state of the order. Generally this will be active or completed state. */ - @Child(name="status", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="active | on-hold | completed | entered-in-error | stopped | superceded | draft", formalDefinition="A code specifying the state of the order. Generally this will be active or completed state." ) protected Enumeration status; /** * A link to a resource representing the person to whom the medication will be given. */ - @Child(name="patient", type={Patient.class}, order=3, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) protected Reference patient; @@ -1052,7 +1072,7 @@ public class MedicationPrescription extends DomainResource { /** * The healthcare professional responsible for authorizing the prescription. */ - @Child(name="prescriber", type={Practitioner.class}, order=4, min=0, max=1) + @Child(name = "prescriber", type = {Practitioner.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Who ordered the medication(s)", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) protected Reference prescriber; @@ -1064,7 +1084,7 @@ public class MedicationPrescription extends DomainResource { /** * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. */ - @Child(name="encounter", type={Encounter.class}, order=5, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) protected Reference encounter; @@ -1076,21 +1096,21 @@ public class MedicationPrescription extends DomainResource { /** * Can be the reason or the indication for writing the prescription. */ - @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=6, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) protected Type reason; /** * Extra information about the prescription that could not be conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "note", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Information about the prescription", formalDefinition="Extra information about the prescription that could not be conveyed by the other attributes." ) protected StringType note; /** * Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=8, min=0, max=1) + @Child(name = "medication", type = {Medication.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Medication to be taken", formalDefinition="Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -1102,21 +1122,21 @@ public class MedicationPrescription extends DomainResource { /** * Indicates how the medication is to be used by the patient. */ - @Child(name="dosageInstruction", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dosageInstruction", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="How medication should be taken", formalDefinition="Indicates how the medication is to be used by the patient." ) protected List dosageInstruction; /** * Deals with details of the dispense part of the order. */ - @Child(name="dispense", type={}, order=10, min=0, max=1) + @Child(name = "dispense", type = {}, order = 10, min = 0, max = 1) @Description(shortDefinition="Medication supply authorization", formalDefinition="Deals with details of the dispense part of the order." ) protected MedicationPrescriptionDispenseComponent dispense; /** * Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done. */ - @Child(name="substitution", type={}, order=11, min=0, max=1) + @Child(name = "substitution", type = {}, order = 11, min = 0, max = 1) @Description(shortDefinition="Any restrictions on medication substitution?", formalDefinition="Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done." ) protected MedicationPrescriptionSubstitutionComponent substitution; @@ -1679,18 +1699,18 @@ public class MedicationPrescription extends DomainResource { return ResourceType.MedicationPrescription; } - @SearchParamDefinition(name="identifier", path="MedicationPrescription.identifier", description="Return prescriptions with this external identity", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "MedicationPrescription.identifier", description = "Return prescriptions with this external identity", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="patient", path="MedicationPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="datewritten", path="MedicationPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) - public static final String SP_DATEWRITTEN = "datewritten"; - @SearchParamDefinition(name="medication", path="MedicationPrescription.medication", description="Code for medicine or text in medicine name", type="reference" ) - public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name = "datewritten", path = "MedicationPrescription.dateWritten", description = "Return prescriptions written on this date", type = "date") + public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name = "medication", path = "MedicationPrescription.medication", description = "Code for medicine or text in medicine name", type = "reference") + public static final String SP_MEDICATION = "medication"; @SearchParamDefinition(name="encounter", path="MedicationPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="status", path="MedicationPrescription.status", description="Status of the prescription", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "MedicationPrescription.status", description = "Status of the prescription", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java index d5537565ddd..e7e57dacbad 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MedicationStatement.java @@ -169,7 +169,9 @@ public class MedicationStatement extends DomainResource { protected CodeableConcept route; /** - * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration. + * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration. */ @Child(name="method", type={CodeableConcept.class}, order=6, min=0, max=1) @Description(shortDefinition="Technique used to administer medication", formalDefinition="A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV.\r\rTerminologies used often pre-coordinate this term with the route and or form of administration." ) @@ -361,7 +363,9 @@ public class MedicationStatement extends DomainResource { } /** - * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public CodeableConcept getMethod() { if (this.method == null) @@ -377,7 +381,9 @@ public class MedicationStatement extends DomainResource { } /** - * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration.) + * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. + +Terminologies used often pre-coordinate this term with the route and or form of administration.) */ public MedicationStatementDosageComponent setMethod(CodeableConcept value) { this.method = value; @@ -519,14 +525,14 @@ public class MedicationStatement extends DomainResource { /** * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Identifier", formalDefinition="External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) protected List identifier; /** * The person or animal who is /was taking the medication. */ - @Child(name="patient", type={Patient.class}, order=1, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Who was/is taking medication", formalDefinition="The person or animal who is /was taking the medication." ) protected Reference patient; @@ -538,7 +544,7 @@ public class MedicationStatement extends DomainResource { /** * The person who provided the information about the taking of this medication. */ - @Child(name="informationSource", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1) + @Child(name = "informationSource", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="", formalDefinition="The person who provided the information about the taking of this medication." ) protected Reference informationSource; @@ -550,56 +556,56 @@ public class MedicationStatement extends DomainResource { /** * The date when the medication statement was asserted by the information source. */ - @Child(name="dateAsserted", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "dateAsserted", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="When the statement was asserted?", formalDefinition="The date when the medication statement was asserted by the information source." ) protected DateTimeType dateAsserted; /** * A code specifying the state of the statement. Generally this will be in-progress or completed state. */ - @Child(name="status", type={CodeType.class}, order=4, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="in-progress | completed | entered-in-error", formalDefinition="A code specifying the state of the statement. Generally this will be in-progress or completed state." ) protected Enumeration status; /** * Set this to true if the record is saying that the medication was NOT taken. */ - @Child(name="wasNotGiven", type={BooleanType.class}, order=5, min=0, max=1) + @Child(name = "wasNotGiven", type = {BooleanType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="True if medication is/was not being taken", formalDefinition="Set this to true if the record is saying that the medication was NOT taken." ) protected BooleanType wasNotGiven; /** * A code indicating why the medication was not taken. */ - @Child(name="reasonNotGiven", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="True if asserting medication was not given", formalDefinition="A code indicating why the medication was not taken." ) protected List reasonNotGiven; /** * A reason for why the medication is being/was taken. */ - @Child(name="reasonForUse", type={CodeableConcept.class, Condition.class}, order=7, min=0, max=1) + @Child(name = "reasonForUse", type = {CodeableConcept.class, Condition.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="", formalDefinition="A reason for why the medication is being/was taken." ) protected Type reasonForUse; /** * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the 'wasNotGiven' attribute is true). */ - @Child(name="effective", type={DateTimeType.class, Period.class}, order=8, min=0, max=1) + @Child(name = "effective", type = {DateTimeType.class, Period.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Over what period was medication consumed?", formalDefinition="The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the 'wasNotGiven' attribute is true)." ) protected Type effective; /** * Provides extra information about the medication statement that is not conveyed by the other attributes. */ - @Child(name="note", type={StringType.class}, order=9, min=0, max=1) + @Child(name = "note", type = {StringType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Further information about the statement", formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." ) protected StringType note; /** * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. */ - @Child(name="medication", type={Medication.class}, order=10, min=0, max=1) + @Child(name = "medication", type = {Medication.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="What medication was taken?", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) protected Reference medication; @@ -611,7 +617,7 @@ public class MedicationStatement extends DomainResource { /** * Indicates how the medication is/was used by the patient. */ - @Child(name="dosage", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dosage", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) protected List dosage; @@ -1196,14 +1202,14 @@ public class MedicationStatement extends DomainResource { @SearchParamDefinition(name="identifier", path="MedicationStatement.identifier", description="Return administrations with this external identity", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list administrations for", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="medication", path="MedicationStatement.medication", description="Code for medicine or text in medicine name", type="reference" ) - public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name = "patient", path = "MedicationStatement.patient", description = "The identity of a patient to list administrations for", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "medication", path = "MedicationStatement.medication", description = "Code for medicine or text in medicine name", type = "reference") + public static final String SP_MEDICATION = "medication"; @SearchParamDefinition(name="effectivedate", path="MedicationStatement.effective[x]", description="Date when patient was taking (or not taking) the medication", type="date" ) public static final String SP_EFFECTIVEDATE = "effectivedate"; - @SearchParamDefinition(name="status", path="MedicationStatement.status", description="Return statements that match the given status", type="string" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "MedicationStatement.status", description = "Return statements that match the given status", type = "string") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java index c86c0514a9f..808d79de2df 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/MessageHeader.java @@ -887,49 +887,49 @@ public class MessageHeader extends DomainResource { /** * The identifier of this message. */ - @Child(name="identifier", type={IdType.class}, order=0, min=1, max=1) + @Child(name = "identifier", type = {IdType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Id of this message", formalDefinition="The identifier of this message." ) protected IdType identifier; /** * The time that the message was sent. */ - @Child(name="timestamp", type={InstantType.class}, order=1, min=1, max=1) + @Child(name = "timestamp", type = {InstantType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Time that the message was sent", formalDefinition="The time that the message was sent." ) protected InstantType timestamp; /** * Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-type". */ - @Child(name="event", type={Coding.class}, order=2, min=1, max=1) + @Child(name = "event", type = {Coding.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Code for the event this message represents", formalDefinition="Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-type'." ) protected Coding event; /** * Information about the message that this message is a response to. Only present if this message is a response. */ - @Child(name="response", type={}, order=3, min=0, max=1) + @Child(name = "response", type = {}, order = 3, min = 0, max = 1) @Description(shortDefinition="If this is a reply to prior message", formalDefinition="Information about the message that this message is a response to. Only present if this message is a response." ) protected MessageHeaderResponseComponent response; /** * The source application from which this message originated. */ - @Child(name="source", type={}, order=4, min=1, max=1) + @Child(name = "source", type = {}, order = 4, min = 1, max = 1) @Description(shortDefinition="Message Source Application", formalDefinition="The source application from which this message originated." ) protected MessageSourceComponent source; /** * The destination application which the message is intended for. */ - @Child(name="destination", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "destination", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Message Destination Application(s)", formalDefinition="The destination application which the message is intended for." ) protected List destination; /** * The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions. */ - @Child(name="enterer", type={Practitioner.class}, order=6, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="The source of the data entry", formalDefinition="The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." ) protected Reference enterer; @@ -941,7 +941,7 @@ public class MessageHeader extends DomainResource { /** * The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions. */ - @Child(name="author", type={Practitioner.class}, order=7, min=0, max=1) + @Child(name = "author", type = {Practitioner.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The source of the decision", formalDefinition="The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." ) protected Reference author; @@ -953,7 +953,7 @@ public class MessageHeader extends DomainResource { /** * Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient. */ - @Child(name="receiver", type={Practitioner.class, Organization.class}, order=8, min=0, max=1) + @Child(name = "receiver", type = {Practitioner.class, Organization.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Intended 'real-world' recipient for the data", formalDefinition="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." ) protected Reference receiver; @@ -965,7 +965,7 @@ public class MessageHeader extends DomainResource { /** * The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party. */ - @Child(name="responsible", type={Practitioner.class, Organization.class}, order=9, min=0, max=1) + @Child(name = "responsible", type = {Practitioner.class, Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Final responsibility for event", formalDefinition="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." ) protected Reference responsible; @@ -977,14 +977,14 @@ public class MessageHeader extends DomainResource { /** * Coded indication of the cause for the event - indicates a reason for the occurance of the event that is a focus of this message. */ - @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Cause of event", formalDefinition="Coded indication of the cause for the event - indicates a reason for the occurance of the event that is a focus of this message." ) protected CodeableConcept reason; /** * The actual data of the message - a reference to the root/focus class of the event. */ - @Child(name="data", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "data", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The actual content of the message", formalDefinition="The actual data of the message - a reference to the root/focus class of the event." ) protected List data; /** @@ -1516,24 +1516,24 @@ public class MessageHeader extends DomainResource { public static final String SP_DESTINATIONURI = "destination-uri"; @SearchParamDefinition(name="code", path="MessageHeader.response.code", description="ok | transient-error | fatal-error", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="data", path="MessageHeader.data", description="The actual content of the message", type="reference" ) - public static final String SP_DATA = "data"; - @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended 'real-world' recipient for the data", type="reference" ) - public static final String SP_RECEIVER = "receiver"; + @SearchParamDefinition(name = "data", path = "MessageHeader.data", description = "The actual content of the message", type = "reference") + public static final String SP_DATA = "data"; + @SearchParamDefinition(name = "receiver", path = "MessageHeader.receiver", description = "Intended 'real-world' recipient for the data", type = "reference") + public static final String SP_RECEIVER = "receiver"; @SearchParamDefinition(name="src-id", path="MessageHeader.identifier", description="Id of this message", type="token" ) public static final String SP_SRCID = "src-id"; - @SearchParamDefinition(name="source-uri", path="MessageHeader.source.endpoint", description="Actual message source address or id", type="token" ) - public static final String SP_SOURCEURI = "source-uri"; + @SearchParamDefinition(name = "source-uri", path = "MessageHeader.source.endpoint", description = "Actual message source address or id", type = "token") + public static final String SP_SOURCEURI = "source-uri"; @SearchParamDefinition(name="destination", path="MessageHeader.destination.name", description="Name of system", type="string" ) public static final String SP_DESTINATION = "destination"; - @SearchParamDefinition(name="response-id", path="MessageHeader.response.identifier", description="Id of original message", type="token" ) - public static final String SP_RESPONSEID = "response-id"; - @SearchParamDefinition(name="source", path="MessageHeader.source.name", description="Name of system", type="string" ) - public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="event", path="MessageHeader.event", description="Code for the event this message represents", type="token" ) - public static final String SP_EVENT = "event"; - @SearchParamDefinition(name="timestamp", path="MessageHeader.timestamp", description="Time that the message was sent", type="date" ) - public static final String SP_TIMESTAMP = "timestamp"; + @SearchParamDefinition(name = "response-id", path = "MessageHeader.response.identifier", description = "Id of original message", type = "token") + public static final String SP_RESPONSEID = "response-id"; + @SearchParamDefinition(name = "source", path = "MessageHeader.source.name", description = "Name of system", type = "string") + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name = "event", path = "MessageHeader.event", description = "Code for the event this message represents", type = "token") + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name = "timestamp", path = "MessageHeader.timestamp", description = "Time that the message was sent", type = "date") + public static final String SP_TIMESTAMP = "timestamp"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java index 567c7ba834b..d36ad4726ab 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java @@ -47,42 +47,42 @@ public class Meta extends Type implements IMetaType { /** * The version specific identifier, as it appears in the version portion of the url. This values changes when the resource is created, updated, or deleted. */ - @Child(name="versionId", type={IdType.class}, order=0, min=0, max=1) + @Child(name = "versionId", type = {IdType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Version specific identifier", formalDefinition="The version specific identifier, as it appears in the version portion of the url. This values changes when the resource is created, updated, or deleted." ) protected IdType versionId; /** * When the resource last changed - e.g. when the version changed. */ - @Child(name="lastUpdated", type={InstantType.class}, order=1, min=0, max=1) + @Child(name = "lastUpdated", type = {InstantType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When the resource version last changed", formalDefinition="When the resource last changed - e.g. when the version changed." ) protected InstantType lastUpdated; /** * Set to 'true' if the resource is deleted. Deleted resources can not be fetched via the RESTful API, but may appear in bundles for various reasons. */ - @Child(name="deleted", type={BooleanType.class}, order=2, min=0, max=1) + @Child(name = "deleted", type = {BooleanType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="True if the resource is deleted", formalDefinition="Set to 'true' if the resource is deleted. Deleted resources can not be fetched via the RESTful API, but may appear in bundles for various reasons." ) protected BooleanType deleted; /** * A list of profiles that this resource claims to conform to. The URL is a reference to Profile.url. */ - @Child(name="profile", type={UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "profile", type = {UriType.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Profiles this resource claims to conform to", formalDefinition="A list of profiles that this resource claims to conform to. The URL is a reference to Profile.url." ) protected List profile; /** * Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */ - @Child(name="security", type={Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "security", type = {Coding.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Security Labels applied to this resource", formalDefinition="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." ) protected List security; /** * Tags applied to this resource. Tags are intended to to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource. */ - @Child(name="tag", type={Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "tag", type = {Coding.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Tags applied", formalDefinition="Tags applied to this resource. Tags are intended to to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource." ) protected List tag; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java index 283e110ca5e..32b1bba5aa0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NamingSystem.java @@ -689,77 +689,77 @@ public class NamingSystem extends DomainResource { /** * Indicates the purpose for the namingsystem - what kinds of things does it make unique?. */ - @Child(name="type", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the namingsystem - what kinds of things does it make unique?." ) protected Enumeration type; /** * The descriptive name of this particular identifier type or code system. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name = "name", type = {StringType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Human-readable label", formalDefinition="The descriptive name of this particular identifier type or code system." ) protected StringType name; /** * Indicates whether the namingsystem is "ready for use" or not. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="proposed | active | retired", formalDefinition="Indicates whether the namingsystem is 'ready for use' or not." ) protected Enumeration status; /** * If present, indicates that the identifier or code system is principally intended for use or applies to entities within the specified country. For example, the country associated with a national code system. */ - @Child(name="country", type={CodeType.class}, order=3, min=0, max=1) + @Child(name = "country", type = {CodeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="ISO 3-char country code", formalDefinition="If present, indicates that the identifier or code system is principally intended for use or applies to entities within the specified country. For example, the country associated with a national code system." ) protected CodeType country; /** * Categorizes a namingsystem for easier search by grouping related namingsystems. */ - @Child(name="category", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "category", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="driver | provider | patient | bank", formalDefinition="Categorizes a namingsystem for easier search by grouping related namingsystems." ) protected CodeableConcept category; /** * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. */ - @Child(name="responsible", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "responsible", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." ) protected StringType responsible; /** * Details about what the namespace identifies including scope, granularity, version labeling, etc. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="What does namingsystem identify?", formalDefinition="Details about what the namespace identifies including scope, granularity, version labeling, etc." ) protected StringType description; /** * Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. */ - @Child(name="usage", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "usage", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="How/where is it used", formalDefinition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." ) protected StringType usage; /** * Indicates how the system may be identified when referenced in electronic exchange. */ - @Child(name="uniqueId", type={}, order=8, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "uniqueId", type = {}, order = 8, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Unique identifiers used for system", formalDefinition="Indicates how the system may be identified when referenced in electronic exchange." ) protected List uniqueId; /** * The person who can be contacted about this system registration entry. */ - @Child(name="contact", type={}, order=9, min=0, max=1) + @Child(name = "contact", type = {}, order = 9, min = 0, max = 1) @Description(shortDefinition="Who should be contacted for questions about namingsystem", formalDefinition="The person who can be contacted about this system registration entry." ) protected NamingSystemContactComponent contact; /** * For namingsystems that are retired, indicates the namingsystem that should be used in their place (if any). */ - @Child(name="replacedBy", type={NamingSystem.class}, order=10, min=0, max=1) + @Child(name = "replacedBy", type = {NamingSystem.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Use this instead", formalDefinition="For namingsystems that are retired, indicates the namingsystem that should be used in their place (if any)." ) protected Reference replacedBy; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java index 405c47b7f11..3babedb4c29 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Narrative.java @@ -151,7 +151,7 @@ public class Narrative extends Element implements INarrative { /** * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data. */ - @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="generated | extensions | additional", formalDefinition="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." ) protected Enumeration status; @@ -285,26 +285,27 @@ public class Narrative extends Element implements INarrative { ; } - /** - * Sets the value of - * @param theString - * @throws Exception - */ - public void setDivAsString(String theString) throws Exception { - if (StringUtils.isNotBlank(theString)) { - div = new XhtmlParser().parseFragment(theString); - } else { - div = null; - } - } + /** + * Sets the value of + * + * @param theString + * @throws Exception + */ + public void setDivAsString(String theString) throws Exception { + if (StringUtils.isNotBlank(theString)) { + div = new XhtmlParser().parseFragment(theString); + } else { + div = null; + } + } - public String getDivAsString() throws Exception { - if (div != null && !div.isEmpty()) { - return new XhtmlComposer().compose(div); - } else { - return null; - } - } + public String getDivAsString() throws Exception { + if (div != null && !div.isEmpty()) { + return new XhtmlComposer().compose(div); + } else { + return null; + } + } } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java index 912fc4855de..4b915ebbc8d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/NutritionOrder.java @@ -49,29 +49,29 @@ public class NutritionOrder extends DomainResource { /** * The request has been proposed. */ - PROPOSED, - /** - * The request has been planned. - */ - PLANNED, - /** - * The request has been placed. - */ - REQUESTED, - /** - * The request is 'actionable', but not all actions that are implied by it have occurred yet. - */ - ACTIVE, - /** - * ???. - */ - INACTIVE, - /** - * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". - */ - HELD, - /** - * ???. + PROPOSED, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The request is 'actionable', but not all actions that are implied by it have occurred yet. + */ + ACTIVE, + /** + * ???. + */ + INACTIVE, + /** + * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + HELD, + /** + * ???. */ CANCELLED, /** @@ -80,11 +80,11 @@ public class NutritionOrder extends DomainResource { NULL; public static NutritionOrderStatus fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) - return null; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("planned".equals(codeString)) - return PLANNED; + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; if ("requested".equals(codeString)) return REQUESTED; if ("active".equals(codeString)) @@ -99,8 +99,10 @@ public class NutritionOrder extends DomainResource { } public String toCode() { switch (this) { - case PROPOSED: return "proposed"; - case PLANNED: return "planned"; + case PROPOSED: + return "proposed"; + case PLANNED: + return "planned"; case REQUESTED: return "requested"; case ACTIVE: return "active"; case INACTIVE: return "inactive"; @@ -111,8 +113,10 @@ public class NutritionOrder extends DomainResource { } public String getSystem() { switch (this) { - case PROPOSED: return ""; - case PLANNED: return ""; + case PROPOSED: + return ""; + case PLANNED: + return ""; case REQUESTED: return ""; case ACTIVE: return ""; case INACTIVE: return ""; @@ -123,25 +127,39 @@ public class NutritionOrder extends DomainResource { } public String getDefinition() { switch (this) { - case PROPOSED: return "The request has been proposed."; - case PLANNED: return "The request has been planned."; - case REQUESTED: return "The request has been placed."; - case ACTIVE: return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; - case INACTIVE: return "???."; - case HELD: return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; - case CANCELLED: return "???."; + case PROPOSED: + return "The request has been proposed."; + case PLANNED: + return "The request has been planned."; + case REQUESTED: + return "The request has been placed."; + case ACTIVE: + return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; + case INACTIVE: + return "???."; + case HELD: + return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; + case CANCELLED: + return "???."; default: return "?"; } } public String getDisplay() { switch (this) { - case PROPOSED: return "proposed"; - case PLANNED: return "planned"; - case REQUESTED: return "requested"; - case ACTIVE: return "active"; - case INACTIVE: return "inactive"; - case HELD: return "held"; - case CANCELLED: return "cancelled"; + case PROPOSED: + return "proposed"; + case PLANNED: + return "planned"; + case REQUESTED: + return "requested"; + case ACTIVE: + return "active"; + case INACTIVE: + return "inactive"; + case HELD: + return "held"; + case CANCELLED: + return "cancelled"; default: return "?"; } } @@ -151,11 +169,11 @@ public class NutritionOrder extends DomainResource { public NutritionOrderStatus fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) - return null; - if ("proposed".equals(codeString)) - return NutritionOrderStatus.PROPOSED; - if ("planned".equals(codeString)) - return NutritionOrderStatus.PLANNED; + return null; + if ("proposed".equals(codeString)) + return NutritionOrderStatus.PROPOSED; + if ("planned".equals(codeString)) + return NutritionOrderStatus.PLANNED; if ("requested".equals(codeString)) return NutritionOrderStatus.REQUESTED; if ("active".equals(codeString)) @@ -1454,7 +1472,7 @@ public class NutritionOrder extends DomainResource { /** * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. */ - @Child(name="patient", type={Patient.class}, order=0, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="The person who requires the diet, formula or nutritional supplement", formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) protected Reference patient; @@ -1466,7 +1484,7 @@ public class NutritionOrder extends DomainResource { /** * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. */ - @Child(name="orderer", type={Practitioner.class}, order=1, min=0, max=1) + @Child(name = "orderer", type = {Practitioner.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) protected Reference orderer; @@ -1478,14 +1496,14 @@ public class NutritionOrder extends DomainResource { /** * Identifiers assigned to this order by the order sender or by the order receiver. */ - @Child(name="identifier", type={Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) protected List identifier; /** * An encounter that provides additional information about the healthcare context in which this request is made. */ - @Child(name="encounter", type={Encounter.class}, order=3, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The encounter associated with that this nutrition order", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) protected Reference encounter; @@ -1497,14 +1515,14 @@ public class NutritionOrder extends DomainResource { /** * The date and time that this nutrition order was requested. */ - @Child(name="dateTime", type={DateTimeType.class}, order=4, min=1, max=1) + @Child(name = "dateTime", type = {DateTimeType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="Date and time the nutrition order was requested", formalDefinition="The date and time that this nutrition order was requested." ) protected DateTimeType dateTime; /** * The ability to list substances that may cause allergies or intolerances which should be included in the nutrition order. */ - @Child(name="allergyIntolerance", type={AllergyIntolerance.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "allergyIntolerance", type = {AllergyIntolerance.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of the patient's food and nutrition-related allergies and intolerances", formalDefinition="The ability to list substances that may cause allergies or intolerances which should be included in the nutrition order." ) protected List allergyIntolerance; /** @@ -1516,43 +1534,43 @@ public class NutritionOrder extends DomainResource { /** * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. */ - @Child(name="foodPreferenceModifier", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "foodPreferenceModifier", type = {CodeableConcept.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Order-specific modifier about the type of food that should be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) protected List foodPreferenceModifier; /** * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. */ - @Child(name="excludeFoodModifier", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "excludeFoodModifier", type = {CodeableConcept.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Order-specific modifier about the type of food that should not be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) protected List excludeFoodModifier; /** * Class that defines the components of an oral diet order for the patient. */ - @Child(name="oralDiet", type={}, order=8, min=0, max=1) + @Child(name = "oralDiet", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Oral diet components", formalDefinition="Class that defines the components of an oral diet order for the patient." ) protected NutritionOrderOralDietComponent oralDiet; /** * Class that defines the components of a supplement order for the patient. */ - @Child(name="supplement", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "supplement", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Supplement components", formalDefinition="Class that defines the components of a supplement order for the patient." ) protected List supplement; /** * Class that defines the components of an enteral formula order for the patient. */ - @Child(name="enteralFormula", type={}, order=10, min=0, max=1) + @Child(name = "enteralFormula", type = {}, order = 10, min = 0, max = 1) @Description(shortDefinition="Enteral formula components", formalDefinition="Class that defines the components of an enteral formula order for the patient." ) protected NutritionOrderEnteralFormulaComponent enteralFormula; /** * The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended. */ - @Child(name="status", type={CodeType.class}, order=11, min=0, max=1) - @Description(shortDefinition="proposed | planned | requested | active | inactive | held | cancelled", formalDefinition="The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended." ) + @Child(name = "status", type = {CodeType.class}, order = 11, min = 0, max = 1) + @Description(shortDefinition = "proposed | planned | requested | active | inactive | held | cancelled", formalDefinition = "The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended.") protected Enumeration status; private static final long serialVersionUID = -966362649L; @@ -2107,25 +2125,25 @@ public class NutritionOrder extends DomainResource { @Override public ResourceType getResourceType() { return ResourceType.NutritionOrder; - } + } - @SearchParamDefinition(name="identifier", path="NutritionOrder.identifier", description="Return nutrition orders with this external identity", type="token" ) + @SearchParamDefinition(name = "identifier", path = "NutritionOrder.identifier", description = "Return nutrition orders with this external identity", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) + @SearchParamDefinition(name = "datetime", path = "NutritionOrder.dateTime", description = "Return nutrition orders requested on this date", type = "date") public static final String SP_DATETIME = "datetime"; - @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference" ) + @SearchParamDefinition(name = "provider", path = "NutritionOrder.orderer", description = "The identify of the provider who placed the nutrition order", type = "reference") public static final String SP_PROVIDER = "provider"; @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token" ) public static final String SP_SUPPLEMENT = "supplement"; - @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType", description="Type of enteral or infant formula", type="token" ) + @SearchParamDefinition(name = "formula", path = "NutritionOrder.enteralFormula.baseFormulaType", description = "Type of enteral or infant formula", type = "token") public static final String SP_FORMULA = "formula"; @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identity", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) + @SearchParamDefinition(name = "oraldiet", path = "NutritionOrder.oralDiet.type", description = "Type of diet that can be consumed orally (i.e., take via the mouth).", type = "token") public static final String SP_ORALDIET = "oraldiet"; - @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) + @SearchParamDefinition(name = "status", path = "NutritionOrder.status", description = "Status of the nutrition order.", type = "token") public static final String SP_STATUS = "status"; @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token" ) public static final String SP_ADDITIVE = "additive"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java index 7a0e31d1093..ba278b94420 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Observation.java @@ -619,14 +619,14 @@ public class Observation extends DomainResource { * The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'. */ @Child(name="low", type={Quantity.class}, order=1, min=0, max=1) - @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'." ) + @Description(shortDefinition = "Low Range, if relevant", formalDefinition = "The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.") protected Quantity low; /** * The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'. */ @Child(name="high", type={Quantity.class}, order=2, min=0, max=1) - @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'." ) + @Description(shortDefinition = "High Range, if relevant", formalDefinition = "The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.") protected Quantity high; /** @@ -803,8 +803,8 @@ public class Observation extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("low", "Quantity", "The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.", 0, java.lang.Integer.MAX_VALUE, low)); - childrenList.add(new Property("high", "Quantity", "The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.", 0, java.lang.Integer.MAX_VALUE, high)); + childrenList.add(new Property("low", "Quantity", "The value of the low bound of the reference range. If this element is omitted, the low bound of the reference range is assumed to be meaningless. (e.g. reference range is <2.3) If the low.comparator element is missing, it is assumed to be '>'.", 0, java.lang.Integer.MAX_VALUE, low)); + childrenList.add(new Property("high", "Quantity", "The value of the high bound of the reference range. If this element is omitted, the high bound of the reference range is assumed to be meaningless. (e.g. reference range is > 5) If the low.comparator element is missing , it is assumed to be '<'.", 0, java.lang.Integer.MAX_VALUE, high)); childrenList.add(new Property("meaning", "CodeableConcept", "Code for the meaning of the reference range.", 0, java.lang.Integer.MAX_VALUE, meaning)); childrenList.add(new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, java.lang.Integer.MAX_VALUE, age)); childrenList.add(new Property("text", "string", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", 0, java.lang.Integer.MAX_VALUE, text)); @@ -1019,97 +1019,97 @@ public class Observation extends DomainResource { /** * Describes what was observed. Sometimes this is called the observation "code". */ - @Child(name="code", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Type of observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation 'code'." ) protected CodeableConcept code; /** * The information determined as a result of making the observation, if the information has a simple value. */ - @Child(name="value", type={Quantity.class, CodeableConcept.class, Attachment.class, Ratio.class, DateTimeType.class, Period.class, SampledData.class, StringType.class, TimeType.class}, order=1, min=0, max=1) + @Child(name = "value", type = {Quantity.class, CodeableConcept.class, Attachment.class, Ratio.class, DateTimeType.class, Period.class, SampledData.class, StringType.class, TimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) protected Type value; /** * Provides a reason why the expected value in the element Observation.value[x] is missing. */ - @Child(name="dataAbsentReason", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "dataAbsentReason", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="unknown | asked | temp | notasked +", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." ) protected Enumeration dataAbsentReason; /** * The assessment made based on the result of the observation. */ - @Child(name="interpretation", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "interpretation", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="High, low, normal, etc.", formalDefinition="The assessment made based on the result of the observation." ) protected CodeableConcept interpretation; /** * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. */ - @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "comments", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Comments about result", formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result." ) protected StringType comments; /** * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself. */ - @Child(name="applies", type={DateTimeType.class, Period.class}, order=5, min=0, max=1) + @Child(name = "applies", type = {DateTimeType.class, Period.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Physiologically Relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." ) protected Type applies; /** * The date and time this observation was made available. */ - @Child(name="issued", type={InstantType.class}, order=6, min=0, max=1) + @Child(name = "issued", type = {InstantType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Date/Time this was made available", formalDefinition="The date and time this observation was made available." ) protected InstantType issued; /** * The status of the result value. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the result value." ) protected Enumeration status; /** * An estimate of the degree to which quality issues have impacted on the value reported. */ - @Child(name="reliability", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "reliability", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="ok | ongoing | early | questionable | calibrating | error +", formalDefinition="An estimate of the degree to which quality issues have impacted on the value reported." ) protected Enumeration reliability; /** * Indicates the site on the subject's body where the observation was made ( i.e. the target site). */ - @Child(name="bodySite", type={CodeableConcept.class, BodySite.class}, order=9, min=0, max=1) + @Child(name = "bodySite", type = {CodeableConcept.class, BodySite.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Observed body part", formalDefinition="Indicates the site on the subject's body where the observation was made ( i.e. the target site)." ) protected Type bodySite; /** * Indicates the mechanism used to perform the observation. */ - @Child(name="method", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name = "method", type = {CodeableConcept.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="How it was done", formalDefinition="Indicates the mechanism used to perform the observation." ) protected CodeableConcept method; /** * A unique identifier for the simple observation. */ - @Child(name="identifier", type={Identifier.class}, order=11, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Unique Id for this particular observation", formalDefinition="A unique identifier for the simple observation." ) protected Identifier identifier; /** - * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Location.class}, order=12, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus,\nother observer (for example a relative or EMT), or any observation made about the subject." ) protected Reference subject; /** - * The actual object that is the target of the reference (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * The actual object that is the target of the reference (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject.) */ protected Resource subjectTarget; @@ -1117,7 +1117,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The specimen that was used when this observation was made. */ - @Child(name="specimen", type={Specimen.class}, order=13, min=0, max=1) + @Child(name = "specimen", type = {Specimen.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Specimen used for this observation", formalDefinition="The specimen that was used when this observation was made." ) protected Reference specimen; @@ -1129,7 +1129,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * Who was responsible for asserting the observed value as "true". */ - @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "performer", type = {Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Who did the observation", formalDefinition="Who was responsible for asserting the observed value as 'true'." ) protected List performer; /** @@ -1141,7 +1141,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The device used to generate the observation data. */ - @Child(name="device", type={Device.class, DeviceMetric.class}, order=15, min=0, max=1) + @Child(name = "device", type = {Device.class, DeviceMetric.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="(Measurement) Device", formalDefinition="The device used to generate the observation data." ) protected Reference device; @@ -1153,7 +1153,7 @@ other observer (for example a relative or EMT), or any observation made about th /** * The healthcare event ( e.g. a patient and healthcare provider interaction ) during which this observation is made. */ - @Child(name="encounter", type={Encounter.class}, order=16, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="Healthcare event during which this observation is made", formalDefinition="The healthcare event ( e.g. a patient and healthcare provider interaction ) during which this observation is made." ) protected Reference encounter; @@ -1165,14 +1165,14 @@ other observer (for example a relative or EMT), or any observation made about th /** * Guidance on how to interpret the value by comparison to a normal or recommended range. */ - @Child(name="referenceRange", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "referenceRange", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Provides guide for interpretation", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) protected List referenceRange; /** * Related observations - either components, or previous observations, or statements of derivation. */ - @Child(name="related", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "related", type = {}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Observations related to this observation", formalDefinition="Related observations - either components, or previous observations, or statements of derivation." ) protected List related; @@ -1184,31 +1184,31 @@ other observer (for example a relative or EMT), or any observation made about th public Observation(CodeableConcept code, Enumeration status) { super(); - this.code = code; + this.code = code; this.status = status; } /** * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) */ - public CodeableConcept getCode() { - if (this.code == null) + public CodeableConcept getCode() { + if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Observation.code"); + throw new Error("Attempt to auto-create Observation.code"); else if (Configuration.doAutoCreate()) - this.code = new CodeableConcept(); // cc - return this.code; + this.code = new CodeableConcept(); // cc + return this.code; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); } /** * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) */ - public Observation setCode(CodeableConcept value) { - this.code = value; + public Observation setCode(CodeableConcept value) { + this.code = value; return this; } @@ -1700,7 +1700,7 @@ other observer (for example a relative or EMT), or any observation made about th } /** - * @return {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * @return {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject.) */ public Reference getSubject() { @@ -1717,7 +1717,7 @@ other observer (for example a relative or EMT), or any observation made about th } /** - * @param value {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * @param value {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject.) */ public Observation setSubject(Reference value) { @@ -1726,7 +1726,7 @@ other observer (for example a relative or EMT), or any observation made about th } /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject.) */ public Resource getSubjectTarget() { @@ -1734,7 +1734,7 @@ other observer (for example a relative or EMT), or any observation made about th } /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, other observer (for example a relative or EMT), or any observation made about the subject.) */ public Observation setSubjectTarget(Resource value) { @@ -1970,7 +1970,7 @@ other observer (for example a relative or EMT), or any observation made about th protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation 'code'.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation 'code'.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("value[x]", "Quantity|CodeableConcept|Attachment|Ratio|dateTime|Period|SampledData|string|time", "The information determined as a result of making the observation, if the information has a simple value.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("dataAbsentReason", "code", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, java.lang.Integer.MAX_VALUE, dataAbsentReason)); childrenList.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation.", 0, java.lang.Integer.MAX_VALUE, interpretation)); @@ -1994,7 +1994,7 @@ other observer (for example a relative or EMT), or any observation made about th public Observation copy() { Observation dst = new Observation(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.code = code == null ? null : code.copy(); dst.value = value == null ? null : value.copy(); dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); dst.interpretation = interpretation == null ? null : interpretation.copy(); @@ -2039,7 +2039,7 @@ other observer (for example a relative or EMT), or any observation made about th if (!(other instanceof Observation)) return false; Observation o = (Observation) other; - return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) + return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) && compareDeep(interpretation, o.interpretation, true) && compareDeep(comments, o.comments, true) && compareDeep(applies, o.applies, true) && compareDeep(issued, o.issued, true) && compareDeep(status, o.status, true) && compareDeep(reliability, o.reliability, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(method, o.method, true) @@ -2062,7 +2062,7 @@ other observer (for example a relative or EMT), or any observation made about th } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) + return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (interpretation == null || interpretation.isEmpty()) && (comments == null || comments.isEmpty()) && (applies == null || applies.isEmpty()) && (issued == null || issued.isEmpty()) && (status == null || status.isEmpty()) && (reliability == null || reliability.isEmpty()) @@ -2077,32 +2077,32 @@ other observer (for example a relative or EMT), or any observation made about th return ResourceType.Observation; } - @SearchParamDefinition(name="date", path="Observation.applies[x]", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique Id for a particular observation", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="Observation.code", description="The code of the observation type", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="code-value-[x]", path="", description="Both code and one of the value parameters", type="composite" ) - public static final String SP_CODEVALUEX = "code-value-[x]"; - @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference" ) - public static final String SP_PERFORMER = "performer"; - @SearchParamDefinition(name="value-quantity", path="Observation.valueQuantity", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) - public static final String SP_VALUEQUANTITY = "value-quantity"; + @SearchParamDefinition(name = "date", path = "Observation.applies[x]", description = "Obtained date/time. If the obtained element is a period, a date that falls in the period", type = "date") + public static final String SP_DATE = "date"; + @SearchParamDefinition(name = "identifier", path = "Observation.identifier", description = "The unique Id for a particular observation", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "code", path = "Observation.code", description = "The code of the observation type", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "code-value-[x]", path = "", description = "Both code and one of the value parameters", type = "composite") + public static final String SP_CODEVALUEX = "code-value-[x]"; + @SearchParamDefinition(name = "performer", path = "Observation.performer", description = "Who performed the observation", type = "reference") + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name = "value-quantity", path = "Observation.valueQuantity", description = "The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type = "quantity") + public static final String SP_VALUEQUANTITY = "value-quantity"; @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference" ) public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="reliability", path="Observation.reliability", description="The reliability of the observation", type="token" ) public static final String SP_RELIABILITY = "reliability"; - @SearchParamDefinition(name="value-concept", path="Observation.valueCodeableConcept", description="The value of the observation, if the value is a CodeableConcept", type="token" ) - public static final String SP_VALUECONCEPT = "value-concept"; - @SearchParamDefinition(name="value-date", path="Observation.valueDateTime|Observation.valuePeriod", description="The value of the observation, if the value is a Period", type="date" ) - public static final String SP_VALUEDATE = "value-date"; - @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token" ) - public static final String SP_DATAABSENTREASON = "data-absent-reason"; + @SearchParamDefinition(name = "value-concept", path = "Observation.valueCodeableConcept", description = "The value of the observation, if the value is a CodeableConcept", type = "token") + public static final String SP_VALUECONCEPT = "value-concept"; + @SearchParamDefinition(name = "value-date", path = "Observation.valueDateTime|Observation.valuePeriod", description = "The value of the observation, if the value is a Period", type = "date") + public static final String SP_VALUEDATE = "value-date"; + @SearchParamDefinition(name = "data-absent-reason", path = "Observation.dataAbsentReason", description = "The reason why the expected value in the element Observation.value[x] is missing.", type = "token") + public static final String SP_DATAABSENTREASON = "data-absent-reason"; @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="related-type", path="Observation.related.type", description="has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", type="token" ) - public static final String SP_RELATEDTYPE = "related-type"; + @SearchParamDefinition(name = "related-type", path = "Observation.related.type", description = "has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", type = "token") + public static final String SP_RELATEDTYPE = "related-type"; @SearchParamDefinition(name="related-target", path="Observation.related.target", description="Observation that is related to this one", type="reference" ) public static final String SP_RELATEDTARGET = "related-target"; @SearchParamDefinition(name="related", path="", description="Related Observations - search on related-type and related-target together", type="composite" ) @@ -2111,12 +2111,12 @@ other observer (for example a relative or EMT), or any observation made about th public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="specimen", path="Observation.specimen", description="Specimen used for this observation", type="reference" ) public static final String SP_SPECIMEN = "specimen"; - @SearchParamDefinition(name="value-string", path="Observation.valueString", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) - public static final String SP_VALUESTRING = "value-string"; + @SearchParamDefinition(name = "value-string", path = "Observation.valueString", description = "The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type = "string") + public static final String SP_VALUESTRING = "value-string"; @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference" ) public static final String SP_DEVICE = "device"; - @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "Observation.status", description = "The status of the observation", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java index 277da15fcfd..b63e2df21de 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java @@ -1159,98 +1159,98 @@ public class OperationDefinition extends DomainResource { /** * The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={UriType.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {UriType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical id to reference this operation definition", formalDefinition="The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected UriType identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the operation definition", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="title", type={StringType.class}, order=2, min=1, max=1) + @Child(name = "title", type = {StringType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType title; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Natural language description of the operation", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "code", type = {Coding.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=7, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Date for this version of the operation definition", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * Whether this is operation or named query. */ - @Child(name="kind", type={CodeType.class}, order=10, min=1, max=1) + @Child(name = "kind", type = {CodeType.class}, order = 10, min = 1, max = 1) @Description(shortDefinition="operation | query", formalDefinition="Whether this is operation or named query." ) protected Enumeration kind; /** * The name used to invoke the operation. */ - @Child(name="name", type={CodeType.class}, order=11, min=1, max=1) + @Child(name = "name", type = {CodeType.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." ) protected CodeType name; /** * Additional information about how to use this operation or named query. */ - @Child(name="notes", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." ) protected StringType notes; /** * Indicates that this operation definition is a constraining profile on the base. */ - @Child(name="base", type={OperationDefinition.class}, order=13, min=0, max=1) + @Child(name = "base", type = {OperationDefinition.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." ) protected Reference base; @@ -1262,28 +1262,28 @@ public class OperationDefinition extends DomainResource { /** * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). */ - @Child(name="system", type={BooleanType.class}, order=14, min=1, max=1) + @Child(name = "system", type = {BooleanType.class}, order = 14, min = 1, max = 1) @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." ) protected BooleanType system; /** * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context). */ - @Child(name="type", type={CodeType.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "type", type = {CodeType.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Invoke at resource level for these type", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context)." ) protected List type; /** * Indicates whether this operation can be invoked on a particular instance of one of the given types. */ - @Child(name="instance", type={BooleanType.class}, order=16, min=1, max=1) + @Child(name = "instance", type = {BooleanType.class}, order = 16, min = 1, max = 1) @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." ) protected BooleanType instance; /** * The parameters for the operation/query. */ - @Child(name="parameter", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "parameter", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." ) protected List parameter; @@ -2213,30 +2213,30 @@ public class OperationDefinition extends DomainResource { @SearchParamDefinition(name="date", path="OperationDefinition.date", description="Date for this version of the operation definition", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="OperationDefinition.identifier", description="Logical id to reference this operation definition", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Assist with indexing and finding", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) - public static final String SP_INSTANCE = "instance"; + @SearchParamDefinition(name = "identifier", path = "OperationDefinition.identifier", description = "Logical id to reference this operation definition", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "code", path = "OperationDefinition.code", description = "Assist with indexing and finding", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "instance", path = "OperationDefinition.instance", description = "Invoke on an instance?", type = "token") + public static final String SP_INSTANCE = "instance"; @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" ) public static final String SP_KIND = "kind"; - @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) - public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name = "profile", path = "OperationDefinition.parameter.profile", description = "Profile on the type", type = "reference") + public static final String SP_PROFILE = "profile"; @SearchParamDefinition(name="title", path="OperationDefinition.title", description="Informal name for this profile", type="string" ) public static final String SP_TITLE = "title"; - @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) - public static final String SP_VERSION = "version"; + @SearchParamDefinition(name = "type", path = "OperationDefinition.type", description = "Invoke at resource level for these type", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "version", path = "OperationDefinition.version", description = "Logical id for this version of the operation definition", type = "token") + public static final String SP_VERSION = "version"; @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" ) public static final String SP_SYSTEM = "system"; @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Name used to invoke the operation", type="token" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "publisher", path = "OperationDefinition.publisher", description = "Name of the publisher (Organization or individual)", type = "string") + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name = "status", path = "OperationDefinition.status", description = "draft | active | retired", type = "token") + public static final String SP_STATUS = "status"; @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference" ) public static final String SP_BASE = "base"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java index 0b54026f201..060d12b160c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationOutcome.java @@ -412,7 +412,7 @@ public class OperationOutcome extends DomainResource { /** * An error, warning or information message that results from a system action. */ - @Child(name="issue", type={}, order=0, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "issue", type = {}, order = 0, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A single issue associated with the action", formalDefinition="An error, warning or information message that results from a system action." ) protected List issue; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java index 690c354d174..caec65bdc53 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java @@ -3438,35 +3438,35 @@ public class OralHealthClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -3478,7 +3478,7 @@ public class OralHealthClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -3490,7 +3490,7 @@ public class OralHealthClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -3502,28 +3502,28 @@ public class OralHealthClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) + @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -3535,7 +3535,7 @@ public class OralHealthClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=11, min=0, max=1) + @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -3547,14 +3547,14 @@ public class OralHealthClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=12, min=0, max=1) + @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -3566,21 +3566,21 @@ public class OralHealthClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -3592,70 +3592,70 @@ public class OralHealthClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=19, min=0, max=1) + @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) + @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) + @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. */ - @Child(name="missingteeth", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "missingteeth", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Missing Teeth", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) protected List missingteeth; /** * The high-level details of an Orthodontic Treatment Plan. */ - @Child(name="orthoPlan", type={}, order=24, min=0, max=1) + @Child(name = "orthoPlan", type = {}, order = 24, min = 0, max = 1) @Description(shortDefinition="Orthodontic Treatment Plan", formalDefinition="The high-level details of an Orthodontic Treatment Plan." ) protected OrthodonticPlanComponent orthoPlan; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 25, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=26, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additionalMaterials", type = {Coding.class}, order = 26, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -4767,10 +4767,10 @@ public class OralHealthClaim extends DomainResource { return ResourceType.OralHealthClaim; } - @SearchParamDefinition(name="identifier", path="OralHealthClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="use", path="OralHealthClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; + @SearchParamDefinition(name = "identifier", path = "OralHealthClaim.identifier", description = "The primary identifier of the financial resource", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "use", path = "OralHealthClaim.use", description = "The kind of financial resource", type = "token") + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="OralHealthClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="OralHealthClaim.priority", description="Processing priority requested", type="token" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java index 015513adb99..892b041b64e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Order.java @@ -158,21 +158,21 @@ public class Order extends DomainResource { /** * Identifiers assigned to this order by the orderer or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) protected List identifier; /** * When the order was made. */ - @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When the order was made", formalDefinition="When the order was made." ) protected DateTimeType date; /** * Patient this order is about. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=2, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Substance.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Patient this order is about", formalDefinition="Patient this order is about." ) protected Reference subject; @@ -184,7 +184,7 @@ public class Order extends DomainResource { /** * Who initiated the order. */ - @Child(name="source", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name = "source", type = {Practitioner.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who initiated the order", formalDefinition="Who initiated the order." ) protected Reference source; @@ -196,7 +196,7 @@ public class Order extends DomainResource { /** * Who is intended to fulfill the order. */ - @Child(name="target", type={Organization.class, Device.class, Practitioner.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class, Device.class, Practitioner.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Who is intended to fulfill the order", formalDefinition="Who is intended to fulfill the order." ) protected Reference target; @@ -208,14 +208,14 @@ public class Order extends DomainResource { /** * Text - why the order was made. */ - @Child(name="reason", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Text - why the order was made", formalDefinition="Text - why the order was made." ) protected Type reason; /** * If required by policy. */ - @Child(name="authority", type={}, order=6, min=0, max=1) + @Child(name = "authority", type = {}, order = 6, min = 0, max = 1) @Description(shortDefinition="If required by policy", formalDefinition="If required by policy." ) protected Reference authority; @@ -227,14 +227,14 @@ public class Order extends DomainResource { /** * When order should be fulfilled. */ - @Child(name="when", type={}, order=7, min=0, max=1) + @Child(name = "when", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="When order should be fulfilled", formalDefinition="When order should be fulfilled." ) protected OrderWhenComponent when; /** * What action is being ordered. */ - @Child(name="detail", type={}, order=8, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "detail", type = {}, order = 8, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="What action is being ordered", formalDefinition="What action is being ordered." ) protected List detail; /** @@ -664,17 +664,17 @@ public class Order extends DomainResource { return ResourceType.Order; } - @SearchParamDefinition(name="date", path="Order.date", description="When the order was made", type="date" ) + @SearchParamDefinition(name = "date", path = "Order.date", description = "When the order was made", type = "date") public static final String SP_DATE = "date"; - @SearchParamDefinition(name="subject", path="Order.subject", description="Patient this order is about", type="reference" ) + @SearchParamDefinition(name = "subject", path = "Order.subject", description = "Patient this order is about", type = "reference") public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="patient", path="Order.subject", description="Patient this order is about", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="authority", path="Order.authority", description="If required by policy", type="reference" ) + @SearchParamDefinition(name = "authority", path = "Order.authority", description = "If required by policy", type = "reference") public static final String SP_AUTHORITY = "authority"; @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference" ) public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="detail", path="Order.detail", description="What action is being ordered", type="reference" ) + @SearchParamDefinition(name = "detail", path = "Order.detail", description = "What action is being ordered", type = "reference") public static final String SP_DETAIL = "detail"; @SearchParamDefinition(name="when", path="Order.when.schedule", description="A formal schedule", type="date" ) public static final String SP_WHEN = "when"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java index 5a9450f84bd..2d6b0ac102a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OrderResponse.java @@ -218,14 +218,14 @@ public class OrderResponse extends DomainResource { /** * Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems." ) protected List identifier; /** * A reference to the order that this is in response to. */ - @Child(name="request", type={Order.class}, order=1, min=1, max=1) + @Child(name = "request", type = {Order.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="The order that this is a response to", formalDefinition="A reference to the order that this is in response to." ) protected Reference request; @@ -237,14 +237,14 @@ public class OrderResponse extends DomainResource { /** * The date and time at which this order response was made (created/posted). */ - @Child(name="date", type={DateTimeType.class}, order=2, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="When the response was made", formalDefinition="The date and time at which this order response was made (created/posted)." ) protected DateTimeType date; /** * The person, organization, or device credited with making the response. */ - @Child(name="who", type={Practitioner.class, Organization.class, Device.class}, order=3, min=0, max=1) + @Child(name = "who", type = {Practitioner.class, Organization.class, Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who made the response", formalDefinition="The person, organization, or device credited with making the response." ) protected Reference who; @@ -256,28 +256,28 @@ public class OrderResponse extends DomainResource { /** * A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection. */ - @Child(name="authority", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "authority", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="If required by policy", formalDefinition="A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection." ) protected Type authority; /** * What this response says about the status of the original order. */ - @Child(name="code", type={CodeType.class}, order=5, min=1, max=1) + @Child(name = "code", type = {CodeType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete", formalDefinition="What this response says about the status of the original order." ) protected Enumeration code; /** * Additional description about the response - e.g. a text description provided by a human user when making decisions about the order. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Additional description of the response", formalDefinition="Additional description about the response - e.g. a text description provided by a human user when making decisions about the order." ) protected StringType description; /** * Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order. */ - @Child(name="fulfillment", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "fulfillment", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Details of the outcome of performing the order", formalDefinition="Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order." ) protected List fulfillment; /** @@ -704,15 +704,15 @@ public class OrderResponse extends DomainResource { return ResourceType.OrderResponse; } - @SearchParamDefinition(name="date", path="OrderResponse.date", description="When the response was made", type="date" ) + @SearchParamDefinition(name = "date", path = "OrderResponse.date", description = "When the response was made", type = "date") public static final String SP_DATE = "date"; @SearchParamDefinition(name="request", path="OrderResponse.request", description="The order that this is a response to", type="reference" ) public static final String SP_REQUEST = "request"; @SearchParamDefinition(name="code", path="OrderResponse.code", description="pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="patient", path="", description="The patient the reuqest order is related to", type="reference" ) + @SearchParamDefinition(name = "patient", path = "", description = "The patient the reuqest order is related to", type = "reference") public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="Details of the outcome of performing the order", type="reference" ) + @SearchParamDefinition(name = "fulfillment", path = "OrderResponse.fulfillment", description = "Details of the outcome of performing the order", type = "reference") public static final String SP_FULFILLMENT = "fulfillment"; @SearchParamDefinition(name="who", path="OrderResponse.who", description="Who made the response", type="reference" ) public static final String SP_WHO = "who"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java index c4b7149d175..2d984d52225 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Organization.java @@ -395,42 +395,42 @@ public class Organization extends DomainResource { /** * Identifier for the organization that is used to identify the organization across multiple disparate systems. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifies this organization across multiple systems", formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems." ) protected List identifier; /** * A name associated with the organization. */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Name used for the organization", formalDefinition="A name associated with the organization." ) protected StringType name; /** * The kind of organization that this is. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Kind of organization", formalDefinition="The kind of organization that this is." ) protected CodeableConcept type; /** * A contact detail for the organization. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the organization", formalDefinition="A contact detail for the organization." ) protected List telecom; /** * An address for the organization. */ - @Child(name="address", type={Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "address", type = {Address.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="An address for the organization", formalDefinition="An address for the organization." ) protected List
    address; /** * The organization of which this organization forms a part. */ - @Child(name="partOf", type={Organization.class}, order=5, min=0, max=1) + @Child(name = "partOf", type = {Organization.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The organization of which this organization forms a part", formalDefinition="The organization of which this organization forms a part." ) protected Reference partOf; @@ -442,14 +442,14 @@ public class Organization extends DomainResource { /** * Contact for the organization for a certain purpose. */ - @Child(name="contact", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contact", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact for the organization for a certain purpose", formalDefinition="Contact for the organization for a certain purpose." ) protected List contact; /** * Location(s) the organization uses to provide services. */ - @Child(name="location", type={Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "location", type = {Location.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Location(s) the organization uses to provide services", formalDefinition="Location(s) the organization uses to provide services." ) protected List location; /** @@ -461,7 +461,7 @@ public class Organization extends DomainResource { /** * Whether the organization's record is still in active use. */ - @Child(name="active", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name = "active", type = {BooleanType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Whether the organization's record is still in active use", formalDefinition="Whether the organization's record is still in active use." ) protected BooleanType active; @@ -891,11 +891,11 @@ public class Organization extends DomainResource { return ResourceType.Organization; } - @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" ) + @SearchParamDefinition(name = "identifier", path = "Organization.identifier", description = "Any identifier for the organization (not the accreditation issuer's identifier)", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="partof", path="Organization.partOf", description="Search all organizations that are part of the given organization", type="reference" ) public static final String SP_PARTOF = "partof"; - @SearchParamDefinition(name="phonetic", path="", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" ) + @SearchParamDefinition(name = "phonetic", path = "", description = "A portion of the organization's name using some kind of phonetic matching algorithm", type = "string") public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="name", path="Organization.name", description="A portion of the organization's name", type="string" ) public static final String SP_NAME = "name"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java index 74be9e6f90c..89ac6663d41 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java @@ -47,21 +47,21 @@ public class Other extends DomainResource { /** * Identifier assigned to the resource for business purposes, outside the context of FHIR. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) protected List identifier; /** * Identifies the 'type' of resource - equivalent to the resource name for other resources. */ - @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1) + @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) protected CodeableConcept code; /** * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce. */ - @Child(name="subject", type={}, order=2, min=0, max=1) + @Child(name = "subject", type = {}, order = 2, min = 0, max = 1) @Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." ) protected Reference subject; @@ -73,7 +73,7 @@ public class Other extends DomainResource { /** * Indicates who was responsible for creating the resource instance. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) protected Reference author; @@ -85,7 +85,7 @@ public class Other extends DomainResource { /** * Identifies when the resource was first created. */ - @Child(name="created", type={DateType.class}, order=4, min=0, max=1) + @Child(name = "created", type = {DateType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) protected DateType created; @@ -343,12 +343,12 @@ public class Other extends DomainResource { @SearchParamDefinition(name="code", path="Other.code", description="Kind of Resource", type="token" ) public static final String SP_CODE = "code"; - @SearchParamDefinition(name="subject", path="Other.subject", description="Identifies the", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="created", path="Other.created", description="When created", type="date" ) - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name="patient", path="Other.subject", description="Identifies the", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "subject", path = "Other.subject", description = "Identifies the", type = "reference") + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "created", path = "Other.created", description = "When created", type = "date") + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name = "patient", path = "Other.subject", description = "Identifies the", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java index a155754de02..087e5ed7326 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Parameters.java @@ -385,7 +385,7 @@ public class Parameters extends Resource { /** * A parameter passed to or received from the operation. */ - @Child(name="parameter", type={}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "parameter", type = {}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Operation Parameter", formalDefinition="A parameter passed to or received from the operation." ) protected List parameter; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java index f47945b559f..3c9594264b0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Patient.java @@ -897,98 +897,98 @@ public class Patient extends DomainResource { /** * An identifier that applies to this person as a patient. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="An identifier for the person as this patient", formalDefinition="An identifier that applies to this person as a patient." ) protected List identifier; /** * A name associated with the individual. */ - @Child(name="name", type={HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "name", type = {HumanName.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A name associated with the patient", formalDefinition="A name associated with the individual." ) protected List name; /** * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted. */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the individual", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." ) protected List telecom; /** * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=3, min=0, max=1) + @Child(name = "gender", type = {CodeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." ) protected Enumeration gender; /** * The date and time of birth for the individual. */ - @Child(name="birthDate", type={DateType.class}, order=4, min=0, max=1) + @Child(name = "birthDate", type = {DateType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="The date and time of birth for the individual", formalDefinition="The date and time of birth for the individual." ) protected DateType birthDate; /** * Indicates if the individual is deceased or not. */ - @Child(name="deceased", type={BooleanType.class, DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "deceased", type = {BooleanType.class, DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Indicates if the individual is deceased or not", formalDefinition="Indicates if the individual is deceased or not." ) protected Type deceased; /** * Addresses for the individual. */ - @Child(name="address", type={Address.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "address", type = {Address.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Addresses for the individual", formalDefinition="Addresses for the individual." ) protected List
    address; /** * This field contains a patient's most recent marital (civil) status. */ - @Child(name="maritalStatus", type={CodeableConcept.class}, order=7, min=0, max=1) + @Child(name = "maritalStatus", type = {CodeableConcept.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Marital (civil) status of a person", formalDefinition="This field contains a patient's most recent marital (civil) status." ) protected CodeableConcept maritalStatus; /** * Indicates whether the patient is part of a multiple or indicates the actual birth order. */ - @Child(name="multipleBirth", type={BooleanType.class, IntegerType.class}, order=8, min=0, max=1) + @Child(name = "multipleBirth", type = {BooleanType.class, IntegerType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order." ) protected Type multipleBirth; /** * Image of the person. */ - @Child(name="photo", type={Attachment.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "photo", type = {Attachment.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) protected List photo; /** * A contact party (e.g. guardian, partner, friend) for the patient. */ - @Child(name="contact", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contact", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact party (e.g. guardian, partner, friend) for the patient", formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient." ) protected List contact; /** * This element has a value if the patient is an animal. */ - @Child(name="animal", type={}, order=11, min=0, max=1) + @Child(name = "animal", type = {}, order = 11, min = 0, max = 1) @Description(shortDefinition="If this patient is an animal (non-human)", formalDefinition="This element has a value if the patient is an animal." ) protected AnimalComponent animal; /** * Languages which may be used to communicate with the patient about his or her health. */ - @Child(name="communication", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "communication", type = {CodeableConcept.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Languages which may be used to communicate with the patient about his or her health", formalDefinition="Languages which may be used to communicate with the patient about his or her health." ) protected List communication; /** * Patient's nominated care provider. */ - @Child(name="careProvider", type={Organization.class, Practitioner.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "careProvider", type = {Organization.class, Practitioner.class}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Patient's nominated care provider", formalDefinition="Patient's nominated care provider." ) protected List careProvider; /** @@ -1000,7 +1000,7 @@ public class Patient extends DomainResource { /** * Organization that is the custodian of the patient record. */ - @Child(name="managingOrganization", type={Organization.class}, order=14, min=0, max=1) + @Child(name = "managingOrganization", type = {Organization.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Organization that is the custodian of the patient record", formalDefinition="Organization that is the custodian of the patient record." ) protected Reference managingOrganization; @@ -1012,14 +1012,14 @@ public class Patient extends DomainResource { /** * Link to another patient resource that concerns the same actual person. */ - @Child(name="link", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "link", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Link to another patient resource that concerns the same actual person", formalDefinition="Link to another patient resource that concerns the same actual person." ) protected List link; /** * Whether this patient record is in active use. */ - @Child(name="active", type={BooleanType.class}, order=16, min=0, max=1) + @Child(name = "active", type = {BooleanType.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="Whether this patient's record is in active use", formalDefinition="Whether this patient record is in active use." ) protected BooleanType active; @@ -1743,8 +1743,8 @@ public class Patient extends DomainResource { return ResourceType.Patient; } - @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "Patient.identifier", description = "A patient identifier", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="given", path="Patient.name.given", description="A portion of the given name of the patient", type="string" ) public static final String SP_GIVEN = "given"; @SearchParamDefinition(name="address", path="Patient.address", description="An address in any kind of address/part of the patient", type="string" ) @@ -1753,28 +1753,28 @@ public class Patient extends DomainResource { public static final String SP_BIRTHDATE = "birthdate"; @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient", type="token" ) public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients", type="token" ) - public static final String SP_ANIMALSPECIES = "animal-species"; - @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" ) - public static final String SP_LINK = "link"; - @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" ) - public static final String SP_ACTIVE = "active"; + @SearchParamDefinition(name = "animal-species", path = "Patient.animal.species", description = "The species for animal patients", type = "token") + public static final String SP_ANIMALSPECIES = "animal-species"; + @SearchParamDefinition(name = "link", path = "Patient.link.other", description = "All patients linked to the given patient", type = "reference") + public static final String SP_LINK = "link"; + @SearchParamDefinition(name = "active", path = "Patient.active", description = "Whether the patient record is active", type = "token") + public static final String SP_ACTIVE = "active"; @SearchParamDefinition(name="language", path="Patient.communication", description="Language code (irrespective of use value)", type="token" ) public static final String SP_LANGUAGE = "language"; - @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients", type="token" ) - public static final String SP_ANIMALBREED = "animal-breed"; - @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" ) - public static final String SP_CAREPROVIDER = "careprovider"; - @SearchParamDefinition(name="phonetic", path="", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) - public static final String SP_PHONETIC = "phonetic"; - @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization at which this person is a patient", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="name", path="Patient.name", description="A portion of either family or given name of the patient", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="telecom", path="Patient.telecom", description="The value in any kind of telecom details of the patient", type="string" ) - public static final String SP_TELECOM = "telecom"; - @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient", type="string" ) - public static final String SP_FAMILY = "family"; + @SearchParamDefinition(name = "animal-breed", path = "Patient.animal.breed", description = "The breed for animal patients", type = "token") + public static final String SP_ANIMALBREED = "animal-breed"; + @SearchParamDefinition(name = "careprovider", path = "Patient.careProvider", description = "Patient's nominated care provider, could be a care manager, not the organization that manages the record", type = "reference") + public static final String SP_CAREPROVIDER = "careprovider"; + @SearchParamDefinition(name = "phonetic", path = "", description = "A portion of either family or given name using some kind of phonetic matching algorithm", type = "string") + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name = "organization", path = "Patient.managingOrganization", description = "The organization at which this person is a patient", type = "reference") + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name = "name", path = "Patient.name", description = "A portion of either family or given name of the patient", type = "string") + public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "telecom", path = "Patient.telecom", description = "The value in any kind of telecom details of the patient", type = "string") + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name = "family", path = "Patient.name.family", description = "A portion of the family name of the patient", type = "string") + public static final String SP_FAMILY = "family"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java index f3a401de15c..87c2b55a1f7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentNotice.java @@ -47,35 +47,35 @@ public class PaymentNotice extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class PaymentNotice extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class PaymentNotice extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class PaymentNotice extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=7, min=0, max=1) + @Child(name = "request", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -123,7 +123,7 @@ public class PaymentNotice extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=8, min=0, max=1) + @Child(name = "response", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -135,7 +135,7 @@ public class PaymentNotice extends DomainResource { /** * The payment status, typically paid: payment sent, cleared: payment received. */ - @Child(name="paymentStatus", type={Coding.class}, order=9, min=1, max=1) + @Child(name = "paymentStatus", type = {Coding.class}, order = 9, min = 1, max = 1) @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." ) protected Coding paymentStatus; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java index 2bd7f56627f..fb1e1b701d2 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java @@ -656,14 +656,14 @@ public class PaymentReconciliation extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={PendedRequest.class}, order=1, min=0, max=1) + @Child(name = "request", type = {PendedRequest.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -675,49 +675,49 @@ public class PaymentReconciliation extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name="outcome", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The period of time for which payments have been gathered into this bulk payment for settlement. */ - @Child(name="period", type={Period.class}, order=7, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) protected Period period; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=8, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -729,7 +729,7 @@ public class PaymentReconciliation extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -741,7 +741,7 @@ public class PaymentReconciliation extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=10, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -753,28 +753,28 @@ public class PaymentReconciliation extends DomainResource { /** * List of individual settlement amounts and the corresponding transaction. */ - @Child(name="detail", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "detail", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." ) protected List detail; /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=12, min=0, max=1) + @Child(name = "form", type = {Coding.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Total payment amount. */ - @Child(name="total", type={Money.class}, order=13, min=1, max=1) + @Child(name = "total", type = {Money.class}, order = 13, min = 1, max = 1) @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." ) protected Money total; /** * Suite of notes. */ - @Child(name="note", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "note", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) protected List note; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java index aa452554a77..6a23d055fd6 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java @@ -48,35 +48,35 @@ public class PendedRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -88,7 +88,7 @@ public class PendedRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -100,7 +100,7 @@ public class PendedRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -112,7 +112,7 @@ public class PendedRequest extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=7, min=0, max=1) + @Child(name = "request", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -124,21 +124,21 @@ public class PendedRequest extends DomainResource { /** * Names of resource types to include. */ - @Child(name="include", type={StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "include", type = {StringType.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) protected List include; /** * Names of resource types to exclude. */ - @Child(name="exclude", type={StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exclude", type = {StringType.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) protected List exclude; /** * A period of time during which the fulfilling resources would have been created. */ - @Child(name="period", type={Period.class}, order=10, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) protected Period period; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java index e589d7d0de8..4e10fd82401 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Period.java @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A time period defined by a start and end date and optionally time. */ @DatatypeDef(name="Period") -public class Period extends Type implements ICompositeType { +public class Period extends Type implements ICompositeType { /** * The start of the period. The boundary is inclusive. */ - @Child(name="start", type={DateTimeType.class}, order=0, min=0, max=1) + @Child(name = "start", type = {DateTimeType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Starting time with inclusive boundary", formalDefinition="The start of the period. The boundary is inclusive." ) protected DateTimeType start; /** * The end of the period. If the end of the period is missing, it means that the period is ongoing. */ - @Child(name="end", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "end", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="End time with inclusive boundary, if not ongoing", formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing." ) protected DateTimeType end; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java index d67222227c1..b7e6a3d392e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Person.java @@ -409,56 +409,56 @@ public class Person extends DomainResource { /** * Identifier for a person within a particular scope. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A Human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) protected List identifier; /** * A name associated with the person. */ - @Child(name="name", type={HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "name", type = {HumanName.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) protected List name; /** * A contact detail for the person, e.g. a telephone number or an email address. */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) protected List telecom; /** * Administrative Gender. */ - @Child(name="gender", type={CodeType.class}, order=3, min=0, max=1) + @Child(name = "gender", type = {CodeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender." ) protected Enumeration gender; /** * The birth date for the person. */ - @Child(name="birthDate", type={DateTimeType.class}, order=4, min=0, max=1) + @Child(name = "birthDate", type = {DateTimeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="The birth date for the person", formalDefinition="The birth date for the person." ) protected DateTimeType birthDate; /** * One or more addresses for the person. */ - @Child(name="address", type={Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "address", type = {Address.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="One or more addresses for the person", formalDefinition="One or more addresses for the person." ) protected List
    address; /** * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual. */ - @Child(name="photo", type={Attachment.class}, order=6, min=0, max=1) + @Child(name = "photo", type = {Attachment.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Image of the Person", formalDefinition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual." ) protected Attachment photo; /** * The Organization that is the custodian of the person record. */ - @Child(name="managingOrganization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "managingOrganization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The Organization that is the custodian of the person record", formalDefinition="The Organization that is the custodian of the person record." ) protected Reference managingOrganization; @@ -470,14 +470,14 @@ public class Person extends DomainResource { /** * Whether this person's record is in active use. */ - @Child(name="active", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name = "active", type = {BooleanType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="This person's record is in active use", formalDefinition="Whether this person's record is in active use." ) protected BooleanType active; /** * Link to a resource that converns the same actual person. */ - @Child(name="link", type={}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "link", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Link to a resource that converns the same actual person", formalDefinition="Link to a resource that converns the same actual person." ) protected List link; @@ -938,8 +938,8 @@ public class Person extends DomainResource { return ResourceType.Person; } - @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "Person.identifier", description = "A person Identifier", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="address", path="Person.address", description="An address in any kind of address/part", type="string" ) @@ -948,12 +948,12 @@ public class Person extends DomainResource { public static final String SP_BIRTHDATE = "birthdate"; @SearchParamDefinition(name="gender", path="Person.gender", description="The gender of the person", type="token" ) public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="string" ) - public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name = "organization", path = "Person.managingOrganization", description = "The organization at which this person record is being managed", type = "reference") + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name = "name", path = "Person.name", description = "A portion of name in any name part", type = "string") + public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "telecom", path = "Person.telecom", description = "The value in any kind of contact", type = "string") + public static final String SP_TELECOM = "telecom"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java index 6c93dec4010..bda2b6fa23e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java @@ -2688,35 +2688,35 @@ public class PharmacyClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class PharmacyClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class PharmacyClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class PharmacyClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) + @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class PharmacyClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=11, min=0, max=1) + @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,7 +2797,7 @@ public class PharmacyClaim extends DomainResource { /** * Prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name="prescription", type={MedicationPrescription.class}, order=12, min=0, max=1) + @Child(name = "prescription", type = {MedicationPrescription.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Current Prescription", formalDefinition="Prescription to support the dispensing of pharmacy services, medications or products." ) protected Reference prescription; @@ -2809,7 +2809,7 @@ public class PharmacyClaim extends DomainResource { /** * Original prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name="originalPrescription", type={MedicationPrescription.class}, order=13, min=0, max=1) + @Child(name = "originalPrescription", type = {MedicationPrescription.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription to support the dispensing of pharmacy services, medications or products." ) protected Reference originalPrescription; @@ -2821,14 +2821,14 @@ public class PharmacyClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=14, min=0, max=1) + @Child(name = "payee", type = {}, order = 14, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=15, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2840,21 +2840,21 @@ public class PharmacyClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Coding.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=18, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 18, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2866,56 +2866,56 @@ public class PharmacyClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverage", type = {}, order = 19, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exception", type = {Coding.class}, order = 20, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=21, min=0, max=1) + @Child(name = "school", type = {StringType.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=22, min=0, max=1) + @Child(name = "accident", type = {DateType.class}, order = 22, min = 0, max = 1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=23, min=0, max=1) + @Child(name = "accidentType", type = {Coding.class}, order = 23, min = 0, max = 1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "interventionException", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 25, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=26, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additionalMaterials", type = {Coding.class}, order = 26, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -4057,10 +4057,10 @@ public class PharmacyClaim extends DomainResource { return ResourceType.PharmacyClaim; } - @SearchParamDefinition(name="identifier", path="PharmacyClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="use", path="PharmacyClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; + @SearchParamDefinition(name = "identifier", path = "PharmacyClaim.identifier", description = "The primary identifier of the financial resource", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "use", path = "PharmacyClaim.use", description = "The kind of financial resource", type = "token") + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="PharmacyClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="PharmacyClaim.priority", description="Processing priority requested", type="token" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java index 8588b66a50e..b3ecd8b039b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Practitioner.java @@ -147,302 +147,304 @@ public class Practitioner extends DomainResource { @Block() public static class PractitionerPractitionerRoleComponent extends BackboneElement { - /** - * The Organization where the Practitioner performs the roles associated. - */ - @Child(name="managingOrganization", type={Organization.class}, order=1, min=0, max=1) - @Description(shortDefinition="The Organization where the Practitioner performs the roles associated", formalDefinition="The Organization where the Practitioner performs the roles associated." ) - protected Reference managingOrganization; + /** + * The Organization where the Practitioner performs the roles associated. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order = 1, min = 0, max = 1) + @Description(shortDefinition = "The Organization where the Practitioner performs the roles associated", formalDefinition = "The Organization where the Practitioner performs the roles associated.") + protected Reference managingOrganization; - /** - * The actual object that is the target of the reference (The Organization where the Practitioner performs the roles associated.) - */ - protected Organization managingOrganizationTarget; + /** + * The actual object that is the target of the reference (The Organization where the Practitioner performs the roles associated.) + */ + protected Organization managingOrganizationTarget; - /** - * Roles which this practitioner is authorized to perform for the organization. - */ - @Child(name="role", type={CodeableConcept.class}, order=2, min=0, max=1) - @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." ) - protected CodeableConcept role; + /** + * Roles which this practitioner is authorized to perform for the organization. + */ + @Child(name = "role", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) + @Description(shortDefinition = "Roles which this practitioner may perform", formalDefinition = "Roles which this practitioner is authorized to perform for the organization.") + protected CodeableConcept role; - /** - * Specific specialty of the practitioner. - */ - @Child(name="specialty", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) - protected List specialty; + /** + * Specific specialty of the practitioner. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "Specific specialty of the practitioner", formalDefinition = "Specific specialty of the practitioner.") + protected List specialty; - /** - * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. - */ - @Child(name="period", type={Period.class}, order=4, min=0, max=1) - @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) - protected Period period; + /** + * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. + */ + @Child(name = "period", type = {Period.class}, order = 4, min = 0, max = 1) + @Description(shortDefinition = "The period during which the practitioner is authorized to perform in these role(s)", formalDefinition = "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.") + protected Period period; - /** - * The location(s) at which this practitioner provides care. - */ - @Child(name="location", type={Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) - protected List location; - /** - * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) - */ - protected List locationTarget; + /** + * The location(s) at which this practitioner provides care. + */ + @Child(name = "location", type = {Location.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "The location(s) at which this practitioner provides care", formalDefinition = "The location(s) at which this practitioner provides care.") + protected List location; + /** + * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) + */ + protected List locationTarget; - /** - * The list of healthcare services that this worker offers at this location of this organization. - */ - @Child(name="healthcareService", type={HealthcareService.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="The list of healthcare services that this worker offers at this location of this organization", formalDefinition="The list of healthcare services that this worker offers at this location of this organization." ) - protected List healthcareService; - /** - * The actual objects that are the target of the reference (The list of healthcare services that this worker offers at this location of this organization.) - */ - protected List healthcareServiceTarget; + /** + * The list of healthcare services that this worker offers at this location of this organization. + */ + @Child(name = "healthcareService", type = {HealthcareService.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "The list of healthcare services that this worker offers at this location of this organization", formalDefinition = "The list of healthcare services that this worker offers at this location of this organization.") + protected List healthcareService; + /** + * The actual objects that are the target of the reference (The list of healthcare services that this worker offers at this location of this organization.) + */ + protected List healthcareServiceTarget; - private static final long serialVersionUID = -2146177018L; + private static final long serialVersionUID = -2146177018L; public PractitionerPractitionerRoleComponent() { super(); } - /** - * @return {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) - */ - public Reference getManagingOrganization() { - if (this.managingOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); - else if (Configuration.doAutoCreate()) - this.managingOrganization = new Reference(); // cc - return this.managingOrganization; - } + /** + * @return {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } - public boolean hasManagingOrganization() { - return this.managingOrganization != null && !this.managingOrganization.isEmpty(); - } + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } - /** - * @param value {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) - */ - public PractitionerPractitionerRoleComponent setManagingOrganization(Reference value) { - this.managingOrganization = value; - return this; - } + /** + * @param value {@link #managingOrganization} (The Organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } - /** - * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) - */ - public Organization getManagingOrganizationTarget() { - if (this.managingOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); - else if (Configuration.doAutoCreate()) - this.managingOrganizationTarget = new Organization(); // aa - return this.managingOrganizationTarget; - } + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } - /** - * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) - */ - public PractitionerPractitionerRoleComponent setManagingOrganizationTarget(Organization value) { - this.managingOrganizationTarget = value; - return this; - } + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } - /** - * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) - */ - public CodeableConcept getRole() { - if (this.role == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.role"); - else if (Configuration.doAutoCreate()) - this.role = new CodeableConcept(); // cc - return this.role; - } + /** + * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } - public boolean hasRole() { - return this.role != null && !this.role.isEmpty(); - } + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } - /** - * @param value {@link #role} (Roles which this practitioner is authorized to perform for the organization.) - */ - public PractitionerPractitionerRoleComponent setRole(CodeableConcept value) { - this.role = value; - return this; - } + /** + * @param value {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public PractitionerPractitionerRoleComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } - /** - * @return {@link #specialty} (Specific specialty of the practitioner.) - */ - public List getSpecialty() { - if (this.specialty == null) - this.specialty = new ArrayList(); - return this.specialty; - } + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } - public boolean hasSpecialty() { - if (this.specialty == null) - return false; - for (CodeableConcept item : this.specialty) - if (!item.isEmpty()) - return true; + public boolean hasSpecialty() { + if (this.specialty == null) return false; - } + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } - /** - * @return {@link #specialty} (Specific specialty of the practitioner.) - */ - // syntactic sugar - public CodeableConcept addSpecialty() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialty == null) - this.specialty = new ArrayList(); - this.specialty.add(t); - return t; - } + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } - /** - * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.period"); - else if (Configuration.doAutoCreate()) - this.period = new Period(); // cc - return this.period; - } + /** + * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } - public boolean hasPeriod() { - return this.period != null && !this.period.isEmpty(); - } + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } - /** - * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) - */ - public PractitionerPractitionerRoleComponent setPeriod(Period value) { - this.period = value; - return this; - } + /** + * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public PractitionerPractitionerRoleComponent setPeriod(Period value) { + this.period = value; + return this; + } - /** - * @return {@link #location} (The location(s) at which this practitioner provides care.) - */ - public List getLocation() { - if (this.location == null) - this.location = new ArrayList(); - return this.location; - } + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } - public boolean hasLocation() { - if (this.location == null) - return false; - for (Reference item : this.location) - if (!item.isEmpty()) - return true; + public boolean hasLocation() { + if (this.location == null) return false; - } + for (Reference item : this.location) + if (!item.isEmpty()) + return true; + return false; + } - /** - * @return {@link #location} (The location(s) at which this practitioner provides care.) - */ - // syntactic sugar - public Reference addLocation() { //3 - Reference t = new Reference(); - if (this.location == null) - this.location = new ArrayList(); - this.location.add(t); - return t; - } + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + // syntactic sugar + public Reference addLocation() { //3 + Reference t = new Reference(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } - /** - * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) - */ - public List getLocationTarget() { - if (this.locationTarget == null) - this.locationTarget = new ArrayList(); - return this.locationTarget; - } + /** + * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public List getLocationTarget() { + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + return this.locationTarget; + } - // syntactic sugar - /** - * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) - */ - public Location addLocationTarget() { - Location r = new Location(); - if (this.locationTarget == null) - this.locationTarget = new ArrayList(); - this.locationTarget.add(r); - return r; - } + // syntactic sugar - /** - * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) - */ - public List getHealthcareService() { - if (this.healthcareService == null) - this.healthcareService = new ArrayList(); - return this.healthcareService; - } + /** + * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public Location addLocationTarget() { + Location r = new Location(); + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + this.locationTarget.add(r); + return r; + } - public boolean hasHealthcareService() { - if (this.healthcareService == null) - return false; - for (Reference item : this.healthcareService) - if (!item.isEmpty()) - return true; + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) + */ + public List getHealthcareService() { + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + return this.healthcareService; + } + + public boolean hasHealthcareService() { + if (this.healthcareService == null) return false; - } + for (Reference item : this.healthcareService) + if (!item.isEmpty()) + return true; + return false; + } - /** - * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) - */ - // syntactic sugar - public Reference addHealthcareService() { //3 - Reference t = new Reference(); - if (this.healthcareService == null) - this.healthcareService = new ArrayList(); - this.healthcareService.add(t); - return t; - } + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker offers at this location of this organization.) + */ + // syntactic sugar + public Reference addHealthcareService() { //3 + Reference t = new Reference(); + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return t; + } - /** - * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) - */ - public List getHealthcareServiceTarget() { - if (this.healthcareServiceTarget == null) - this.healthcareServiceTarget = new ArrayList(); - return this.healthcareServiceTarget; - } + /** + * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) + */ + public List getHealthcareServiceTarget() { + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + return this.healthcareServiceTarget; + } - // syntactic sugar - /** - * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) - */ - public HealthcareService addHealthcareServiceTarget() { - HealthcareService r = new HealthcareService(); - if (this.healthcareServiceTarget == null) - this.healthcareServiceTarget = new ArrayList(); - this.healthcareServiceTarget.add(r); - return r; - } + // syntactic sugar - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The Organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); - childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); - childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); - childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); - childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker offers at this location of this organization.", 0, java.lang.Integer.MAX_VALUE, healthcareService)); - } + /** + * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker offers at this location of this organization.) + */ + public HealthcareService addHealthcareServiceTarget() { + HealthcareService r = new HealthcareService(); + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + this.healthcareServiceTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The Organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker offers at this location of this organization.", 0, java.lang.Integer.MAX_VALUE, healthcareService)); + } public PractitionerPractitionerRoleComponent copy() { PractitionerPractitionerRoleComponent dst = new PractitionerPractitionerRoleComponent(); @@ -453,18 +455,21 @@ public class Practitioner extends DomainResource { dst.specialty = new ArrayList(); for (CodeableConcept i : specialty) dst.specialty.add(i.copy()); - }; + } + ; dst.period = period == null ? null : period.copy(); if (location != null) { dst.location = new ArrayList(); for (Reference i : location) dst.location.add(i.copy()); - }; + } + ; if (healthcareService != null) { dst.healthcareService = new ArrayList(); for (Reference i : healthcareService) dst.healthcareService.add(i.copy()); - }; + } + ; return dst; } @@ -476,8 +481,8 @@ public class Practitioner extends DomainResource { return false; PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; return compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(role, o.role, true) - && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) - && compareDeep(healthcareService, o.healthcareService, true); + && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) + && compareDeep(healthcareService, o.healthcareService, true); } @Override @@ -492,13 +497,13 @@ public class Practitioner extends DomainResource { public boolean isEmpty() { return super.isEmpty() && (managingOrganization == null || managingOrganization.isEmpty()) && (role == null || role.isEmpty()) - && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty()) - && (healthcareService == null || healthcareService.isEmpty()); + && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty()) + && (healthcareService == null || healthcareService.isEmpty()); } - } + } - @Block() + @Block() public static class PractitionerQualificationComponent extends BackboneElement { /** * An identifier that applies to this person's qualification in this role. @@ -711,82 +716,82 @@ public class Practitioner extends DomainResource { public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) - && (period == null || period.isEmpty()) && (issuer == null || issuer.isEmpty()); + && (period == null || period.isEmpty()) && (issuer == null || issuer.isEmpty()); } } - /** - * An identifier that applies to this person in this role. - */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="A identifier for the person as this agent", formalDefinition="An identifier that applies to this person in this role." ) - protected List identifier; + /** + * An identifier that applies to this person in this role. + */ + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "A identifier for the person as this agent", formalDefinition = "An identifier that applies to this person in this role.") + protected List identifier; - /** - * A name associated with the person. - */ - @Child(name="name", type={HumanName.class}, order=1, min=0, max=1) - @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) - protected HumanName name; + /** + * A name associated with the person. + */ + @Child(name = "name", type = {HumanName.class}, order = 1, min = 0, max = 1) + @Description(shortDefinition = "A name associated with the person", formalDefinition = "A name associated with the person.") + protected HumanName name; - /** - * A contact detail for the practitioner, e.g. a telephone number or an email address. - */ - @Child(name="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + /** + * A contact detail for the practitioner, e.g. a telephone number or an email address. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the practitioner", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." ) protected List telecom; /** * The postal address where the practitioner can be found or visited or to which mail can be delivered. */ - @Child(name="address", type={Address.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "address", type = {Address.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Where practitioner can be found/visited", formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered." ) protected List
    address; /** * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=4, min=0, max=1) - @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) + @Child(name = "gender", type = {CodeType.class}, order = 4, min = 0, max = 1) + @Description(shortDefinition = "male | female | other | unknown", formalDefinition = "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.") protected Enumeration gender; - /** - * The date and time of birth for the practitioner. - */ - @Child(name="birthDate", type={DateType.class}, order=5, min=0, max=1) - @Description(shortDefinition="The date and time of birth for the practitioner", formalDefinition="The date and time of birth for the practitioner." ) - protected DateType birthDate; + /** + * The date and time of birth for the practitioner. + */ + @Child(name = "birthDate", type = {DateType.class}, order = 5, min = 0, max = 1) + @Description(shortDefinition = "The date and time of birth for the practitioner", formalDefinition = "The date and time of birth for the practitioner.") + protected DateType birthDate; - /** - * Image of the person. - */ - @Child(name="photo", type={Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) - protected List photo; + /** + * Image of the person. + */ + @Child(name = "photo", type = {Attachment.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "Image of the person", formalDefinition = "Image of the person.") + protected List photo; - /** - * The list of Roles/Organizations that the Practitioner is associated with. - */ - @Child(name="practitionerRole", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="The list of Roles/Organizations that the Practitioner is associated with", formalDefinition="The list of Roles/Organizations that the Practitioner is associated with." ) - protected List practitionerRole; + /** + * The list of Roles/Organizations that the Practitioner is associated with. + */ + @Child(name = "practitionerRole", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "The list of Roles/Organizations that the Practitioner is associated with", formalDefinition = "The list of Roles/Organizations that the Practitioner is associated with.") + protected List practitionerRole; - /** - * Qualifications obtained by training and certification. - */ - @Child(name="qualification", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Qualifications obtained by training and certification", formalDefinition="Qualifications obtained by training and certification." ) - protected List qualification; + /** + * Qualifications obtained by training and certification. + */ + @Child(name = "qualification", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "Qualifications obtained by training and certification", formalDefinition = "Qualifications obtained by training and certification.") + protected List qualification; - /** - * A language the practitioner is able to use in patient communication. - */ - @Child(name="communication", type={CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="A language the practitioner is able to use in patient communication", formalDefinition="A language the practitioner is able to use in patient communication." ) - protected List communication; + /** + * A language the practitioner is able to use in patient communication. + */ + @Child(name = "communication", type = {CodeableConcept.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "A language the practitioner is able to use in patient communication", formalDefinition = "A language the practitioner is able to use in patient communication.") + protected List communication; - private static final long serialVersionUID = 781100268L; + private static final long serialVersionUID = 781100268L; public Practitioner() { super(); @@ -978,7 +983,7 @@ public class Practitioner extends DomainResource { /** * @param value {@link #birthDate} (The date and time of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value */ - public Practitioner setBirthDateElement(DateType value) { + public Practitioner setBirthDateElement(DateType value) { this.birthDate = value; return this; } @@ -986,14 +991,14 @@ public class Practitioner extends DomainResource { /** * @return The date and time of birth for the practitioner. */ - public Date getBirthDate() { + public Date getBirthDate() { return this.birthDate == null ? null : this.birthDate.getValue(); } - /** - * @param value The date and time of birth for the practitioner. + /** + * @param value The date and time of birth for the practitioner. */ - public Practitioner setBirthDate(Date value) { + public Practitioner setBirthDate(Date value) { if (value == null) this.birthDate = null; else { @@ -1034,32 +1039,32 @@ public class Practitioner extends DomainResource { return t; } - /** - * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) - */ - public List getPractitionerRole() { - if (this.practitionerRole == null) - this.practitionerRole = new ArrayList(); - return this.practitionerRole; - } + /** + * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) + */ + public List getPractitionerRole() { + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + return this.practitionerRole; + } - public boolean hasPractitionerRole() { - if (this.practitionerRole == null) - return false; - for (PractitionerPractitionerRoleComponent item : this.practitionerRole) - if (!item.isEmpty()) - return true; + public boolean hasPractitionerRole() { + if (this.practitionerRole == null) return false; - } + for (PractitionerPractitionerRoleComponent item : this.practitionerRole) + if (!item.isEmpty()) + return true; + return false; + } - /** - * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) - */ - // syntactic sugar - public PractitionerPractitionerRoleComponent addPractitionerRole() { //3 - PractitionerPractitionerRoleComponent t = new PractitionerPractitionerRoleComponent(); - if (this.practitionerRole == null) - this.practitionerRole = new ArrayList(); + /** + * @return {@link #practitionerRole} (The list of Roles/Organizations that the Practitioner is associated with.) + */ + // syntactic sugar + public PractitionerPractitionerRoleComponent addPractitionerRole() { //3 + PractitionerPractitionerRoleComponent t = new PractitionerPractitionerRoleComponent(); + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); this.practitionerRole.add(t); return t; } @@ -1163,7 +1168,8 @@ public class Practitioner extends DomainResource { dst.photo = new ArrayList(); for (Attachment i : photo) dst.photo.add(i.copy()); - }; + } + ; if (practitionerRole != null) { dst.practitionerRole = new ArrayList(); for (PractitionerPractitionerRoleComponent i : practitionerRole) @@ -1194,8 +1200,8 @@ public class Practitioner extends DomainResource { return false; Practitioner o = (Practitioner) other; return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) - && compareDeep(photo, o.photo, true) && compareDeep(practitionerRole, o.practitionerRole, true) + && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) + && compareDeep(photo, o.photo, true) && compareDeep(practitionerRole, o.practitionerRole, true) && compareDeep(qualification, o.qualification, true) && compareDeep(communication, o.communication, true) ; } @@ -1210,44 +1216,44 @@ public class Practitioner extends DomainResource { return compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true); } - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) && (gender == null || gender.isEmpty()) - && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) && (practitionerRole == null || practitionerRole.isEmpty()) - && (qualification == null || qualification.isEmpty()) && (communication == null || communication.isEmpty()) - ; - } + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) + && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) && (gender == null || gender.isEmpty()) + && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) && (practitionerRole == null || practitionerRole.isEmpty()) + && (qualification == null || qualification.isEmpty()) && (communication == null || communication.isEmpty()) + ; + } @Override public ResourceType getResourceType() { return ResourceType.Practitioner; - } + } - @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" ) + @SearchParamDefinition(name = "identifier", path = "Practitioner.identifier", description = "A practitioner's Identifier", type = "token") public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="given", path="Practitioner.name", description="A portion of the given name", type="string" ) + @SearchParamDefinition(name="given", path = "Practitioner.name", description = "A portion of the given name", type = "string") public static final String SP_GIVEN = "given"; - @SearchParamDefinition(name="specialty", path="Practitioner.practitionerRole.specialty", description="The practitioner has this specailty at an organization", type="token" ) + @SearchParamDefinition(name = "specialty", path = "Practitioner.practitionerRole.specialty", description = "The practitioner has this specailty at an organization", type = "token") public static final String SP_SPECIALTY = "specialty"; - @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part", type="string" ) + @SearchParamDefinition(name="address", path="Practitioner.address", description = "An address in any kind of address/part", type = "string") public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="role", path="Practitioner.practitionerRole.role", description="The practitioner can perform this role at for the organization", type="token" ) + @SearchParamDefinition(name = "role", path = "Practitioner.practitionerRole.role", description = "The practitioner can perform this role at for the organization", type = "token") public static final String SP_ROLE = "role"; - @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" ) + @SearchParamDefinition(name = "gender", path = "Practitioner.gender", description = "Gender of the practitioner", type = "token") public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) + @SearchParamDefinition(name = "phonetic", path = "Practitioner.name", description = "A portion of either family or given name using some kind of phonetic matching algorithm", type = "string") public static final String SP_PHONETIC = "phonetic"; - @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.managingOrganization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) + @SearchParamDefinition(name = "organization", path = "Practitioner.practitionerRole.managingOrganization", description = "The identity of the organization the practitioner represents / acts on behalf of", type = "reference") public static final String SP_ORGANIZATION = "organization"; - @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name", type="string" ) + @SearchParamDefinition(name="name", path = "Practitioner.name", description = "A portion of either family or given name", type = "string") public static final String SP_NAME = "name"; - @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="string" ) + @SearchParamDefinition(name="telecom", path= "Practitioner.telecom", description = "The value in any kind of contact", type = "string") public static final String SP_TELECOM = "telecom"; - @SearchParamDefinition(name="location", path="Practitioner.practitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference" ) + @SearchParamDefinition(name = "location", path = "Practitioner.practitionerRole.location", description = "One of the locations at which this practitioner provides care", type = "reference") public static final String SP_LOCATION = "location"; - @SearchParamDefinition(name="family", path="Practitioner.name", description="A portion of the family name", type="string" ) + @SearchParamDefinition(name = "family", path = "Practitioner.name", description = "A portion of the family name", type = "string") public static final String SP_FAMILY = "family"; - @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" ) + @SearchParamDefinition(name = "communication", path = "Practitioner.communication", description = "One of the languages that the practitioner can communicate with", type = "token") public static final String SP_COMMUNICATION = "communication"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java index 44e5688129d..0bd59ae4a4f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java @@ -412,14 +412,14 @@ public class Procedure extends DomainResource { /** * This records identifiers associated with this procedure that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this procedure", formalDefinition="This records identifiers associated with this procedure that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The person on whom the procedure was performed. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Who procedure was performed on", formalDefinition="The person on whom the procedure was performed." ) protected Reference patient; @@ -431,42 +431,42 @@ public class Procedure extends DomainResource { /** * The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Identification of the procedure", formalDefinition="The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded." ) protected CodeableConcept type; /** * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "bodySite", type = {CodeableConcept.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Precise location details", formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion." ) protected List bodySite; /** * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text. */ - @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "indication", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Reason procedure performed", formalDefinition="The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text." ) protected List indication; /** * Limited to 'real' people rather than equipment. */ - @Child(name="performer", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "performer", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The people who performed the procedure", formalDefinition="Limited to 'real' people rather than equipment." ) protected List performer; /** * The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured. */ - @Child(name="date", type={Period.class}, order=6, min=0, max=1) + @Child(name = "date", type = {Period.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="The date the procedure was performed", formalDefinition="The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." ) protected Period date; /** * The encounter during which the procedure was performed. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="The encounter when procedure performed", formalDefinition="The encounter during which the procedure was performed." ) protected Reference encounter; @@ -478,14 +478,14 @@ public class Procedure extends DomainResource { /** * What was the outcome of the procedure - did it resolve reasons why the procedure was performed?. */ - @Child(name="outcome", type={StringType.class}, order=8, min=0, max=1) + @Child(name = "outcome", type = {StringType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="What was result of procedure?", formalDefinition="What was the outcome of the procedure - did it resolve reasons why the procedure was performed?." ) protected StringType outcome; /** * This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies. */ - @Child(name="report", type={DiagnosticReport.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "report", type = {DiagnosticReport.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Any report that results from the procedure", formalDefinition="This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies." ) protected List report; /** @@ -497,28 +497,28 @@ public class Procedure extends DomainResource { /** * Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues. */ - @Child(name="complication", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "complication", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Complication following the procedure", formalDefinition="Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues." ) protected List complication; /** * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used. */ - @Child(name="followUp", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "followUp", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Instructions for follow up", formalDefinition="If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used." ) protected StringType followUp; /** * Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure. */ - @Child(name="relatedItem", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "relatedItem", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A procedure that is related to this one", formalDefinition="Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure." ) protected List relatedItem; /** * Any other notes about the procedure - e.g. the operative notes. */ - @Child(name="notes", type={StringType.class}, order=13, min=0, max=1) + @Child(name = "notes", type = {StringType.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Additional information about procedure", formalDefinition="Any other notes about the procedure - e.g. the operative notes." ) protected StringType notes; @@ -1159,7 +1159,7 @@ public class Procedure extends DomainResource { @SearchParamDefinition(name="date", path="Procedure.date", description="The date the procedure was performed on", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="patient", path="Procedure.patient", description="The identity of a patient to list procedures for", type="reference" ) + @SearchParamDefinition(name = "patient", path = "Procedure.patient", description = "The identity of a patient to list procedures for", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="type", path="Procedure.type", description="Type of procedure", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java index 67c615eb092..9699767539e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcedureRequest.java @@ -332,14 +332,14 @@ public class ProcedureRequest extends DomainResource { /** * Identifiers assigned to this order by the order or by the receiver. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier", formalDefinition="Identifiers assigned to this order by the order or by the receiver." ) protected List identifier; /** * The patient who will receive the procedure. */ - @Child(name="subject", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "subject", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Subject", formalDefinition="The patient who will receive the procedure." ) protected Reference subject; @@ -351,35 +351,35 @@ public class ProcedureRequest extends DomainResource { /** * The specific procedure that is ordered. Use text if the exact nature of the procedure can't be coded. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Procedure Type", formalDefinition="The specific procedure that is ordered. Use text if the exact nature of the procedure can't be coded." ) protected CodeableConcept type; /** * The site where the procedure is to be performed. */ - @Child(name="bodySite", type={CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "bodySite", type = {CodeableConcept.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Target Body Site", formalDefinition="The site where the procedure is to be performed." ) protected List bodySite; /** * The reason why the procedure is proposed or ordered. This procedure request may be motivated by a Condition for instance. */ - @Child(name="indication", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "indication", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Indication", formalDefinition="The reason why the procedure is proposed or ordered. This procedure request may be motivated by a Condition for instance." ) protected List indication; /** * The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". */ - @Child(name="timing", type={DateTimeType.class, Period.class, Timing.class}, order=5, min=0, max=1) + @Child(name = "timing", type = {DateTimeType.class, Period.class, Timing.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Timing", formalDefinition="The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'." ) protected Type timing; /** * The encounter within which the procedure proposal or request was created. */ - @Child(name="encounter", type={Encounter.class}, order=6, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Encounter", formalDefinition="The encounter within which the procedure proposal or request was created." ) protected Reference encounter; @@ -391,7 +391,7 @@ public class ProcedureRequest extends DomainResource { /** * E.g. surgeon, anaethetist, endoscopist. */ - @Child(name="performer", type={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=7, min=0, max=1) + @Child(name = "performer", type = {Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Performer", formalDefinition="E.g. surgeon, anaethetist, endoscopist." ) protected Reference performer; @@ -403,35 +403,35 @@ public class ProcedureRequest extends DomainResource { /** * The status of the order. */ - @Child(name="status", type={CodeType.class}, order=8, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the order." ) protected Enumeration status; /** * Any other notes associated with this proposal or order - e.g., provider instructions. */ - @Child(name="notes", type={StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notes", type = {StringType.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Notes", formalDefinition="Any other notes associated with this proposal or order - e.g., provider instructions." ) protected List notes; /** * If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. */ - @Child(name="asNeeded", type={BooleanType.class, CodeableConcept.class}, order=10, min=0, max=1) + @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="PRN", formalDefinition="If a CodeableConcept is present, it indicates the pre-condition for performing the procedure." ) protected Type asNeeded; /** * The time when the request was made. */ - @Child(name="orderedOn", type={DateTimeType.class}, order=11, min=0, max=1) + @Child(name = "orderedOn", type = {DateTimeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="When Requested", formalDefinition="The time when the request was made." ) protected DateTimeType orderedOn; /** * The healthcare professional responsible for proposing or ordering the procedure. */ - @Child(name="orderer", type={Practitioner.class, Patient.class, RelatedPerson.class, Device.class}, order=12, min=0, max=1) + @Child(name = "orderer", type = {Practitioner.class, Patient.class, RelatedPerson.class, Device.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Ordering Party", formalDefinition="The healthcare professional responsible for proposing or ordering the procedure." ) protected Reference orderer; @@ -443,7 +443,7 @@ public class ProcedureRequest extends DomainResource { /** * The clinical priority associated with this order. */ - @Child(name="priority", type={CodeType.class}, order=13, min=0, max=1) + @Child(name = "priority", type = {CodeType.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) protected Enumeration priority; @@ -1122,8 +1122,8 @@ public class ProcedureRequest extends DomainResource { @SearchParamDefinition(name="subject", path="ProcedureRequest.subject", description="Search by subject", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="ProcedureRequest.subject", description="Search by subject - a patient", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "patient", path = "ProcedureRequest.subject", description = "Search by subject - a patient", type = "reference") + public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java index 60353c1a4f8..c5f903ac0b5 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java @@ -2688,35 +2688,35 @@ public class ProfessionalClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class ProfessionalClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class ProfessionalClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class ProfessionalClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) + @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class ProfessionalClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=11, min=0, max=1) + @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,14 +2797,14 @@ public class ProfessionalClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=12, min=0, max=1) + @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=13, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2816,21 +2816,21 @@ public class ProfessionalClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=16, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2842,56 +2842,56 @@ public class ProfessionalClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=19, min=0, max=1) + @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=20, min=0, max=1) + @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=21, min=0, max=1) + @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additionalMaterials", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3939,10 +3939,10 @@ public class ProfessionalClaim extends DomainResource { return ResourceType.ProfessionalClaim; } - @SearchParamDefinition(name="identifier", path="ProfessionalClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="use", path="ProfessionalClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; + @SearchParamDefinition(name = "identifier", path = "ProfessionalClaim.identifier", description = "The primary identifier of the financial resource", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "use", path = "ProfessionalClaim.use", description = "The kind of financial resource", type = "token") + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="ProfessionalClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="ProfessionalClaim.priority", description="Processing priority requested", type="token" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java index 880b73d3dcc..af0e1650957 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java @@ -501,126 +501,126 @@ public class Profile extends DomainResource { /** * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=0, min=1, max=1) + @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. */ - @Child(name="version", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="name", type={StringType.class}, order=3, min=1, max=1) + @Child(name = "name", type = {StringType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType name; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "code", type = {Coding.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=10, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * The Scope and Usage that this profile was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) protected StringType requirements; /** * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. */ - @Child(name="fhirVersion", type={IdType.class}, order=12, min=0, max=1) + @Child(name = "fhirVersion", type = {IdType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) protected IdType fhirVersion; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mapping", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * The Resource or Data type being described. */ - @Child(name="type", type={CodeType.class}, order=14, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 14, min = 1, max = 1) @Description(shortDefinition="The Resource or Data Type being described", formalDefinition="The Resource or Data type being described." ) protected CodeType type; /** * The structure that is the base on which this set of constraints is derived from. */ - @Child(name="base", type={UriType.class}, order=15, min=0, max=1) + @Child(name = "base", type = {UriType.class}, order = 15, min = 0, max = 1) @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) protected UriType base; /** * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. */ - @Child(name="snapshot", type={}, order=16, min=0, max=1) + @Child(name = "snapshot", type = {}, order = 16, min = 0, max = 1) @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) protected ConstraintComponent snapshot; /** * A differential view is expressed relative to the base profile - a statement of differences that it applies. */ - @Child(name="differential", type={ConstraintComponent.class}, order=17, min=0, max=1) + @Child(name = "differential", type = {ConstraintComponent.class}, order = 17, min = 0, max = 1) @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) protected ConstraintComponent differential; @@ -1490,23 +1490,23 @@ public class Profile extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Profile.identifier", description="The identifier of the profile", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="Profile.code", description="A code for the profile", type="token" ) + @SearchParamDefinition(name = "code", path = "Profile.code", description = "A code for the profile", type = "token") public static final String SP_CODE = "code"; - @SearchParamDefinition(name="valueset", path="Profile.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) + @SearchParamDefinition(name = "valueset", path = "Profile.snapshot.element.binding.reference[x]", description = "A vocabulary binding code", type = "reference") public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="name", path="Profile.name", description="Name of the profile", type="string" ) + @SearchParamDefinition(name = "name", path = "Profile.name", description = "Name of the profile", type = "string") public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="Profile.publisher", description="Name of the publisher of the profile", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="Profile.description", description="Text search in the description of the profile", type="string" ) + @SearchParamDefinition(name = "description", path = "Profile.description", description = "Text search in the description of the profile", type = "string") public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="type", path="Profile.type", description="Type of resource that is constrained in the profile", type="token" ) + @SearchParamDefinition(name = "type", path = "Profile.type", description = "Type of resource that is constrained in the profile", type = "token") public static final String SP_TYPE = "type"; @SearchParamDefinition(name="version", path="Profile.version", description="The version identifier of the profile", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="url", path="Profile.url", description="Literal URL used to reference this profile", type="token" ) + @SearchParamDefinition(name = "url", path = "Profile.url", description = "Literal URL used to reference this profile", type = "token") public static final String SP_URL = "url"; - @SearchParamDefinition(name="status", path="Profile.status", description="The current status of the profile", type="token" ) + @SearchParamDefinition(name = "status", path = "Profile.status", description = "The current status of the profile", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java index 7e43d10576d..88b43bf92b8 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Provenance.java @@ -666,7 +666,7 @@ public class Provenance extends DomainResource { /** * The Reference(s) that were generated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity. */ - @Child(name="target", type={}, order=0, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "target", type = {}, order = 0, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Target Reference(s) (usually version specific)", formalDefinition="The Reference(s) that were generated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) protected List target; /** @@ -678,28 +678,28 @@ public class Provenance extends DomainResource { /** * The period during which the activity occurred. */ - @Child(name="period", type={Period.class}, order=1, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) protected Period period; /** * The instant of time at which the activity was recorded. */ - @Child(name="recorded", type={InstantType.class}, order=2, min=1, max=1) + @Child(name = "recorded", type = {InstantType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="When the activity was recorded / updated", formalDefinition="The instant of time at which the activity was recorded." ) protected InstantType recorded; /** * The reason that the activity was taking place. */ - @Child(name="reason", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Reason the activity is occurring", formalDefinition="The reason that the activity was taking place." ) protected CodeableConcept reason; /** * Where the activity occurred, if relevant. */ - @Child(name="location", type={Location.class}, order=4, min=0, max=1) + @Child(name = "location", type = {Location.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Where the activity occurred, if relevant", formalDefinition="Where the activity occurred, if relevant." ) protected Reference location; @@ -711,28 +711,28 @@ public class Provenance extends DomainResource { /** * Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc. */ - @Child(name="policy", type={UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "policy", type = {UriType.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Policy or plan the activity was defined by", formalDefinition="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc." ) protected List policy; /** * An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility. */ - @Child(name="agent", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "agent", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Person, organization, records, etc. involved in creating resource", formalDefinition="An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility." ) protected List agent; /** * An entity used in this activity. */ - @Child(name="entity", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "entity", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="An entity used in this activity", formalDefinition="An entity used in this activity." ) protected List entity; /** * A digital signature on the target Reference(s). The signature should match a Provenance.agent.reference in the provenance resource. The signature is only added to support checking cryptographic integrity of the resource, and not to represent workflow and clinical aspects of the signing process, or to support non-repudiation. */ - @Child(name="integritySignature", type={StringType.class}, order=8, min=0, max=1) + @Child(name = "integritySignature", type = {StringType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Base64 signature (DigSig) - integrity check", formalDefinition="A digital signature on the target Reference(s). The signature should match a Provenance.agent.reference in the provenance resource. The signature is only added to support checking cryptographic integrity of the resource, and not to represent workflow and clinical aspects of the signing process, or to support non-repudiation." ) protected StringType integritySignature; @@ -1174,16 +1174,16 @@ public class Provenance extends DomainResource { public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="start", path="Provenance.period.start", description="Starting time with inclusive boundary", type="date" ) public static final String SP_START = "start"; - @SearchParamDefinition(name="end", path="Provenance.period.end", description="End time with inclusive boundary, if not ongoing", type="date" ) - public static final String SP_END = "end"; - @SearchParamDefinition(name="location", path="Provenance.location", description="Where the activity occurred, if relevant", type="reference" ) - public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name = "end", path = "Provenance.period.end", description = "End time with inclusive boundary, if not ongoing", type = "date") + public static final String SP_END = "end"; + @SearchParamDefinition(name = "location", path = "Provenance.location", description = "Where the activity occurred, if relevant", type = "reference") + public static final String SP_LOCATION = "location"; @SearchParamDefinition(name="partytype", path="Provenance.agent.type", description="e.g. Resource | Person | Application | Record | Document +", type="token" ) public static final String SP_PARTYTYPE = "partytype"; @SearchParamDefinition(name="party", path="Provenance.agent.reference", description="Identity of agent (urn or url)", type="token" ) public static final String SP_PARTY = "party"; - @SearchParamDefinition(name="target", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) - public static final String SP_TARGET = "target"; + @SearchParamDefinition(name = "target", path = "Provenance.target", description = "Target Reference(s) (usually version specific)", type = "reference") + public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java index 4ad1a02696c..d2591f149e2 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Quantity.java @@ -42,7 +42,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @DatatypeDef(name="Quantity") -public class Quantity extends Type implements ICompositeType { +public class Quantity extends Type implements ICompositeType { public enum QuantityComparator { /** @@ -147,35 +147,35 @@ public class Quantity extends Type implements ICompositeType { /** * The value of the measured amount. The value includes an implicit precision in the presentation of the value. */ - @Child(name="value", type={DecimalType.class}, order=0, min=0, max=1) + @Child(name = "value", type = {DecimalType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Numerical value (with implicit precision)", formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value." ) protected DecimalType value; /** * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value. */ - @Child(name="comparator", type={CodeType.class}, order=1, min=0, max=1) + @Child(name = "comparator", type = {CodeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="< | <= | >= | > - how to understand the value", formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is '<' , then the real value is < stated value." ) protected Enumeration comparator; /** * A human-readable form of the units. */ - @Child(name="units", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "units", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Unit representation", formalDefinition="A human-readable form of the units." ) protected StringType units; /** * The identification of the system that provides the coded form of the unit. */ - @Child(name="system", type={UriType.class}, order=3, min=0, max=1) + @Child(name = "system", type = {UriType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="System that defines coded unit form", formalDefinition="The identification of the system that provides the coded form of the unit." ) protected UriType system; /** * A computer processable form of the units in some unit representation system. */ - @Child(name="code", type={CodeType.class}, order=4, min=0, max=1) + @Child(name = "code", type = {CodeType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Coded form of the unit", formalDefinition="A computer processable form of the units in some unit representation system." ) protected CodeType code; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java index f6bc12288cc..1597961a15f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Questionnaire.java @@ -171,7 +171,7 @@ public class Questionnaire extends DomainResource { /** * Answer is a url (website, FTP site, etc.). */ - URL, + URL, /** * Answer is a choice from a list of options. */ @@ -217,8 +217,8 @@ public class Questionnaire extends DomainResource { return STRING; if ("text".equals(codeString)) return TEXT; - if ("url".equals(codeString)) - return URL; + if ("url".equals(codeString)) + return URL; if ("choice".equals(codeString)) return CHOICE; if ("open-choice".equals(codeString)) @@ -242,7 +242,8 @@ public class Questionnaire extends DomainResource { case TIME: return "time"; case STRING: return "string"; case TEXT: return "text"; - case URL: return "url"; + case URL: + return "url"; case CHOICE: return "choice"; case OPENCHOICE: return "open-choice"; case ATTACHMENT: return "attachment"; @@ -262,7 +263,8 @@ public class Questionnaire extends DomainResource { case TIME: return ""; case STRING: return ""; case TEXT: return ""; - case URL: return ""; + case URL: + return ""; case CHOICE: return ""; case OPENCHOICE: return ""; case ATTACHMENT: return ""; @@ -282,7 +284,8 @@ public class Questionnaire extends DomainResource { case TIME: return "Answer is a time independent of date."; case STRING: return "Answer is a short (few words to short sentence) free-text entry."; case TEXT: return "Answer is a long (potentially multi-paragram) free-text entry."; - case URL: return "Answer is a url (website, FTP site, etc.)."; + case URL: + return "Answer is a url (website, FTP site, etc.)."; case CHOICE: return "Answer is a choice from a list of options."; case OPENCHOICE: return "Answer is a choice from a list of options or a free-text entry."; case ATTACHMENT: return "Answer is binary content such as a image, PDF, etc."; @@ -302,7 +305,8 @@ public class Questionnaire extends DomainResource { case TIME: return "time"; case STRING: return "string"; case TEXT: return "text"; - case URL: return "url"; + case URL: + return "url"; case CHOICE: return "choice"; case OPENCHOICE: return "open-choice"; case ATTACHMENT: return "attachment"; @@ -337,7 +341,7 @@ public class Questionnaire extends DomainResource { if ("text".equals(codeString)) return AnswerFormat.TEXT; if ("url".equals(codeString)) - return AnswerFormat.URL; + return AnswerFormat.URL; if ("choice".equals(codeString)) return AnswerFormat.CHOICE; if ("open-choice".equals(codeString)) @@ -369,8 +373,8 @@ public class Questionnaire extends DomainResource { return "string"; if (code == AnswerFormat.TEXT) return "text"; - if (code == AnswerFormat.URL) - return "url"; + if (code == AnswerFormat.URL) + return "url"; if (code == AnswerFormat.CHOICE) return "choice"; if (code == AnswerFormat.OPENCHOICE) @@ -866,7 +870,7 @@ public class Questionnaire extends DomainResource { * The actual question as shown to the user to prompt them for an answer. */ @Child(name="text", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="The actual question as shown to the user to prompt them for an answer." ) + @Description(shortDefinition = "Text of the question as it is shown to the user", formalDefinition = "The actual question as shown to the user to prompt them for an answer.") protected StringType text; /** @@ -880,14 +884,14 @@ public class Questionnaire extends DomainResource { * If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire. */ @Child(name="required", type={BooleanType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Must question be answered in data results?", formalDefinition="If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire." ) + @Description(shortDefinition = "Must question be answered in data results?", formalDefinition = "If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.") protected BooleanType required; /** * If true, the question may have more than one answer. */ @Child(name="repeats", type={BooleanType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Can question have multiple answers?", formalDefinition="If true, the question may have more than one answer." ) + @Description(shortDefinition = "Can question have multiple answers?", formalDefinition = "If true, the question may have more than one answer.") protected BooleanType repeats; /** @@ -1260,10 +1264,10 @@ public class Questionnaire extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("linkId", "string", "An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireAnswers]]] resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); childrenList.add(new Property("concept", "Coding", "Identifies a how this question is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); - childrenList.add(new Property("text", "string", "The actual question as shown to the user to prompt them for an answer.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("text", "string", "The actual question as shown to the user to prompt them for an answer.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("type", "code", "The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("required", "boolean", "If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); - childrenList.add(new Property("repeats", "boolean", "If true, the question may have more than one answer.", 0, java.lang.Integer.MAX_VALUE, repeats)); + childrenList.add(new Property("required", "boolean", "If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("repeats", "boolean", "If true, the question may have more than one answer.", 0, java.lang.Integer.MAX_VALUE, repeats)); childrenList.add(new Property("options", "Reference(ValueSet)", "Reference to a valueset containing the possible options.", 0, java.lang.Integer.MAX_VALUE, options)); childrenList.add(new Property("group", "@Questionnaire.group", "Nested group, containing nested question for this question. The order of groups within the question is relevant.", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -1325,49 +1329,49 @@ public class Questionnaire extends DomainResource { /** * This records identifiers associated with this question set that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this questionnaire", formalDefinition="This records identifiers associated with this question set that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of Questionnaire", formalDefinition="The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated." ) protected StringType version; /** * The lifecycle status of the questionnaire as a whole. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="draft | published | retired", formalDefinition="The lifecycle status of the questionnaire as a whole." ) protected Enumeration status; /** * The date that this questionnaire was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Date this version was authored", formalDefinition="The date that this questionnaire was last changed." ) protected DateTimeType date; /** * Organization or person responsible for developing and maintaining the questionnaire. */ - @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Organization/individual who designed the questionnaire", formalDefinition="Organization or person responsible for developing and maintaining the questionnaire." ) + @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) + @Description(shortDefinition = "Organization/individual who designed the questionnaire", formalDefinition = "Organization or person responsible for developing and maintaining the questionnaire.") protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) + @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) + @Description(shortDefinition = "Contact information of the publisher", formalDefinition = "Contact details to assist a user in finding and communicating with the publisher.") protected List telecom; /** * A collection of related questions (or further groupings of questions). */ - @Child(name="group", type={}, order=6, min=1, max=1) + @Child(name = "group", type = {}, order = 6, min = 1, max = 1) @Description(shortDefinition="Grouped questions", formalDefinition="A collection of related questions (or further groupings of questions)." ) protected GroupComponent group; @@ -1608,19 +1612,19 @@ public class Questionnaire extends DomainResource { /** * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; } - public boolean hasTelecom() { - if (this.telecom == null) + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; return false; - for (ContactPoint item : this.telecom) - if (!item.isEmpty()) - return true; - return false; } /** @@ -1628,11 +1632,11 @@ public class Questionnaire extends DomainResource { */ // syntactic sugar public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); - return t; + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; } /** @@ -1665,8 +1669,8 @@ public class Questionnaire extends DomainResource { childrenList.add(new Property("version", "string", "The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("date", "dateTime", "The date that this questionnaire was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("group", "", "A collection of related questions (or further groupings of questions).", 0, java.lang.Integer.MAX_VALUE, group)); } @@ -1682,11 +1686,12 @@ public class Questionnaire extends DomainResource { dst.status = status == null ? null : status.copy(); dst.date = date == null ? null : date.copy(); dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); - }; + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + } + ; dst.group = group == null ? null : group.copy(); return dst; } @@ -1703,8 +1708,8 @@ public class Questionnaire extends DomainResource { return false; Questionnaire o = (Questionnaire) other; return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(status, o.status, true) - && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(group, o.group, true); + && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(group, o.group, true); } @Override @@ -1721,7 +1726,7 @@ public class Questionnaire extends DomainResource { public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (group == null || group.isEmpty()); + && (telecom == null || telecom.isEmpty()) && (group == null || group.isEmpty()); } @Override @@ -1733,16 +1738,16 @@ public class Questionnaire extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="code", path="Questionnaire.group.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token" ) - public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "code", path = "Questionnaire.group.concept", description = "A code that corresponds to the questionnaire or one of its groups", type = "token") + public static final String SP_CODE = "code"; @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="The author of the questionnaire", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="title", path="", description="All or part of the name of the questionnaire (title for the root group of the questionnaire)", type="string" ) - public static final String SP_TITLE = "title"; - @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string" ) - public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "title", path = "", description = "All or part of the name of the questionnaire (title for the root group of the questionnaire)", type = "string") + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name = "version", path = "Questionnaire.version", description = "The business version of the questionnaire", type = "string") + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name = "status", path = "Questionnaire.status", description = "The status of the questionnaire", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java index 414cf94de59..e30db9ca0aa 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/QuestionnaireAnswers.java @@ -506,7 +506,7 @@ public class QuestionnaireAnswers extends DomainResource { * The actual question as shown to the user to prompt them for an answer. */ @Child(name="text", type={StringType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Text of the question as it is shown to the user", formalDefinition="The actual question as shown to the user to prompt them for an answer." ) + @Description(shortDefinition = "Text of the question as it is shown to the user", formalDefinition = "The actual question as shown to the user to prompt them for an answer.") protected StringType text; /** @@ -746,8 +746,8 @@ public class QuestionnaireAnswers extends DomainResource { /** * The answer (or one of the answers) provided by the respondant to the question. */ - @Child(name="value", type={BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=1, min=0, max=1) - @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondant to the question." ) + @Child(name = "value", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order = 1, min = 0, max = 1) + @Description(shortDefinition = "Single-valued answer to the question", formalDefinition = "The answer (or one of the answers) provided by the respondant to the question.") protected Type value; private static final long serialVersionUID = -732981989L; @@ -838,23 +838,23 @@ public class QuestionnaireAnswers extends DomainResource { /** * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ - public UriType getValueUriType() throws Exception { + public UriType getValueUriType() throws Exception { if (!(this.value instanceof UriType)) - throw new Exception("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); + throw new Exception("Type mismatch: the type UriType was expected, but " + this.value.getClass().getName() + " was encountered"); return (UriType) this.value; } - /** - * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) - */ + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + */ public Attachment getValueAttachment() throws Exception { if (!(this.value instanceof Attachment)) throw new Exception("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); return (Attachment) this.value; } - /** - * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Coding getValueCoding() throws Exception { if (!(this.value instanceof Coding)) @@ -862,8 +862,8 @@ public class QuestionnaireAnswers extends DomainResource { return (Coding) this.value; } - /** - * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Quantity getValueQuantity() throws Exception { if (!(this.value instanceof Quantity)) @@ -871,8 +871,8 @@ public class QuestionnaireAnswers extends DomainResource { return (Quantity) this.value; } - /** - * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public Reference getValueReference() throws Exception { if (!(this.value instanceof Reference)) @@ -884,8 +884,8 @@ public class QuestionnaireAnswers extends DomainResource { return this.value != null && !this.value.isEmpty(); } - /** - * @param value {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) + /** + * @param value {@link #value} (The answer (or one of the answers) provided by the respondant to the question.) */ public QuestionAnswerComponent setValue(Type value) { this.value = value; @@ -933,14 +933,14 @@ public class QuestionnaireAnswers extends DomainResource { /** * A business identifier assigned to a particular completed (or partially completed) questionnaire. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Unique id for this set of answers", formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) protected Identifier identifier; /** * Indicates the Questionnaire resource that defines the form for which answers are being provided. */ - @Child(name="questionnaire", type={Questionnaire.class}, order=1, min=0, max=1) + @Child(name = "questionnaire", type = {Questionnaire.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Form being answered", formalDefinition="Indicates the Questionnaire resource that defines the form for which answers are being provided." ) protected Reference questionnaire; @@ -952,14 +952,14 @@ public class QuestionnaireAnswers extends DomainResource { /** * The lifecycle status of the questionnaire answers as a whole. */ - @Child(name="status", type={CodeType.class}, order=2, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="in-progress | completed | amended", formalDefinition="The lifecycle status of the questionnaire answers as a whole." ) protected Enumeration status; /** * The subject of the questionnaire answers. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information. */ - @Child(name="subject", type={}, order=3, min=0, max=1) + @Child(name = "subject", type = {}, order = 3, min = 0, max = 1) @Description(shortDefinition="The subject of the questions", formalDefinition="The subject of the questionnaire answers. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information." ) protected Reference subject; @@ -971,7 +971,7 @@ public class QuestionnaireAnswers extends DomainResource { /** * Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the system. */ - @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1) + @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Person who received and recorded the answers", formalDefinition="Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the system." ) protected Reference author; @@ -983,26 +983,26 @@ public class QuestionnaireAnswers extends DomainResource { /** * The date and/or time that this version of the questionnaire answers was authored. */ - @Child(name="authored", type={DateTimeType.class}, order=5, min=1, max=1) + @Child(name = "authored", type = {DateTimeType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="Date this version was authored", formalDefinition="The date and/or time that this version of the questionnaire answers was authored." ) protected DateTimeType authored; - /** - * The person who answered the questions about the subject. - */ - @Child(name="source", type={Patient.class, Practitioner.class, RelatedPerson.class}, order=6, min=0, max=1) - @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject." ) + /** + * The person who answered the questions about the subject. + */ + @Child(name = "source", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order = 6, min = 0, max = 1) + @Description(shortDefinition = "The person who answered the questions", formalDefinition = "The person who answered the questions about the subject.") protected Reference source; - /** - * The actual object that is the target of the reference (The person who answered the questions about the subject.) + /** + * The actual object that is the target of the reference (The person who answered the questions about the subject.) */ protected Resource sourceTarget; /** * Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers. */ - @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Primary encounter during which the answers were collected", formalDefinition="Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers." ) protected Reference encounter; @@ -1014,7 +1014,7 @@ public class QuestionnaireAnswers extends DomainResource { /** * A group of questions to a possibly similarly grouped set of questions in the questionnaire answers. */ - @Child(name="group", type={}, order=8, min=0, max=1) + @Child(name = "group", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Grouped questions", formalDefinition="A group of questions to a possibly similarly grouped set of questions in the questionnaire answers." ) protected GroupComponent group; @@ -1266,8 +1266,8 @@ public class QuestionnaireAnswers extends DomainResource { return this; } - /** - * @return {@link #source} (The person who answered the questions about the subject.) + /** + * @return {@link #source} (The person who answered the questions about the subject.) */ public Reference getSource() { if (this.source == null) @@ -1282,23 +1282,23 @@ public class QuestionnaireAnswers extends DomainResource { return this.source != null && !this.source.isEmpty(); } - /** - * @param value {@link #source} (The person who answered the questions about the subject.) + /** + * @param value {@link #source} (The person who answered the questions about the subject.) */ public QuestionnaireAnswers setSource(Reference value) { this.source = value; return this; } - /** - * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) */ public Resource getSourceTarget() { return this.sourceTarget; } - /** - * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) */ public QuestionnaireAnswers setSourceTarget(Resource value) { this.sourceTarget = value; @@ -1442,17 +1442,17 @@ public class QuestionnaireAnswers extends DomainResource { @SearchParamDefinition(name="authored", path="QuestionnaireAnswers.authored", description="When the questionnaire was authored", type="date" ) public static final String SP_AUTHORED = "authored"; - @SearchParamDefinition(name="questionnaire", path="QuestionnaireAnswers.questionnaire", description="The questionnaire the answers are provided for", type="reference" ) + @SearchParamDefinition(name = "questionnaire", path = "QuestionnaireAnswers.questionnaire", description = "The questionnaire the answers are provided for", type = "reference") public static final String SP_QUESTIONNAIRE = "questionnaire"; @SearchParamDefinition(name="subject", path="QuestionnaireAnswers.subject", description="The subject of the questionnaire", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="author", path="QuestionnaireAnswers.author", description="The author of the questionnaire", type="reference" ) + @SearchParamDefinition(name = "author", path = "QuestionnaireAnswers.author", description = "The author of the questionnaire", type = "reference") public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="patient", path="QuestionnaireAnswers.subject", description="The patient that is the subject of the questionnaire", type="reference" ) + @SearchParamDefinition(name = "patient", path = "QuestionnaireAnswers.subject", description = "The patient that is the subject of the questionnaire", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="encounter", path="QuestionnaireAnswers.encounter", description="Encounter during which questionnaire was authored", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; - @SearchParamDefinition(name="status", path="QuestionnaireAnswers.status", description="The status of the questionnaire answers", type="token" ) + @SearchParamDefinition(name = "status", path = "QuestionnaireAnswers.status", description = "The status of the questionnaire answers", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java index e525afa6695..9ec5d104bd9 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Range.java @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A set of ordered Quantities defined by a low and high limit. */ @DatatypeDef(name="Range") -public class Range extends Type implements ICompositeType { +public class Range extends Type implements ICompositeType { /** * The low limit. The boundary is inclusive. */ - @Child(name="low", type={Quantity.class}, order=0, min=0, max=1) + @Child(name = "low", type = {Quantity.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Low limit", formalDefinition="The low limit. The boundary is inclusive." ) protected Quantity low; /** * The high limit. The boundary is inclusive. */ - @Child(name="high", type={Quantity.class}, order=1, min=0, max=1) + @Child(name = "high", type = {Quantity.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="High limit", formalDefinition="The high limit. The boundary is inclusive." ) protected Quantity high; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java index a544f4bdf92..30ffc09c6a7 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Ratio.java @@ -40,19 +40,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A relationship of two Quantity values - expressed as a numerator and a denominator. */ @DatatypeDef(name="Ratio") -public class Ratio extends Type implements ICompositeType { +public class Ratio extends Type implements ICompositeType { /** * The value of the numerator. */ - @Child(name="numerator", type={Quantity.class}, order=0, min=0, max=1) + @Child(name = "numerator", type = {Quantity.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Numerator value", formalDefinition="The value of the numerator." ) protected Quantity numerator; /** * The value of the denominator. */ - @Child(name="denominator", type={Quantity.class}, order=1, min=0, max=1) + @Child(name = "denominator", type = {Quantity.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Denominator value", formalDefinition="The value of the denominator." ) protected Quantity denominator; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java index 963adddb036..912323d79a3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java @@ -151,35 +151,35 @@ public class Readjudicate extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -191,7 +191,7 @@ public class Readjudicate extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -203,7 +203,7 @@ public class Readjudicate extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -215,7 +215,7 @@ public class Readjudicate extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=7, min=0, max=1) + @Child(name = "request", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -227,7 +227,7 @@ public class Readjudicate extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=8, min=0, max=1) + @Child(name = "response", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -239,14 +239,14 @@ public class Readjudicate extends DomainResource { /** * A reference to supply which authenticated the process. */ - @Child(name="reference", type={StringType.class}, order=9, min=0, max=1) + @Child(name = "reference", type = {StringType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticated the process." ) protected StringType reference; /** * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. */ - @Child(name="item", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) protected List item; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java index 22a11aa7110..64b9fa2083a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reference.java @@ -47,70 +47,70 @@ import org.hl7.fhir.utilities.Utilities; public class Reference extends Type implements IReference, ICompositeType { - /** - * Constructor - */ - public Reference() { - super(); - } + /** + * Constructor + */ + public Reference() { + super(); + } - /** - * Constructor - */ - public Reference(IAnyResource theResource) { - this.resource = theResource; - } + /** + * Constructor + */ + public Reference(IAnyResource theResource) { + this.resource = theResource; + } - /** - * Constructor - */ - public Reference(StringType theReference) { - this.reference = theReference; - } + /** + * Constructor + */ + public Reference(StringType theReference) { + this.reference = theReference; + } - /** - * Constructor - */ - public Reference(String theReference) { - if (StringUtils.isNotBlank(theReference)) { - this.reference = new StringType(theReference); - } - } + /** + * Constructor + */ + public Reference(String theReference) { + if (StringUtils.isNotBlank(theReference)) { + this.reference = new StringType(theReference); + } + } + + /** + * This is not a part of the "wire format" resource, but can be changed/accessed by parsers + */ + private transient IAnyResource resource; - /** - * This is not a part of the "wire format" resource, but can be changed/accessed by parsers - */ - private transient IAnyResource resource; - /** * Retrieves the actual resource referenced by this reference. Note that the resource itself is not * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property * may be changed/accessed by parsers. */ public IAnyResource getResource() { - return resource; - } + return resource; + } /** * Sets the actual resource referenced by this reference. Note that the resource itself is not * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property * may be changed/accessed by parsers. */ - public void setResource(IAnyResource theResource) { - resource = theResource; - } + public void setResource(IAnyResource theResource) { + resource = theResource; + } - /** + /** * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. */ - @Child(name="reference", type={StringType.class}, order=0, min=0, max=1) + @Child(name = "reference", type = {StringType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Relative, internal or absolute URL reference", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) protected StringType reference; /** * Plain text narrative that identifies the resource in addition to the resource reference. */ - @Child(name="display", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "display", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) protected StringType display; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java index 5d97755f403..4f8795fa9b3 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ReferralRequest.java @@ -176,42 +176,42 @@ public class ReferralRequest extends DomainResource { /** * The workflow status of the referral or transfer of care request. */ - @Child(name="status", type={CodeType.class}, order=0, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="draft | sent | active | cancelled | refused | completed", formalDefinition="The workflow status of the referral or transfer of care request." ) protected Enumeration status; /** * Business Id that uniquely identifies the referral/care transfer request instance. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Identifier of request", formalDefinition="Business Id that uniquely identifies the referral/care transfer request instance." ) protected List identifier; /** * An indication of the type of referral (or where applicable the type of transfer of care) request. */ - @Child(name="type", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Referral/Transition of care request type", formalDefinition="An indication of the type of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept type; /** * Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. */ - @Child(name="specialty", type={CodeableConcept.class}, order=3, min=0, max=1) + @Child(name = "specialty", type = {CodeableConcept.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The clinical specialty (discipline) that the referral is requested for", formalDefinition="Indication of the clinical domain or discipline to which the referral or transfer of care request is sent." ) protected CodeableConcept specialty; /** * An indication of the urgency of referral (or where applicable the type of transfer of care) request. */ - @Child(name="priority", type={CodeableConcept.class}, order=4, min=0, max=1) + @Child(name = "priority", type = {CodeableConcept.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Urgency of referral / transfer of care request", formalDefinition="An indication of the urgency of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept priority; /** * The patient who is the subject of a referral or transfer of care request. */ - @Child(name="patient", type={Patient.class}, order=5, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Patient referred to care or transfer", formalDefinition="The patient who is the subject of a referral or transfer of care request." ) protected Reference patient; @@ -223,7 +223,7 @@ public class ReferralRequest extends DomainResource { /** * The healthcare provider or provider organization who/which initaited the referral/transfer of care request. Can also be Patient (a self referral). */ - @Child(name="requester", type={Practitioner.class, Organization.class, Patient.class}, order=6, min=0, max=1) + @Child(name = "requester", type = {Practitioner.class, Organization.class, Patient.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Requester of referral / transfer of care", formalDefinition="The healthcare provider or provider organization who/which initaited the referral/transfer of care request. Can also be Patient (a self referral)." ) protected Reference requester; @@ -235,7 +235,7 @@ public class ReferralRequest extends DomainResource { /** * The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request. */ - @Child(name="recipient", type={Practitioner.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "recipient", type = {Practitioner.class, Organization.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Receiver of referral / transfer of care request", formalDefinition="The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request." ) protected List recipient; /** @@ -247,7 +247,7 @@ public class ReferralRequest extends DomainResource { /** * The encounter at which the request for referral or transfer of care is initiated. */ - @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Encounter", formalDefinition="The encounter at which the request for referral or transfer of care is initiated." ) protected Reference encounter; @@ -259,35 +259,35 @@ public class ReferralRequest extends DomainResource { /** * Date/DateTime the request for referral or transfer of care is sent by the author. */ - @Child(name="dateSent", type={DateTimeType.class}, order=9, min=0, max=1) + @Child(name = "dateSent", type = {DateTimeType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Date referral/transfer of care request is sent", formalDefinition="Date/DateTime the request for referral or transfer of care is sent by the author." ) protected DateTimeType dateSent; /** * Description of clinical condition indicating why referral/transfer of care is requested. */ - @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Reason for referral / Transfer of care request", formalDefinition="Description of clinical condition indicating why referral/transfer of care is requested." ) protected CodeableConcept reason; /** * The reason gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. */ - @Child(name="description", type={StringType.class}, order=11, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="A textual description of the referral", formalDefinition="The reason gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary." ) protected StringType description; /** * The service(s) that is/are requested to be provided to the patient. */ - @Child(name="serviceRequested", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "serviceRequested", type = {CodeableConcept.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Service(s) requested", formalDefinition="The service(s) that is/are requested to be provided to the patient." ) protected List serviceRequested; /** * Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. */ - @Child(name="supportingInformation", type={}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "supportingInformation", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additonal information to support referral or transfer of care request", formalDefinition="Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care." ) protected List supportingInformation; /** @@ -299,7 +299,7 @@ public class ReferralRequest extends DomainResource { /** * The period of time within which the services identified in the referral/transfer of care is specified or required to occur. */ - @Child(name="fulfillmentTime", type={Period.class}, order=14, min=0, max=1) + @Child(name = "fulfillmentTime", type = {Period.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Requested service(s) fulfillment time", formalDefinition="The period of time within which the services identified in the referral/transfer of care is specified or required to occur." ) protected Period fulfillmentTime; @@ -945,15 +945,15 @@ public class ReferralRequest extends DomainResource { @SearchParamDefinition(name="specialty", path="ReferralRequest.specialty", description="The specialty that the referral is for", type="token" ) public static final String SP_SPECIALTY = "specialty"; - @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference" ) + @SearchParamDefinition(name = "patient", path = "ReferralRequest.patient", description = "Who the referral is about", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="recipient", path="ReferralRequest.recipient", description="The person that the referral was sent to", type="reference" ) public static final String SP_RECIPIENT = "recipient"; - @SearchParamDefinition(name="type", path="ReferralRequest.type", description="The type of the referral", type="token" ) + @SearchParamDefinition(name = "type", path = "ReferralRequest.type", description = "The type of the referral", type = "token") public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="priority", path="ReferralRequest.priority", description="The priority assigned to the referral", type="token" ) + @SearchParamDefinition(name = "priority", path = "ReferralRequest.priority", description = "The priority assigned to the referral", type = "token") public static final String SP_PRIORITY = "priority"; - @SearchParamDefinition(name="status", path="ReferralRequest.status", description="The status of the referral", type="token" ) + @SearchParamDefinition(name = "status", path = "ReferralRequest.status", description = "The status of the referral", type = "token") public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java index 01cdafa5d79..477ece8d55d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RelatedPerson.java @@ -148,14 +148,14 @@ public class RelatedPerson extends DomainResource { /** * Identifier for a person within a particular scope. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A Human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) protected List identifier; /** * The patient this person is related to. */ - @Child(name="patient", type={Patient.class}, order=1, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="The patient this person is related to", formalDefinition="The patient this person is related to." ) protected Reference patient; @@ -167,49 +167,49 @@ public class RelatedPerson extends DomainResource { /** * The nature of the relationship between a patient and the related person. */ - @Child(name="relationship", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name = "relationship", type = {CodeableConcept.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="The nature of the relationship", formalDefinition="The nature of the relationship between a patient and the related person." ) protected CodeableConcept relationship; /** * A name associated with the person. */ - @Child(name="name", type={HumanName.class}, order=3, min=0, max=1) + @Child(name = "name", type = {HumanName.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) protected HumanName name; /** * A contact detail for the person, e.g. a telephone number or an email address. */ - @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) protected List telecom; /** * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. */ - @Child(name="gender", type={CodeType.class}, order=5, min=0, max=1) + @Child(name = "gender", type = {CodeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) protected Enumeration gender; /** * Address where the related person can be contacted or visited. */ - @Child(name="address", type={Address.class}, order=6, min=0, max=1) + @Child(name = "address", type = {Address.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Address where the related person can be contacted or visited", formalDefinition="Address where the related person can be contacted or visited." ) protected Address address; /** * Image of the person. */ - @Child(name="photo", type={Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "photo", type = {Attachment.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) protected List photo; /** * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown. */ - @Child(name="period", type={Period.class}, order=8, min=0, max=1) + @Child(name = "period", type = {Period.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Period of time that this relationship is considered valid", formalDefinition="The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown." ) protected Period period; @@ -582,15 +582,15 @@ public class RelatedPerson extends DomainResource { return ResourceType.RelatedPerson; } - @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token" ) + @SearchParamDefinition(name = "identifier", path = "RelatedPerson.identifier", description = "A patient Identifier", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) public static final String SP_PHONETIC = "phonetic"; @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string" ) public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token" ) + @SearchParamDefinition(name = "gender", path = "RelatedPerson.gender", description = "Gender of the person", type = "token") public static final String SP_GENDER = "gender"; - @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" ) + @SearchParamDefinition(name = "patient", path = "RelatedPerson.patient", description = "The patient this person is related to", type = "reference") public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string" ) public static final String SP_NAME = "name"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java index 268fb0fba41..bcfa6fe669c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Resource.java @@ -49,28 +49,28 @@ public abstract class Resource extends Base implements IAnyResource { /** * The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes. */ - @Child(name="id", type={IdType.class}, order=0, min=0, max=1) + @Child(name = "id", type = {IdType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Logical id of this artefact", formalDefinition="The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes." ) protected IdType id; /** * The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ - @Child(name="meta", type={Meta.class}, order=1, min=0, max=1) + @Child(name = "meta", type = {Meta.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Metadata about the resource", formalDefinition="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource." ) protected Meta meta; /** * A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. */ - @Child(name="implicitRules", type={UriType.class}, order=2, min=0, max=1) + @Child(name = "implicitRules", type = {UriType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="A set of rules under which this content was created", formalDefinition="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content." ) protected UriType implicitRules; /** * The base language in which the resource is written. */ - @Child(name="language", type={CodeType.class}, order=3, min=0, max=1) + @Child(name = "language", type = {CodeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Language of the resource content", formalDefinition="The base language in which the resource is written." ) protected CodeType language; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java index 87c164e03c0..92b3d700f8c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java @@ -111,206 +111,206 @@ public enum ResourceType { switch (this) { case Appointment: return "appointment"; - case ReferralRequest: - return "referralrequest"; - case OralHealthClaim: - return "oralhealthclaim"; - case DocumentManifest: - return "documentmanifest"; - case Goal: - return "goal"; - case EnrollmentRequest: - return "enrollmentrequest"; - case FamilyHistory: - return "familyhistory"; - case Medication: - return "medication"; - case Subscription: - return "subscription"; - case DocumentReference: - return "documentreference"; - case SecurityEvent: - return "securityevent"; - case Conformance: - return "conformance"; - case RelatedPerson: - return "relatedperson"; - case Practitioner: - return "practitioner"; + case ReferralRequest: + return "referralrequest"; + case OralHealthClaim: + return "oralhealthclaim"; + case DocumentManifest: + return "documentmanifest"; + case Goal: + return "goal"; + case EnrollmentRequest: + return "enrollmentrequest"; + case FamilyHistory: + return "familyhistory"; + case Medication: + return "medication"; + case Subscription: + return "subscription"; + case DocumentReference: + return "documentreference"; + case SecurityEvent: + return "securityevent"; + case Conformance: + return "conformance"; + case RelatedPerson: + return "relatedperson"; + case Practitioner: + return "practitioner"; case Slot: return "slot"; case Contraindication: return "contraindication"; - case Contract: - return "contract"; - case Person: - return "person"; - case RiskAssessment: - return "riskassessment"; - case Group: - return "group"; - case PaymentNotice: - return "paymentnotice"; - case Organization: - return "organization"; - case Supply: - return "supply"; - case ImagingStudy: - return "imagingstudy"; + case Contract: + return "contract"; + case Person: + return "person"; + case RiskAssessment: + return "riskassessment"; + case Group: + return "group"; + case PaymentNotice: + return "paymentnotice"; + case Organization: + return "organization"; + case Supply: + return "supply"; + case ImagingStudy: + return "imagingstudy"; case Profile: return "profile"; - case DeviceComponent: - return "devicecomponent"; - case Encounter: - return "encounter"; - case Substance: - return "substance"; - case SearchParameter: - return "searchparameter"; - case Communication: - return "communication"; + case DeviceComponent: + return "devicecomponent"; + case Encounter: + return "encounter"; + case Substance: + return "substance"; + case SearchParameter: + return "searchparameter"; + case Communication: + return "communication"; case OrderResponse: return "orderresponse"; case StatusResponse: return "statusresponse"; - case VisionClaim: - return "visionclaim"; - case DeviceUseStatement: - return "deviceusestatement"; + case VisionClaim: + return "visionclaim"; + case DeviceUseStatement: + return "deviceusestatement"; case Reversal: return "reversal"; - case MessageHeader: - return "messageheader"; - case PharmacyClaim: - return "pharmacyclaim"; - case ImmunizationRecommendation: - return "immunizationrecommendation"; - case Other: - return "other"; + case MessageHeader: + return "messageheader"; + case PharmacyClaim: + return "pharmacyclaim"; + case ImmunizationRecommendation: + return "immunizationrecommendation"; + case Other: + return "other"; case BodySite: return "bodysite"; - case Provenance: - return "provenance"; - case Questionnaire: - return "questionnaire"; - case ProfessionalClaim: - return "professionalclaim"; + case Provenance: + return "provenance"; + case Questionnaire: + return "questionnaire"; + case ProfessionalClaim: + return "professionalclaim"; case ExplanationOfBenefit: return "explanationofbenefit"; case InstitutionalClaim: return "institutionalclaim"; - case Specimen: - return "specimen"; - case AllergyIntolerance: - return "allergyintolerance"; - case CarePlan: - return "careplan"; - case StructureDefinition: - return "structuredefinition"; - case EpisodeOfCare: - return "episodeofcare"; + case Specimen: + return "specimen"; + case AllergyIntolerance: + return "allergyintolerance"; + case CarePlan: + return "careplan"; + case StructureDefinition: + return "structuredefinition"; + case EpisodeOfCare: + return "episodeofcare"; case MedicationPrescription: return "medicationprescription"; case OperationOutcome: return "operationoutcome"; - case Procedure: - return "procedure"; - case List: - return "list"; - case ConceptMap: - return "conceptmap"; - case ValueSet: - return "valueset"; - case OperationDefinition: - return "operationdefinition"; - case Order: - return "order"; + case Procedure: + return "procedure"; + case List: + return "list"; + case ConceptMap: + return "conceptmap"; + case ValueSet: + return "valueset"; + case OperationDefinition: + return "operationdefinition"; + case Order: + return "order"; case Immunization: return "immunization"; case Device: return "device"; - case VisionPrescription: - return "visionprescription"; - case Media: - return "media"; - case ProcedureRequest: - return "procedurerequest"; - case EligibilityResponse: - return "eligibilityresponse"; - case DeviceUseRequest: - return "deviceuserequest"; - case DeviceMetric: - return "devicemetric"; - case AppointmentResponse: - return "appointmentresponse"; - case Observation: - return "observation"; + case VisionPrescription: + return "visionprescription"; + case Media: + return "media"; + case ProcedureRequest: + return "procedurerequest"; + case EligibilityResponse: + return "eligibilityresponse"; + case DeviceUseRequest: + return "deviceuserequest"; + case DeviceMetric: + return "devicemetric"; + case AppointmentResponse: + return "appointmentresponse"; + case Observation: + return "observation"; case MedicationAdministration: return "medicationadministration"; - case EnrollmentResponse: - return "enrollmentresponse"; - case Binary: - return "binary"; - case MedicationStatement: - return "medicationstatement"; - case CommunicationRequest: - return "communicationrequest"; + case EnrollmentResponse: + return "enrollmentresponse"; + case Binary: + return "binary"; + case MedicationStatement: + return "medicationstatement"; + case CommunicationRequest: + return "communicationrequest"; case PendedRequest: return "pendedrequest"; case Basic: return "basic"; - case StatusRequest: - return "statusrequest"; - case ClaimResponse: - return "claimresponse"; - case EligibilityRequest: - return "eligibilityrequest"; - case MedicationDispense: - return "medicationdispense"; - case DiagnosticReport: - return "diagnosticreport"; - case ImagingObjectSelection: - return "imagingobjectselection"; - case HealthcareService: - return "healthcareservice"; + case StatusRequest: + return "statusrequest"; + case ClaimResponse: + return "claimresponse"; + case EligibilityRequest: + return "eligibilityrequest"; + case MedicationDispense: + return "medicationdispense"; + case DiagnosticReport: + return "diagnosticreport"; + case ImagingObjectSelection: + return "imagingobjectselection"; + case HealthcareService: + return "healthcareservice"; case CarePlan2: return "careplan2"; - case DataElement: - return "dataelement"; - case ClinicalAssessment: - return "clinicalassessment"; - case QuestionnaireAnswers: - return "questionnaireanswers"; - case Readjudicate: - return "readjudicate"; - case NutritionOrder: - return "nutritionorder"; - case PaymentReconciliation: - return "paymentreconciliation"; - case Condition: - return "condition"; - case Composition: - return "composition"; - case Bundle: - return "bundle"; + case DataElement: + return "dataelement"; + case ClinicalAssessment: + return "clinicalassessment"; + case QuestionnaireAnswers: + return "questionnaireanswers"; + case Readjudicate: + return "readjudicate"; + case NutritionOrder: + return "nutritionorder"; + case PaymentReconciliation: + return "paymentreconciliation"; + case Condition: + return "condition"; + case Composition: + return "composition"; + case Bundle: + return "bundle"; case DiagnosticOrder: return "diagnosticorder"; - case Patient: - return "patient"; - case Coverage: - return "coverage"; - case ExtensionDefinition: - return "extensiondefinition"; - case NamingSystem: - return "namingsystem"; - case Schedule: - return "schedule"; - case SupportingDocumentation: - return "supportingdocumentation"; - case Alert: - return "alert"; - case Location: - return "location"; + case Patient: + return "patient"; + case Coverage: + return "coverage"; + case ExtensionDefinition: + return "extensiondefinition"; + case NamingSystem: + return "namingsystem"; + case Schedule: + return "schedule"; + case SupportingDocumentation: + return "supportingdocumentation"; + case Alert: + return "alert"; + case Location: + return "location"; case Parameters: return "parameters"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java index e75201ff3d8..6344b855186 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java @@ -616,35 +616,35 @@ public class Reversal extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -656,7 +656,7 @@ public class Reversal extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -668,7 +668,7 @@ public class Reversal extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -680,7 +680,7 @@ public class Reversal extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class, SupportingDocumentation.class}, order=7, min=0, max=1) + @Child(name = "request", type = {OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class, SupportingDocumentation.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -692,7 +692,7 @@ public class Reversal extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={ClaimResponse.class, StatusResponse.class}, order=8, min=0, max=1) + @Child(name = "response", type = {ClaimResponse.class, StatusResponse.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; @@ -704,21 +704,21 @@ public class Reversal extends DomainResource { /** * Payee information supplied for matching purposes. */ - @Child(name="payee", type={}, order=9, min=0, max=1) + @Child(name = "payee", type = {}, order = 9, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="Payee information supplied for matching purposes." ) protected PayeeComponent payee; /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=10, min=1, max=1) + @Child(name = "coverage", type = {}, order = 10, min = 1, max = 1) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected ReversalCoverageComponent coverage; /** * If true remove all history excluding audit. */ - @Child(name="nullify", type={BooleanType.class}, order=11, min=1, max=1) + @Child(name = "nullify", type = {BooleanType.class}, order = 11, min = 1, max = 1) @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) protected BooleanType nullify; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java index 2310bd52074..9b88605cd44 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/RiskAssessment.java @@ -352,7 +352,7 @@ public class RiskAssessment extends DomainResource { /** * The patient or group the risk assessment applies to. */ - @Child(name="subject", type={Patient.class, Group.class}, order=0, min=0, max=1) + @Child(name = "subject", type = {Patient.class, Group.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) protected Reference subject; @@ -364,14 +364,14 @@ public class RiskAssessment extends DomainResource { /** * The date (and possibly time) the risk assessment was performed. */ - @Child(name="date", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) protected DateTimeType date; /** * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. */ - @Child(name="condition", type={Condition.class}, order=2, min=0, max=1) + @Child(name = "condition", type = {Condition.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) protected Reference condition; @@ -383,7 +383,7 @@ public class RiskAssessment extends DomainResource { /** * The provider or software application that performed the assessment. */ - @Child(name="performer", type={Practitioner.class, Device.class}, order=3, min=0, max=1) + @Child(name = "performer", type = {Practitioner.class, Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) protected Reference performer; @@ -395,21 +395,21 @@ public class RiskAssessment extends DomainResource { /** * Business identifier assigned to the risk assessment. */ - @Child(name="identifier", type={Identifier.class}, order=4, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) protected Identifier identifier; /** * The algorithm, processs or mechanism used to evaluate the risk. */ - @Child(name="method", type={CodeableConcept.class}, order=5, min=0, max=1) + @Child(name = "method", type = {CodeableConcept.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, processs or mechanism used to evaluate the risk." ) protected CodeableConcept method; /** * Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.). */ - @Child(name="basis", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "basis", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.)." ) protected List basis; /** @@ -421,14 +421,14 @@ public class RiskAssessment extends DomainResource { /** * Describes the expected outcome for the subject. */ - @Child(name="prediction", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "prediction", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) protected List prediction; /** * A description of the steps that might be taken to reduce the identified risk(s). */ - @Child(name="mitigation", type={StringType.class}, order=8, min=0, max=1) + @Child(name = "mitigation", type = {StringType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) protected StringType mitigation; @@ -851,9 +851,9 @@ public class RiskAssessment extends DomainResource { return ResourceType.RiskAssessment; } - @SearchParamDefinition(name="date", path="RiskAssessment.date", description="When was assessment made?", type="date" ) + @SearchParamDefinition(name = "date", path = "RiskAssessment.date", description = "When was assessment made?", type = "date") public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="RiskAssessment.identifier", description="Unique identifier for the assessment", type="token" ) + @SearchParamDefinition(name = "identifier", path = "RiskAssessment.identifier", description = "Unique identifier for the assessment", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference" ) public static final String SP_CONDITION = "condition"; @@ -861,9 +861,9 @@ public class RiskAssessment extends DomainResource { public static final String SP_PERFORMER = "performer"; @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) public static final String SP_METHOD = "method"; - @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + @SearchParamDefinition(name = "subject", path = "RiskAssessment.subject", description = "Who/what does assessment apply to?", type = "reference") public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + @SearchParamDefinition(name = "patient", path = "RiskAssessment.subject", description = "Who/what does assessment apply to?", type = "reference") public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java index 79fcb1df91c..66ea0456371 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SampledData.java @@ -42,54 +42,54 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. */ @DatatypeDef(name="SampledData") -public class SampledData extends Type implements ICompositeType { +public class SampledData extends Type implements ICompositeType { /** * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series. */ - @Child(name="origin", type={Quantity.class}, order=0, min=1, max=1) + @Child(name = "origin", type = {Quantity.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Zero value and units", formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." ) protected Quantity origin; /** * The length of time between sampling times, measured in milliseconds. */ - @Child(name="period", type={DecimalType.class}, order=1, min=1, max=1) + @Child(name = "period", type = {DecimalType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Number of milliseconds between samples", formalDefinition="The length of time between sampling times, measured in milliseconds." ) protected DecimalType period; /** * A correction factor that is applied to the sampled data points before they are added to the origin. */ - @Child(name="factor", type={DecimalType.class}, order=2, min=0, max=1) + @Child(name = "factor", type = {DecimalType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Multiply data by this before adding to origin", formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin." ) protected DecimalType factor; /** * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). */ - @Child(name="lowerLimit", type={DecimalType.class}, order=3, min=0, max=1) + @Child(name = "lowerLimit", type = {DecimalType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Lower limit of detection", formalDefinition="The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit)." ) protected DecimalType lowerLimit; /** * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). */ - @Child(name="upperLimit", type={DecimalType.class}, order=4, min=0, max=1) + @Child(name = "upperLimit", type = {DecimalType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Upper limit of detection", formalDefinition="The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit)." ) protected DecimalType upperLimit; /** * The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once. */ - @Child(name="dimensions", type={IntegerType.class}, order=5, min=1, max=1) + @Child(name = "dimensions", type = {IntegerType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="Number of sample points at each time point", formalDefinition="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." ) protected IntegerType dimensions; /** * A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. */ - @Child(name="data", type={StringType.class}, order=6, min=1, max=1) + @Child(name = "data", type = {StringType.class}, order = 6, min = 1, max = 1) @Description(shortDefinition="Decimal values with spaces, or 'E' | 'U' | 'L'", formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value." ) protected StringType data; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java index 4d5e0e91d85..68e480f09dc 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Schedule.java @@ -48,21 +48,21 @@ public class Schedule extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The schedule type can be used for the categorization of healthcare services or other appointment types. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "type", type = {CodeableConcept.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types", formalDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types." ) protected List type; /** * The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson. */ - @Child(name="actor", type={}, order=2, min=1, max=1) + @Child(name = "actor", type = {}, order = 2, min = 1, max = 1) @Description(shortDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson", formalDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson." ) protected Reference actor; @@ -74,21 +74,21 @@ public class Schedule extends DomainResource { /** * The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates. */ - @Child(name="planningHorizon", type={Period.class}, order=3, min=0, max=1) + @Child(name = "planningHorizon", type = {Period.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates", formalDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates." ) protected Period planningHorizon; /** * Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. */ - @Child(name="comment", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated", formalDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated." ) protected StringType comment; /** * When this Schedule was created, or last revised. */ - @Child(name="lastModified", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "lastModified", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="When this Schedule was created, or last revised", formalDefinition="When this Schedule was created, or last revised." ) protected DateTimeType lastModified; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java index af6de6037c3..057837a433c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SearchParameter.java @@ -190,70 +190,70 @@ public class SearchParameter extends DomainResource { /** * The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statements. */ - @Child(name="url", type={UriType.class}, order=0, min=1, max=1) + @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Literal URL used to reference this search parameter", formalDefinition="The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statements." ) protected UriType url; /** * The name of the standard or custom search parameter. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name = "name", type = {StringType.class}, order = 1, min = 1, max = 1) @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the standard or custom search parameter." ) protected StringType name; /** * Details of the individual or organization who accepts responsibility for publishing the search parameter. */ - @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the search parameter." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * The Scope and Usage that this search parameter was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Why this search parameter is defined", formalDefinition="The Scope and Usage that this search parameter was created to meet." ) protected StringType requirements; /** * The base resource type that this search parameter refers to. */ - @Child(name="base", type={CodeType.class}, order=5, min=1, max=1) + @Child(name = "base", type = {CodeType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="The resource type this search parameter applies to", formalDefinition="The base resource type that this search parameter refers to." ) protected CodeType base; /** * The type of value a search parameter refers to, and how the content is interpreted. */ - @Child(name="type", type={CodeType.class}, order=6, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 6, min = 1, max = 1) @Description(shortDefinition="number | date | string | token | reference | composite | quantity", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) protected Enumeration type; /** * A description of the search parameters and how it used. */ - @Child(name="description", type={StringType.class}, order=7, min=1, max=1) + @Child(name = "description", type = {StringType.class}, order = 7, min = 1, max = 1) @Description(shortDefinition="Documentation for search parameter", formalDefinition="A description of the search parameters and how it used." ) protected StringType description; /** * An XPath expression that returns a set of elements for the search parameter. */ - @Child(name="xpath", type={StringType.class}, order=8, min=0, max=1) + @Child(name = "xpath", type = {StringType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." ) protected StringType xpath; /** * Types of resource (if a resource is referenced). */ - @Child(name="target", type={CodeType.class}, order=9, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "target", type = {CodeType.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) protected List target; @@ -810,15 +810,15 @@ public class SearchParameter extends DomainResource { @SearchParamDefinition(name="name", path="SearchParameter.name", description="Name of search parameter", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name="description", path="SearchParameter.description", description="Documentation for search parameter", type="string" ) + @SearchParamDefinition(name = "description", path = "SearchParameter.description", description = "Documentation for search parameter", type = "string") public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="type", path="SearchParameter.type", description="number | date | string | token | reference | composite | quantity", type="token" ) public static final String SP_TYPE = "type"; @SearchParamDefinition(name="url", path="SearchParameter.url", description="Literal URL used to reference this search parameter", type="token" ) public static final String SP_URL = "url"; - @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type this search parameter applies to", type="token" ) + @SearchParamDefinition(name = "base", path = "SearchParameter.base", description = "The resource type this search parameter applies to", type = "token") public static final String SP_BASE = "base"; - @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" ) + @SearchParamDefinition(name = "target", path = "SearchParameter.target", description = "Types of resource (if a resource reference)", type = "token") public static final String SP_TARGET = "target"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java index 7d5e272aba5..e99a1972cba 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java @@ -3002,28 +3002,28 @@ public class SecurityEvent extends DomainResource { /** * Identifies the name, action type, time, and disposition of the audited event. */ - @Child(name="event", type={}, order=0, min=1, max=1) + @Child(name = "event", type = {}, order = 0, min = 1, max = 1) @Description(shortDefinition="What was done", formalDefinition="Identifies the name, action type, time, and disposition of the audited event." ) protected SecurityEventEventComponent event; /** * A person, a hardware device or software process. */ - @Child(name="participant", type={}, order=1, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "participant", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) protected List participant; /** * Application systems and processes. */ - @Child(name="source", type={}, order=2, min=1, max=1) + @Child(name = "source", type = {}, order = 2, min = 1, max = 1) @Description(shortDefinition="Application systems and processes", formalDefinition="Application systems and processes." ) protected SecurityEventSourceComponent source; /** * Specific instances of data or objects that have been accessed. */ - @Child(name="object", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "object", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Specific instances of data or objects that have been accessed", formalDefinition="Specific instances of data or objects that have been accessed." ) protected List object; @@ -3210,36 +3210,36 @@ public class SecurityEvent extends DomainResource { @SearchParamDefinition(name="date", path="SecurityEvent.event.dateTime", description="Time when the event occurred on source", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name="address", path="SecurityEvent.participant.network.identifier", description="Identifier for the network access point of the user device", type="token" ) - public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name = "address", path = "SecurityEvent.participant.network.identifier", description = "Identifier for the network access point of the user device", type = "token") + public static final String SP_ADDRESS = "address"; @SearchParamDefinition(name="patientid", path="", description="The id of the patient (one of multiple kinds of participations)", type="token" ) public static final String SP_PATIENTID = "patientid"; @SearchParamDefinition(name="source", path="SecurityEvent.source.identifier", description="The id of source where event originated", type="token" ) public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name="type", path="SecurityEvent.event.type", description="Type/identifier of event", type="token" ) - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="altid", path="SecurityEvent.participant.altId", description="Alternative User id e.g. authentication", type="token" ) - public static final String SP_ALTID = "altid"; - @SearchParamDefinition(name="reference", path="SecurityEvent.object.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) - public static final String SP_REFERENCE = "reference"; - @SearchParamDefinition(name="site", path="SecurityEvent.source.site", description="Logical source location within the enterprise", type="token" ) - public static final String SP_SITE = "site"; + @SearchParamDefinition(name = "type", path = "SecurityEvent.event.type", description = "Type/identifier of event", type = "token") + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "altid", path = "SecurityEvent.participant.altId", description = "Alternative User id e.g. authentication", type = "token") + public static final String SP_ALTID = "altid"; + @SearchParamDefinition(name = "reference", path = "SecurityEvent.object.reference", description = "Specific instance of resource (e.g. versioned)", type = "reference") + public static final String SP_REFERENCE = "reference"; + @SearchParamDefinition(name = "site", path = "SecurityEvent.source.site", description = "Logical source location within the enterprise", type = "token") + public static final String SP_SITE = "site"; @SearchParamDefinition(name="subtype", path="SecurityEvent.event.subtype", description="More specific type/id for the event", type="token" ) public static final String SP_SUBTYPE = "subtype"; - @SearchParamDefinition(name="identity", path="SecurityEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) - public static final String SP_IDENTITY = "identity"; - @SearchParamDefinition(name="patient", path="", description="A patient that the .object.reference refers to", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="object-type", path="SecurityEvent.object.type", description="Object type being audited", type="token" ) - public static final String SP_OBJECTTYPE = "object-type"; + @SearchParamDefinition(name = "identity", path = "SecurityEvent.object.identifier", description = "Specific instance of object (e.g. versioned)", type = "token") + public static final String SP_IDENTITY = "identity"; + @SearchParamDefinition(name = "patient", path = "", description = "A patient that the .object.reference refers to", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "object-type", path = "SecurityEvent.object.type", description = "Object type being audited", type = "token") + public static final String SP_OBJECTTYPE = "object-type"; @SearchParamDefinition(name="name", path="SecurityEvent.participant.name", description="Human-meaningful name for the user", type="string" ) public static final String SP_NAME = "name"; @SearchParamDefinition(name="action", path="SecurityEvent.event.action", description="Type of action performed during the event", type="token" ) public static final String SP_ACTION = "action"; @SearchParamDefinition(name="user", path="SecurityEvent.participant.userId", description="Unique identifier for the user", type="token" ) public static final String SP_USER = "user"; - @SearchParamDefinition(name="desc", path="SecurityEvent.object.name", description="Instance-specific descriptor for Object", type="string" ) - public static final String SP_DESC = "desc"; + @SearchParamDefinition(name = "desc", path = "SecurityEvent.object.name", description = "Instance-specific descriptor for Object", type = "string") + public static final String SP_DESC = "desc"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java index 6fdd5b6935d..c7aa422ac72 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Slot.java @@ -148,21 +148,21 @@ public class Slot extends DomainResource { /** * External Ids for this item. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; /** * The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource", formalDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource." ) protected CodeableConcept type; /** * The schedule resource that this slot defines an interval of status information. */ - @Child(name="schedule", type={Schedule.class}, order=2, min=1, max=1) + @Child(name = "schedule", type = {Schedule.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="The schedule resource that this slot defines an interval of status information", formalDefinition="The schedule resource that this slot defines an interval of status information." ) protected Reference schedule; @@ -174,42 +174,42 @@ public class Slot extends DomainResource { /** * BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE. */ - @Child(name="freeBusyType", type={CodeType.class}, order=3, min=1, max=1) + @Child(name = "freeBusyType", type = {CodeType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE", formalDefinition="BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE." ) protected Enumeration freeBusyType; /** * Date/Time that the slot is to begin. */ - @Child(name="start", type={InstantType.class}, order=4, min=1, max=1) + @Child(name = "start", type = {InstantType.class}, order = 4, min = 1, max = 1) @Description(shortDefinition="Date/Time that the slot is to begin", formalDefinition="Date/Time that the slot is to begin." ) protected InstantType start; /** * Date/Time that the slot is to conclude. */ - @Child(name="end", type={InstantType.class}, order=5, min=1, max=1) + @Child(name = "end", type = {InstantType.class}, order = 5, min = 1, max = 1) @Description(shortDefinition="Date/Time that the slot is to conclude", formalDefinition="Date/Time that the slot is to conclude." ) protected InstantType end; /** * This slot has already been overbooked, appointments are unlikely to be accepted for this time. */ - @Child(name="overbooked", type={BooleanType.class}, order=6, min=0, max=1) + @Child(name = "overbooked", type = {BooleanType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time", formalDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time." ) protected BooleanType overbooked; /** * Comments on the slot to describe any extended information. Such as custom constraints on the slot. */ - @Child(name="comment", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "comment", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot", formalDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot." ) protected StringType comment; /** * When this slot was created, or last revised. */ - @Child(name="lastModified", type={DateTimeType.class}, order=8, min=0, max=1) + @Child(name = "lastModified", type = {DateTimeType.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="When this slot was created, or last revised", formalDefinition="When this slot was created, or last revised." ) protected DateTimeType lastModified; @@ -681,7 +681,7 @@ public class Slot extends DomainResource { public static final String SP_SCHEDULE = "schedule"; @SearchParamDefinition(name="slottype", path="Slot.type", description="The type of appointments that can be booked into the slot", type="token" ) public static final String SP_SLOTTYPE = "slottype"; - @SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.", type="date" ) + @SearchParamDefinition(name = "start", path = "Slot.start", description = "Appointment date/time.", type = "date") public static final String SP_START = "start"; @SearchParamDefinition(name="fbtype", path="Slot.freeBusyType", description="The free/busy status of the appointment", type="token" ) public static final String SP_FBTYPE = "fbtype"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java index 5d70e855d21..015aa2ff495 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Specimen.java @@ -1124,28 +1124,28 @@ public class Specimen extends DomainResource { /** * Id for specimen. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External Identifier", formalDefinition="Id for specimen." ) protected List identifier; /** * Kind of material that forms the specimen. */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=0, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Kind of material that forms the specimen", formalDefinition="Kind of material that forms the specimen." ) protected CodeableConcept type; /** * Parent specimen from which the focal specimen was a component. */ - @Child(name="source", type={}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "source", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Parent of specimen", formalDefinition="Parent specimen from which the focal specimen was a component." ) protected List source; /** * Where the specimen came from. This may be from the patient(s) or from the environment or a device. */ - @Child(name="subject", type={Patient.class, Group.class, Device.class, Substance.class}, order=3, min=1, max=1) + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Substance.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device", formalDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device." ) protected Reference subject; @@ -1157,35 +1157,35 @@ public class Specimen extends DomainResource { /** * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. */ - @Child(name="accessionIdentifier", type={Identifier.class}, order=4, min=0, max=1) + @Child(name = "accessionIdentifier", type = {Identifier.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) protected Identifier accessionIdentifier; /** * Time when specimen was received for processing or testing. */ - @Child(name="receivedTime", type={DateTimeType.class}, order=5, min=0, max=1) + @Child(name = "receivedTime", type = {DateTimeType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="The time when specimen was received for processing", formalDefinition="Time when specimen was received for processing or testing." ) protected DateTimeType receivedTime; /** * Details concerning the specimen collection. */ - @Child(name="collection", type={}, order=6, min=0, max=1) + @Child(name = "collection", type = {}, order = 6, min = 0, max = 1) @Description(shortDefinition="Collection details", formalDefinition="Details concerning the specimen collection." ) protected SpecimenCollectionComponent collection; /** * Details concerning treatment and processing steps for the specimen. */ - @Child(name="treatment", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "treatment", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Treatment and processing step details", formalDefinition="Details concerning treatment and processing steps for the specimen." ) protected List treatment; /** * The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here. */ - @Child(name="container", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "container", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Direct container of specimen (tube/slide, etc)", formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." ) protected List container; @@ -1564,28 +1564,28 @@ public class Specimen extends DomainResource { return ResourceType.Specimen; } - @SearchParamDefinition(name="container", path="Specimen.container.type", description="The kind of specimen container", type="token" ) - public static final String SP_CONTAINER = "container"; - @SearchParamDefinition(name="identifier", path="Specimen.identifier", description="The unique identifier associated with the specimen", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "container", path = "Specimen.container.type", description = "The kind of specimen container", type = "token") + public static final String SP_CONTAINER = "container"; + @SearchParamDefinition(name = "identifier", path = "Specimen.identifier", description = "The unique identifier associated with the specimen", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="site", path="Specimen.collection.bodySite[x]", description="The source or body site from where the specimen came", type="token" ) public static final String SP_SITE = "site"; - @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference" ) - public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name = "subject", path = "Specimen.subject", description = "The subject of the specimen", type = "reference") + public static final String SP_SUBJECT = "subject"; @SearchParamDefinition(name="patient", path="Specimen.subject", description="The patient the specimen comes from", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="collected", path="Specimen.collection.collected[x]", description="The date the specimen was collected", type="date" ) public static final String SP_COLLECTED = "collected"; - @SearchParamDefinition(name="source", path="Specimen.source.target", description="The parent of the specimen", type="reference" ) - public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name = "source", path = "Specimen.source.target", description = "The parent of the specimen", type = "reference") + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="accession", path="Specimen.accessionIdentifier", description="The accession number associated with the specimen", type="token" ) public static final String SP_ACCESSION = "accession"; @SearchParamDefinition(name="type", path="Specimen.type", description="The specimen type", type="token" ) public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="containerid", path="Specimen.container.identifier", description="The unique identifier associated with the specimen container", type="token" ) - public static final String SP_CONTAINERID = "containerid"; - @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference" ) - public static final String SP_COLLECTOR = "collector"; + @SearchParamDefinition(name = "containerid", path = "Specimen.container.identifier", description = "The unique identifier associated with the specimen container", type = "token") + public static final String SP_CONTAINERID = "containerid"; + @SearchParamDefinition(name = "collector", path = "Specimen.collection.collector", description = "Who collected the specimen", type = "reference") + public static final String SP_COLLECTOR = "collector"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java index 59583a4fa0b..3f636c6bb5a 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java @@ -47,35 +47,35 @@ public class StatusRequest extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer who is target of the request. */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) protected Reference target; @@ -87,7 +87,7 @@ public class StatusRequest extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -99,7 +99,7 @@ public class StatusRequest extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -111,7 +111,7 @@ public class StatusRequest extends DomainResource { /** * Reference of resource to reverse. */ - @Child(name="request", type={}, order=7, min=0, max=1) + @Child(name = "request", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) protected Reference request; @@ -123,7 +123,7 @@ public class StatusRequest extends DomainResource { /** * Reference of response to resource to reverse. */ - @Child(name="response", type={}, order=8, min=0, max=1) + @Child(name = "response", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) protected Reference response; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java index 523a8915de8..66f4e5ac715 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java @@ -184,14 +184,14 @@ public class StatusResponse extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name="request", type={}, order=1, min=0, max=1) + @Child(name = "request", type = {}, order = 1, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) protected Reference request; @@ -203,42 +203,42 @@ public class StatusResponse extends DomainResource { /** * Transaction status: error, complete, held. */ - @Child(name="outcome", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "outcome", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) protected Coding outcome; /** * A description of the status of the adjudication or processing. */ - @Child(name="disposition", type={StringType.class}, order=3, min=0, max=1) + @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication or processing." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=4, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=5, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=6, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name="organization", type={Organization.class}, order=7, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -250,7 +250,7 @@ public class StatusResponse extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) + @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -262,7 +262,7 @@ public class StatusResponse extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="requestOrganization", type={Organization.class}, order=9, min=0, max=1) + @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -274,21 +274,21 @@ public class StatusResponse extends DomainResource { /** * The form to be used for printing the content. */ - @Child(name="form", type={Coding.class}, order=10, min=0, max=1) + @Child(name = "form", type = {Coding.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Suite of processing note or additional requirements is the processing has been held. */ - @Child(name="notes", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "notes", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Notes", formalDefinition="Suite of processing note or additional requirements is the processing has been held." ) protected List notes; /** * Processing errors. */ - @Child(name="error", type={Coding.class}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "error", type = {Coding.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) protected List error; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java index e643ad4888f..f50ff6c209f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java @@ -802,147 +802,147 @@ public class StructureDefinition extends DomainResource { /** * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. */ - @Child(name="url", type={UriType.class}, order=0, min=1, max=1) + @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) protected UriType url; /** * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. */ - @Child(name="version", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name="name", type={StringType.class}, order=3, min=1, max=1) + @Child(name = "name", type = {StringType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) protected StringType name; /** * Defined so that applications can use this name when displaying the value of the extension to the user. */ - @Child(name="display", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "display", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) protected StringType display; /** * Details of the individual or organization who accepts responsibility for publishing the profile. */ - @Child(name="publisher", type={StringType.class}, order=5, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the profile and its use. */ - @Child(name="description", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name="code", type={Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "code", type = {Coding.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** * The status of the profile. */ - @Child(name="status", type={CodeType.class}, order=9, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 9, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=10, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name="date", type={DateTimeType.class}, order=11, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * The Scope and Usage that this profile was created to meet. */ - @Child(name="requirements", type={StringType.class}, order=12, min=0, max=1) + @Child(name = "requirements", type = {StringType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) protected StringType requirements; /** * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. */ - @Child(name="fhirVersion", type={IdType.class}, order=13, min=0, max=1) + @Child(name = "fhirVersion", type = {IdType.class}, order = 13, min = 0, max = 1) @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) protected IdType fhirVersion; /** * An external specification that the content is mapped to. */ - @Child(name="mapping", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "mapping", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * Defines the type of structure that this definition is describing. */ - @Child(name="type", type={CodeType.class}, order=15, min=1, max=1) + @Child(name = "type", type = {CodeType.class}, order = 15, min = 1, max = 1) @Description(shortDefinition="abstract | type | resource | constraint | extension", formalDefinition="Defines the type of structure that this definition is describing." ) protected Enumeration type; /** * Identifies the type of context to which the extension applies. */ - @Child(name="contextType", type={CodeType.class}, order=16, min=0, max=1) + @Child(name = "contextType", type = {CodeType.class}, order = 16, min = 0, max = 1) @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name="context", type={StringType.class}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "context", type = {StringType.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** * The structure that is the base on which this set of constraints is derived from. */ - @Child(name="base", type={UriType.class}, order=18, min=0, max=1) + @Child(name = "base", type = {UriType.class}, order = 18, min = 0, max = 1) @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) protected UriType base; /** * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. */ - @Child(name="snapshot", type={}, order=19, min=0, max=1) + @Child(name = "snapshot", type = {}, order = 19, min = 0, max = 1) @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) protected StructureDefinitionSnapshotComponent snapshot; /** * A differential view is expressed relative to the base profile - a statement of differences that it applies. */ - @Child(name="differential", type={}, order=20, min=0, max=1) + @Child(name = "differential", type = {}, order = 20, min = 0, max = 1) @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) protected StructureDefinitionDifferentialComponent differential; @@ -1976,26 +1976,26 @@ public class StructureDefinition extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="StructureDefinition.identifier", description="The identifier of the profile", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description="A path that is constrained in the profile", type="token" ) - public static final String SP_PATH = "path"; - @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.reference[x]", description="A vocabulary binding code", type="reference" ) - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" ) - public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "path", path = "StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description = "A path that is constrained in the profile", type = "token") + public static final String SP_PATH = "path"; + @SearchParamDefinition(name = "code", path = "StructureDefinition.code", description = "A code for the profile", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "valueset", path = "StructureDefinition.snapshot.element.binding.reference[x]", description = "A vocabulary binding code", type = "reference") + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name = "name", path = "StructureDefinition.name", description = "Name of the profile", type = "string") + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" ) - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name="type", path="StructureDefinition.type", description="abstract | type | resource | constraint | extension", type="token" ) - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name = "description", path = "StructureDefinition.description", description = "Text search in the description of the profile", type = "string") + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "type", path = "StructureDefinition.type", description = "abstract | type | resource | constraint | extension", type = "token") + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="version", path="StructureDefinition.version", description="The version identifier of the profile", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="url", path="StructureDefinition.url", description="Literal URL used to reference this profile", type="token" ) - public static final String SP_URL = "url"; - @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "url", path = "StructureDefinition.url", description = "Literal URL used to reference this profile", type = "token") + public static final String SP_URL = "url"; + @SearchParamDefinition(name = "status", path = "StructureDefinition.status", description = "The current status of the profile", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java index 4f2d215a61d..c40f947bc7e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Subscription.java @@ -758,56 +758,56 @@ public class Subscription extends DomainResource { /** * Todo. */ - @Child(name="criteria", type={StringType.class}, order=0, min=1, max=1) + @Child(name = "criteria", type = {StringType.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="Rule for server push criteria", formalDefinition="Todo." ) protected StringType criteria; /** * Todo. */ - @Child(name="contact", type={ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "contact", type = {ContactPoint.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact details for source (e.g. troubleshooting)", formalDefinition="Todo." ) protected List contact; /** * Todo. */ - @Child(name="reason", type={StringType.class}, order=2, min=1, max=1) + @Child(name = "reason", type = {StringType.class}, order = 2, min = 1, max = 1) @Description(shortDefinition="Description of why this subscription was created", formalDefinition="Todo." ) protected StringType reason; /** * Todo. */ - @Child(name="status", type={CodeType.class}, order=3, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 3, min = 1, max = 1) @Description(shortDefinition="requested | active | error | off", formalDefinition="Todo." ) protected Enumeration status; /** * Todo. */ - @Child(name="error", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "error", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Latest error note", formalDefinition="Todo." ) protected StringType error; /** * Todo. */ - @Child(name="channel", type={}, order=5, min=1, max=1) + @Child(name = "channel", type = {}, order = 5, min = 1, max = 1) @Description(shortDefinition="The channel on which to report matches to the criteria", formalDefinition="Todo." ) protected SubscriptionChannelComponent channel; /** * Todo. */ - @Child(name="end", type={InstantType.class}, order=6, min=0, max=1) + @Child(name = "end", type = {InstantType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="When to automatically delete the subscription", formalDefinition="Todo." ) protected InstantType end; /** * Todo. */ - @Child(name="tag", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "tag", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="A tag to add to matching resources", formalDefinition="Todo." ) protected List tag; @@ -1215,20 +1215,20 @@ public class Subscription extends DomainResource { return ResourceType.Subscription; } - @SearchParamDefinition(name="payload", path="Subscription.channel.payload", description="Mimetype to send, or blank for no payload", type="string" ) - public static final String SP_PAYLOAD = "payload"; + @SearchParamDefinition(name = "payload", path = "Subscription.channel.payload", description = "Mimetype to send, or blank for no payload", type = "string") + public static final String SP_PAYLOAD = "payload"; @SearchParamDefinition(name="criteria", path="Subscription.criteria", description="Rule for server push criteria", type="string" ) public static final String SP_CRITERIA = "criteria"; - @SearchParamDefinition(name="contact", path="Subscription.contact", description="Contact details for source (e.g. troubleshooting)", type="token" ) - public static final String SP_CONTACT = "contact"; + @SearchParamDefinition(name = "contact", path = "Subscription.contact", description = "Contact details for source (e.g. troubleshooting)", type = "token") + public static final String SP_CONTACT = "contact"; @SearchParamDefinition(name="tag", path="Subscription.tag.term", description="The term that identifies the tag", type="string" ) public static final String SP_TAG = "tag"; @SearchParamDefinition(name="type", path="Subscription.channel.type", description="rest-hook | websocket | email | sms | message", type="token" ) public static final String SP_TYPE = "type"; @SearchParamDefinition(name="url", path="Subscription.channel.url", description="Where the channel points to", type="string" ) public static final String SP_URL = "url"; - @SearchParamDefinition(name="status", path="Subscription.status", description="requested | active | error | off", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "Subscription.status", description = "requested | active | error | off", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java index 9cc8402c2be..595784cae30 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Substance.java @@ -359,28 +359,28 @@ public class Substance extends DomainResource { /** * A code (or set of codes) that identify this substance. */ - @Child(name="type", type={CodeableConcept.class}, order=0, min=1, max=1) + @Child(name = "type", type = {CodeableConcept.class}, order = 0, min = 1, max = 1) @Description(shortDefinition="What kind of substance this is", formalDefinition="A code (or set of codes) that identify this substance." ) protected CodeableConcept type; /** * A description of the substance - its appearance, handling requirements, and other usage notes. */ - @Child(name="description", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Textual description of the substance, comments", formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes." ) protected StringType description; /** * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance. */ - @Child(name="instance", type={}, order=2, min=0, max=1) + @Child(name = "instance", type = {}, order = 2, min = 0, max = 1) @Description(shortDefinition="If this describes a specific package/container of the substance", formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." ) protected SubstanceInstanceComponent instance; /** * A substance can be composed of other substances. */ - @Child(name="ingredient", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "ingredient", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Composition information about the substance", formalDefinition="A substance can be composed of other substances." ) protected List ingredient; @@ -582,13 +582,13 @@ public class Substance extends DomainResource { @SearchParamDefinition(name="identifier", path="Substance.instance.identifier", description="Identifier of the package/container", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="Amount of substance in the package", type="number" ) + @SearchParamDefinition(name = "quantity", path = "Substance.instance.quantity", description = "Amount of substance in the package", type = "number") public static final String SP_QUANTITY = "quantity"; - @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="A component of the substance", type="reference" ) + @SearchParamDefinition(name = "substance", path = "Substance.ingredient.substance", description = "A component of the substance", type = "reference") public static final String SP_SUBSTANCE = "substance"; @SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="When no longer valid to use", type="date" ) public static final String SP_EXPIRY = "expiry"; - @SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance", type="token" ) + @SearchParamDefinition(name = "type", path = "Substance.type", description = "The type of the substance", type = "token") public static final String SP_TYPE = "type"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java index 8a644638fe6..d25e86a6dfd 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Supply.java @@ -786,28 +786,28 @@ public class Supply extends DomainResource { /** * Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process. */ - @Child(name="kind", type={CodeableConcept.class}, order=0, min=0, max=1) + @Child(name = "kind", type = {CodeableConcept.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="The kind of supply (central, non-stock, etc)", formalDefinition="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process." ) protected CodeableConcept kind; /** * Unique identifier for this supply request. */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=1) + @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Unique identifier", formalDefinition="Unique identifier for this supply request." ) protected Identifier identifier; /** * Status of the supply request. */ - @Child(name="status", type={CodeType.class}, order=2, min=0, max=1) + @Child(name = "status", type = {CodeType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="requested | dispensed | received | failed | cancelled", formalDefinition="Status of the supply request." ) protected Enumeration status; /** * The item that is requested to be supplied. */ - @Child(name="orderedItem", type={Medication.class, Substance.class, Device.class}, order=3, min=0, max=1) + @Child(name = "orderedItem", type = {Medication.class, Substance.class, Device.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Medication, Substance, or Device requested to be supplied", formalDefinition="The item that is requested to be supplied." ) protected Reference orderedItem; @@ -819,7 +819,7 @@ public class Supply extends DomainResource { /** * A link to a resource representing the person whom the ordered item is for. */ - @Child(name="patient", type={Patient.class}, order=4, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the ordered item is for." ) protected Reference patient; @@ -831,7 +831,7 @@ public class Supply extends DomainResource { /** * Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed. */ - @Child(name="dispense", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dispense", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Supply details", formalDefinition="Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed." ) protected List dispense; @@ -1118,16 +1118,16 @@ public class Supply extends DomainResource { public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="kind", path="Supply.kind", description="The kind of supply (central, non-stock, etc)", type="token" ) public static final String SP_KIND = "kind"; - @SearchParamDefinition(name="patient", path="Supply.patient", description="Patient for whom the item is supplied", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="supplier", path="Supply.dispense.supplier", description="Dispenser", type="reference" ) - public static final String SP_SUPPLIER = "supplier"; - @SearchParamDefinition(name="dispenseid", path="Supply.dispense.identifier", description="External identifier", type="token" ) - public static final String SP_DISPENSEID = "dispenseid"; + @SearchParamDefinition(name = "patient", path = "Supply.patient", description = "Patient for whom the item is supplied", type = "reference") + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name = "supplier", path = "Supply.dispense.supplier", description = "Dispenser", type = "reference") + public static final String SP_SUPPLIER = "supplier"; + @SearchParamDefinition(name = "dispenseid", path = "Supply.dispense.identifier", description = "External identifier", type = "token") + public static final String SP_DISPENSEID = "dispenseid"; @SearchParamDefinition(name="dispensestatus", path="Supply.dispense.status", description="in-progress | dispensed | abandoned", type="token" ) public static final String SP_DISPENSESTATUS = "dispensestatus"; - @SearchParamDefinition(name="status", path="Supply.status", description="requested | dispensed | received | failed | cancelled", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "Supply.status", description = "requested | dispensed | received | failed | cancelled", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java index 847498e28e4..e3545ae8bef 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java @@ -257,35 +257,35 @@ public class SupportingDocumentation extends DomainResource { /** * The Response Business Identifier. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=1, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 1, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when this resource was created. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) protected DateTimeType created; /** * The Insurer, organization or Provider who is target of the submission. */ - @Child(name="target", type={Organization.class, Practitioner.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class, Practitioner.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer or Provider", formalDefinition="The Insurer, organization or Provider who is target of the submission." ) protected Reference target; @@ -297,7 +297,7 @@ public class SupportingDocumentation extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -309,7 +309,7 @@ public class SupportingDocumentation extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference organization; @@ -321,7 +321,7 @@ public class SupportingDocumentation extends DomainResource { /** * Original request. */ - @Child(name="request", type={}, order=7, min=0, max=1) + @Child(name = "request", type = {}, order = 7, min = 0, max = 1) @Description(shortDefinition="Request reference", formalDefinition="Original request." ) protected Reference request; @@ -333,7 +333,7 @@ public class SupportingDocumentation extends DomainResource { /** * Original response. */ - @Child(name="response", type={}, order=8, min=0, max=1) + @Child(name = "response", type = {}, order = 8, min = 0, max = 1) @Description(shortDefinition="Response reference", formalDefinition="Original response." ) protected Reference response; @@ -345,7 +345,7 @@ public class SupportingDocumentation extends DomainResource { /** * Person who created the submission. */ - @Child(name="author", type={Practitioner.class}, order=9, min=0, max=1) + @Child(name = "author", type = {Practitioner.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the submission." ) protected Reference author; @@ -357,7 +357,7 @@ public class SupportingDocumentation extends DomainResource { /** * The patient who is directly or indirectly the subject of the supporting information. */ - @Child(name="subject", type={Patient.class}, order=10, min=0, max=1) + @Child(name = "subject", type = {Patient.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Patient", formalDefinition="The patient who is directly or indirectly the subject of the supporting information." ) protected Reference subject; @@ -369,7 +369,7 @@ public class SupportingDocumentation extends DomainResource { /** * Supporting Files. */ - @Child(name="detail", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "detail", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Supporting Files", formalDefinition="Supporting Files." ) protected List detail; @@ -912,13 +912,13 @@ public class SupportingDocumentation extends DomainResource { return ResourceType.SupportingDocumentation; } - @SearchParamDefinition(name="identifier", path="SupportingDocumentation.identifier", description="The business identifier of the Eligibility", type="token" ) + @SearchParamDefinition(name = "identifier", path = "SupportingDocumentation.identifier", description = "The business identifier of the Eligibility", type = "token") public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="author", path="SupportingDocumentation.author", description="The person who generated this resource", type="reference" ) public static final String SP_AUTHOR = "author"; @SearchParamDefinition(name="subject", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name="patient", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) + @SearchParamDefinition(name = "patient", path = "SupportingDocumentation.subject", description = "The patient to whom the documents refer", type = "reference") public static final String SP_PATIENT = "patient"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java index 0ab9c9d254f..b04b54f0398 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/TimeType.java @@ -35,7 +35,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef; * Represents a Time datatype, per the FHIR specification. A time is a specification of hours and minutes (and optionally milliseconds), with NO date and NO timezone information attached. It is * expressed as a string in the form HH:mm:ss[.SSSS] */ -@DatatypeDef(name="time") +@DatatypeDef(name = "time") public class TimeType extends PrimitiveType { private static final long serialVersionUID = 3L; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java index 561425f34e4..f1198c34d3b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Timing.java @@ -44,7 +44,7 @@ import org.hl7.fhir.instance.model.api.IDatatypeElement; * Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur. */ @DatatypeDef(name="Timing") -public class Timing extends Type implements ICompositeType { +public class Timing extends Type implements ICompositeType { public enum EventTiming { /** @@ -763,14 +763,14 @@ public class Timing extends Type implements ICompositeType { /** * Identifies specific time periods when the event should occur. */ - @Child(name="event", type={Period.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "event", type = {Period.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="When the event occurs", formalDefinition="Identifies specific time periods when the event should occur." ) protected List event; /** * Identifies a repeating pattern to the intended time periods. */ - @Child(name="repeat", type={}, order=1, min=0, max=1) + @Child(name = "repeat", type = {}, order = 1, min = 0, max = 1) @Description(shortDefinition="Only if there is none or one event", formalDefinition="Identifies a repeating pattern to the intended time periods." ) protected TimingRepeatComponent repeat; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java index 4f0fa1aad09..3f3f2284d7f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ValueSet.java @@ -2514,112 +2514,112 @@ public class ValueSet extends DomainResource { /** * The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). */ - @Child(name="identifier", type={UriType.class}, order=0, min=0, max=1) + @Child(name = "identifier", type = {UriType.class}, order = 0, min = 0, max = 1) @Description(shortDefinition="Globally unique logical id for value set", formalDefinition="The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) protected UriType identifier; /** * The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name="version", type={StringType.class}, order=1, min=0, max=1) + @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Logical id for this version of the value set", formalDefinition="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name describing the value set. */ - @Child(name="name", type={StringType.class}, order=2, min=0, max=1) + @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Informal name for this value set", formalDefinition="A free text natural language name describing the value set." ) protected StringType name; /** * If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. */ - @Child(name="immutable", type={BooleanType.class}, order=3, min=0, max=1) + @Child(name = "immutable", type = {BooleanType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Indicates whether or not any change to the content logical definition may occur", formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change." ) protected BooleanType immutable; /** * The name of the individual or organization that published the value set. */ - @Child(name="publisher", type={StringType.class}, order=4, min=0, max=1) + @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the value set." ) protected StringType publisher; /** * Contacts of the publisher to assist a user in finding and communicating with the publisher. */ - @Child(name="telecom", type={ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." ) protected List telecom; /** * A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set. */ - @Child(name="description", type={StringType.class}, order=6, min=0, max=1) + @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Human language description of the value set", formalDefinition="A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set." ) protected StringType description; /** * A copyright statement relating to the value set and/or its contents. These are generally legal restrictions on the use and publishing of the value set. */ - @Child(name="copyright", type={StringType.class}, order=7, min=0, max=1) + @Child(name = "copyright", type = {StringType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="Publishing restrictions for the value set", formalDefinition="A copyright statement relating to the value set and/or its contents. These are generally legal restrictions on the use and publishing of the value set." ) protected StringType copyright; /** * The status of the value set. */ - @Child(name="status", type={CodeType.class}, order=8, min=1, max=1) + @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the value set." ) protected Enumeration status; /** * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name="experimental", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name = "experimental", type = {BooleanType.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * Whether this is intended to be used with an extensible binding or not. */ - @Child(name="extensible", type={BooleanType.class}, order=10, min=0, max=1) + @Child(name = "extensible", type = {BooleanType.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Whether this is intended to be used with an extensible binding", formalDefinition="Whether this is intended to be used with an extensible binding or not." ) protected BooleanType extensible; /** * The date that the value set status was last changed. */ - @Child(name="date", type={DateTimeType.class}, order=11, min=0, max=1) + @Child(name = "date", type = {DateTimeType.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Date for given status", formalDefinition="The date that the value set status was last changed." ) protected DateTimeType date; /** * If a Stability Date is expanded by evaluating the Content Logical Definition using the current version of all referenced code system(s) and value sets as of the Stability Date. */ - @Child(name="stableDate", type={DateType.class}, order=12, min=0, max=1) + @Child(name = "stableDate", type = {DateType.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Fixed date for the version of all referenced code systems and value sets", formalDefinition="If a Stability Date is expanded by evaluating the Content Logical Definition using the current version of all referenced code system(s) and value sets as of the Stability Date." ) protected DateType stableDate; /** * When value set defines its own codes. */ - @Child(name="define", type={}, order=13, min=0, max=1) + @Child(name = "define", type = {}, order = 13, min = 0, max = 1) @Description(shortDefinition="When value set defines its own codes", formalDefinition="When value set defines its own codes." ) protected ValueSetDefineComponent define; /** * When value set includes codes from elsewhere. */ - @Child(name="compose", type={}, order=14, min=0, max=1) + @Child(name = "compose", type = {}, order = 14, min = 0, max = 1) @Description(shortDefinition="When value set includes codes from elsewhere", formalDefinition="When value set includes codes from elsewhere." ) protected ValueSetComposeComponent compose; /** * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. */ - @Child(name="expansion", type={}, order=15, min=0, max=1) + @Child(name = "expansion", type = {}, order = 15, min = 0, max = 1) @Description(shortDefinition="Used when the value set is 'expanded'", formalDefinition="A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." ) protected ValueSetExpansionComponent expansion; @@ -3406,22 +3406,22 @@ public class ValueSet extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="token" ) public static final String SP_REFERENCE = "reference"; - @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier of the value set", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="system", path="ValueSet.define.system", description="The system for any codes defined by this value set", type="token" ) - public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name="code", path="ValueSet.define.concept.code", description="A code defined in the value set", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set", type="string" ) - public static final String SP_NAME = "name"; + @SearchParamDefinition(name = "identifier", path = "ValueSet.identifier", description = "The identifier of the value set", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "system", path = "ValueSet.define.system", description = "The system for any codes defined by this value set", type = "token") + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name = "code", path = "ValueSet.define.concept.code", description = "A code defined in the value set", type = "token") + public static final String SP_CODE = "code"; + @SearchParamDefinition(name = "name", path = "ValueSet.name", description = "The name of the value set", type = "string") + public static final String SP_NAME = "name"; @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" ) public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) - public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name = "description", path = "ValueSet.description", description = "Text search in the description of the value set", type = "string") + public static final String SP_DESCRIPTION = "description"; @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set", type="token" ) - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name = "status", path = "ValueSet.status", description = "The status of the value set", type = "token") + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java index 4083960c221..d7afcc5ea60 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java @@ -2688,35 +2688,35 @@ public class VisionClaim extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name="ruleset", type={Coding.class}, order=1, min=0, max=1) + @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name="originalRuleset", type={Coding.class}, order=2, min=0, max=1) + @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="created", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name="target", type={Organization.class}, order=4, min=0, max=1) + @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -2728,7 +2728,7 @@ public class VisionClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="provider", type={Practitioner.class}, order=5, min=0, max=1) + @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -2740,7 +2740,7 @@ public class VisionClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name="organization", type={Organization.class}, order=6, min=0, max=1) + @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -2752,28 +2752,28 @@ public class VisionClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name="use", type={CodeType.class}, order=7, min=0, max=1) + @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name="priority", type={Coding.class}, order=8, min=0, max=1) + @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name="fundsReserve", type={Coding.class}, order=9, min=0, max=1) + @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name="enterer", type={Practitioner.class}, order=10, min=0, max=1) + @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -2785,7 +2785,7 @@ public class VisionClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name="facility", type={Location.class}, order=11, min=0, max=1) + @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -2797,7 +2797,7 @@ public class VisionClaim extends DomainResource { /** * Prescription to support the dispensing of glasses or contact lenses. */ - @Child(name="prescription", type={VisionPrescription.class}, order=12, min=0, max=1) + @Child(name = "prescription", type = {VisionPrescription.class}, order = 12, min = 0, max = 1) @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of glasses or contact lenses." ) protected Reference prescription; @@ -2809,14 +2809,14 @@ public class VisionClaim extends DomainResource { /** * The party to be reimbursed for the services. */ - @Child(name="payee", type={}, order=13, min=0, max=1) + @Child(name = "payee", type = {}, order = 13, min = 0, max = 1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name="referral", type={ReferralRequest.class}, order=14, min=0, max=1) + @Child(name = "referral", type = {ReferralRequest.class}, order = 14, min = 0, max = 1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -2828,21 +2828,21 @@ public class VisionClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name="diagnosis", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "diagnosis", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name="condition", type={Coding.class}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "condition", type = {Coding.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name="patient", type={Patient.class}, order=17, min=1, max=1) + @Child(name = "patient", type = {Patient.class}, order = 17, min = 1, max = 1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -2854,56 +2854,56 @@ public class VisionClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name="coverage", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "coverage", type = {}, order = 18, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name="exception", type={Coding.class}, order=19, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "exception", type = {Coding.class}, order = 19, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name="school", type={StringType.class}, order=20, min=0, max=1) + @Child(name = "school", type = {StringType.class}, order = 20, min = 0, max = 1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name="accident", type={DateType.class}, order=21, min=0, max=1) + @Child(name = "accident", type = {DateType.class}, order = 21, min = 0, max = 1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name="accidentType", type={Coding.class}, order=22, min=0, max=1) + @Child(name = "accidentType", type = {Coding.class}, order = 22, min = 0, max = 1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name="interventionException", type={Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "interventionException", type = {Coding.class}, order = 23, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** * First tier of goods and services. */ - @Child(name="item", type={}, order=24, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "item", type = {}, order = 24, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name="additionalMaterials", type={Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "additionalMaterials", type = {Coding.class}, order = 25, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; @@ -3997,10 +3997,10 @@ public class VisionClaim extends DomainResource { return ResourceType.VisionClaim; } - @SearchParamDefinition(name="identifier", path="VisionClaim.identifier", description="The primary identifier of the financial resource", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="use", path="VisionClaim.use", description="The kind of financial resource", type="token" ) - public static final String SP_USE = "use"; + @SearchParamDefinition(name = "identifier", path = "VisionClaim.identifier", description = "The primary identifier of the financial resource", type = "token") + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "use", path = "VisionClaim.use", description = "The kind of financial resource", type = "token") + public static final String SP_USE = "use"; @SearchParamDefinition(name="patient", path="VisionClaim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; @SearchParamDefinition(name="priority", path="VisionClaim.priority", description="Processing priority requested", type="token" ) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java index 515ceefc532..e23f86d06e1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionPrescription.java @@ -1100,21 +1100,21 @@ public class VisionPrescription extends DomainResource { /** * Business identifier which may be used by other parties to reference or identify the prescription. */ - @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Business identifier", formalDefinition="Business identifier which may be used by other parties to reference or identify the prescription." ) protected List identifier; /** * The date (and perhaps time) when the prescription was written. */ - @Child(name="dateWritten", type={DateTimeType.class}, order=1, min=0, max=1) + @Child(name = "dateWritten", type = {DateTimeType.class}, order = 1, min = 0, max = 1) @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) protected DateTimeType dateWritten; /** * A link to a resource representing the person to whom the Vision products will be supplied. */ - @Child(name="patient", type={Patient.class}, order=2, min=0, max=1) + @Child(name = "patient", type = {Patient.class}, order = 2, min = 0, max = 1) @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the Vision products will be supplied." ) protected Reference patient; @@ -1126,7 +1126,7 @@ public class VisionPrescription extends DomainResource { /** * The healthcare professional responsible for authorizing the prescription. */ - @Child(name="prescriber", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name = "prescriber", type = {Practitioner.class}, order = 3, min = 0, max = 1) @Description(shortDefinition="Who authorizes the Vision product", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) protected Reference prescriber; @@ -1138,7 +1138,7 @@ public class VisionPrescription extends DomainResource { /** * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. */ - @Child(name="encounter", type={Encounter.class}, order=4, min=0, max=1) + @Child(name = "encounter", type = {Encounter.class}, order = 4, min = 0, max = 1) @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) protected Reference encounter; @@ -1150,14 +1150,14 @@ public class VisionPrescription extends DomainResource { /** * Can be the reason or the indication for writing the prescription. */ - @Child(name="reason", type={CodeableConcept.class, Condition.class}, order=5, min=0, max=1) + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order = 5, min = 0, max = 1) @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) protected Type reason; /** * Deals with details of the dispense part of the supply specification. */ - @Child(name="dispense", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name = "dispense", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) @Description(shortDefinition="Vision supply authorization", formalDefinition="Deals with details of the dispense part of the supply specification." ) protected List dispense; @@ -1515,12 +1515,12 @@ public class VisionPrescription extends DomainResource { return ResourceType.VisionPrescription; } - @SearchParamDefinition(name="identifier", path="VisionPrescription.identifier", description="Return prescriptions with this external identity", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name = "identifier", path = "VisionPrescription.identifier", description = "Return prescriptions with this external identity", type = "token") + public static final String SP_IDENTIFIER = "identifier"; @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) - public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name = "datewritten", path = "VisionPrescription.dateWritten", description = "Return prescriptions written on this date", type = "date") + public static final String SP_DATEWRITTEN = "datewritten"; @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identity", type="reference" ) public static final String SP_ENCOUNTER = "encounter"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java index bb0cda27e09..36c4bf3fe0c 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/Child.java @@ -100,7 +100,7 @@ public @interface Child { /** * For children which accept an {@link Enumeration} as the type, this - * field indicates the type to use for the enum factory + * field indicates the type to use for the enum factory */ Class> enumFactory() default NoEnumFactory.class; @@ -119,7 +119,7 @@ public @interface Child { private NoEnumFactory() { // non instantiable } - + @Override public Enum fromCode(String theCodeString) throws IllegalArgumentException { return null; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java index e695285dde4..32b078bbb7d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/model/ModelInheritanceTest.java @@ -50,137 +50,137 @@ import org.junit.Test; public class ModelInheritanceTest { - /** - *
    -	 * Other changes:
    -	 * 
    -	 * Reference:
    -	 *  * Add "resource" field, plus constructors and getter/setters for that field
    -	 *  
    -	 * Narrative:
    -	 *  * Add getValueAsDiv and setValueAsDiv
    -	 *  
    -	 * XhtmlParser and XhtmlEncoder:
    -	 *  * Do we need a better exception declaration?
    -	 *  
    -	 * ElementDefinition
    -	 *  * Backbone elements (eg .ElementDefinitionSlicingComponent) do not extend BackboneElement or have a @Block annotation for some reason
    -	 *  
    -	 * Extension
    -	 *  * Should URL not be StringType since it can't take extensions?
    -	 * 
    - */ + /** + *
    +     * Other changes:
    +     *
    +     * Reference:
    +     *  * Add "resource" field, plus constructors and getter/setters for that field
    +     *
    +     * Narrative:
    +     *  * Add getValueAsDiv and setValueAsDiv
    +     *
    +     * XhtmlParser and XhtmlEncoder:
    +     *  * Do we need a better exception declaration?
    +     *
    +     * ElementDefinition
    +     *  * Backbone elements (eg .ElementDefinitionSlicingComponent) do not extend BackboneElement or have a @Block annotation for some reason
    +     *
    +     * Extension
    +     *  * Should URL not be StringType since it can't take extensions?
    +     * 
    + */ - @Test - public void testType() { - assertTrue(IBaseDatatype.class.isAssignableFrom(Type.class)); - } + @Test + public void testType() { + assertTrue(IBaseDatatype.class.isAssignableFrom(Type.class)); + } - /** - * This one should apply to all composite types - */ - @Test - public void testAddress() { - assertTrue(ICompositeType.class.isAssignableFrom(Address.class)); - } + /** + * This one should apply to all composite types + */ + @Test + public void testAddress() { + assertTrue(ICompositeType.class.isAssignableFrom(Address.class)); + } - @Test - public void testBase() { - assertTrue(IBase.class.isAssignableFrom(Base.class)); - } - - public void testIdentifierUse() throws Exception { - Child child = Identifier.class.getField("use").getAnnotation(Child.class); - assertEquals(IdentifierUseEnumFactory.class, child.enumFactory()); - } + @Test + public void testBase() { + assertTrue(IBase.class.isAssignableFrom(Base.class)); + } - - /** - * Should be "implements IBaseExtension" - */ - @Test - public void testExtension() { - assertTrue(IBaseExtension.class.isAssignableFrom(Extension.class)); - assertTrue(IBaseHasExtensions.class.isAssignableFrom(Extension.class)); - } + public void testIdentifierUse() throws Exception { + Child child = Identifier.class.getField("use").getAnnotation(Child.class); + assertEquals(IdentifierUseEnumFactory.class, child.enumFactory()); + } - @Test - public void testNarrative() { - assertTrue(INarrative.class.isAssignableFrom(Narrative.class)); - } - @Test - public void testBooleanType() { - assertTrue(IBaseBooleanDatatype.class.isAssignableFrom(BooleanType.class)); - } + /** + * Should be "implements IBaseExtension" + */ + @Test + public void testExtension() { + assertTrue(IBaseExtension.class.isAssignableFrom(Extension.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(Extension.class)); + } - @Test - public void testDecimalType() { - assertTrue(IBaseDecimalDatatype.class.isAssignableFrom(DecimalType.class)); - } + @Test + public void testNarrative() { + assertTrue(INarrative.class.isAssignableFrom(Narrative.class)); + } - @Test - public void testIntegerType() { - assertTrue(IBaseIntegerDatatype.class.isAssignableFrom(IntegerType.class)); - } + @Test + public void testBooleanType() { + assertTrue(IBaseBooleanDatatype.class.isAssignableFrom(BooleanType.class)); + } - @Test - public void testPrimitiveType() { - assertTrue(IPrimitiveType.class.isAssignableFrom(PrimitiveType.class)); - assertTrue(IBaseHasExtensions.class.isAssignableFrom(PrimitiveType.class)); - } + @Test + public void testDecimalType() { + assertTrue(IBaseDecimalDatatype.class.isAssignableFrom(DecimalType.class)); + } - @Test - public void testResource() { - assertTrue(IAnyResource.class.isAssignableFrom(Resource.class)); - } + @Test + public void testIntegerType() { + assertTrue(IBaseIntegerDatatype.class.isAssignableFrom(IntegerType.class)); + } - @Test - public void testBundle() { - assertTrue(IBaseBundle.class.isAssignableFrom(Bundle.class)); - } + @Test + public void testPrimitiveType() { + assertTrue(IPrimitiveType.class.isAssignableFrom(PrimitiveType.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(PrimitiveType.class)); + } - public void testIdType() { - assertTrue(IIdType.class.isAssignableFrom(IdType.class)); - } + @Test + public void testResource() { + assertTrue(IAnyResource.class.isAssignableFrom(Resource.class)); + } - @Test - public void testReference() { - assertTrue(IReference.class.isAssignableFrom(Reference.class)); - } + @Test + public void testBundle() { + assertTrue(IBaseBundle.class.isAssignableFrom(Bundle.class)); + } - @Test - public void testMeta() { - assertTrue(IMetaType.class.isAssignableFrom(Meta.class)); - } + public void testIdType() { + assertTrue(IIdType.class.isAssignableFrom(IdType.class)); + } - @Test - public void testBackboneElement() { - assertTrue(IBackboneElement.class.isAssignableFrom(BackboneElement.class)); - assertTrue(IBaseHasExtensions.class.isAssignableFrom(BackboneElement.class)); - assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(BackboneElement.class)); - } + @Test + public void testReference() { + assertTrue(IReference.class.isAssignableFrom(Reference.class)); + } - @Test - public void testElement() { - assertTrue(IBaseHasExtensions.class.isAssignableFrom(Element.class)); - } + @Test + public void testMeta() { + assertTrue(IMetaType.class.isAssignableFrom(Meta.class)); + } - @Test - public void testDomainResource() { - assertTrue(IBaseHasExtensions.class.isAssignableFrom(DomainResource.class)); - assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(DomainResource.class)); - } + @Test + public void testBackboneElement() { + assertTrue(IBackboneElement.class.isAssignableFrom(BackboneElement.class)); + assertTrue(IBaseHasExtensions.class.isAssignableFrom(BackboneElement.class)); + assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(BackboneElement.class)); + } - @Test - public void testCoding() { - assertTrue(ICoding.class.isAssignableFrom(Coding.class)); - } - - @Test - public void testTiming_TimingRepeatComponent() { - assertTrue(IDatatypeElement.class.isAssignableFrom(Timing.TimingRepeatComponent.class)); - assertNotNull(Timing.TimingRepeatComponent.class.getAnnotation(Block.class)); - } + @Test + public void testElement() { + assertTrue(IBaseHasExtensions.class.isAssignableFrom(Element.class)); + } + + @Test + public void testDomainResource() { + assertTrue(IBaseHasExtensions.class.isAssignableFrom(DomainResource.class)); + assertTrue(IBaseHasModifierExtensions.class.isAssignableFrom(DomainResource.class)); + } + + @Test + public void testCoding() { + assertTrue(ICoding.class.isAssignableFrom(Coding.class)); + } + + @Test + public void testTiming_TimingRepeatComponent() { + assertTrue(IDatatypeElement.class.isAssignableFrom(Timing.TimingRepeatComponent.class)); + assertNotNull(Timing.TimingRepeatComponent.class.getAnnotation(Block.class)); + } } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java index f7ba4972007..43272aa0daf 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/ContainedResourceEncodingTest.java @@ -173,13 +173,13 @@ public class ContainedResourceEncodingTest { CodeableConcept obsName = new CodeableConcept(); obsName.setText("name"); - observation.setCode(obsName); - - Reference result = dr.addResult(); - result.setResource(observation); - - ArrayList performers = new ArrayList(); - Reference performer = new Reference(); + observation.setCode(obsName); + + Reference result = dr.addResult(); + result.setResource(observation); + + ArrayList performers = new ArrayList(); + Reference performer = new Reference(); Practitioner p = new Practitioner(); p.setId((UUID.randomUUID().toString())); @@ -212,13 +212,13 @@ public class ContainedResourceEncodingTest { CodeableConcept obsName = new CodeableConcept(); obsName.setText("name"); - observation.setCode(obsName); - - Reference result = dr.addResult(); - result.setResource(observation); - - ArrayList performers = new ArrayList(); - Reference performer = new Reference(); + observation.setCode(obsName); + + Reference result = dr.addResult(); + result.setResource(observation); + + ArrayList performers = new ArrayList(); + Reference performer = new Reference(); Practitioner p = new Practitioner(); // no idDt on practitioner p diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java index 881c80f8b41..88217b3bd40 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java @@ -92,8 +92,8 @@ public class JsonParserTest { assertThat(out, containsString("hello")); } - - + + @Test public void testEncodeAndParseExtensions() throws Exception { @@ -107,11 +107,11 @@ public class JsonParserTest { Extension parent = new Extension().setUrl("http://example.com#parent"); patient.getExtension().add(parent); - Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1")); parent.getExtension().add(child1); - Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value2")); + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value2")); parent.getExtension().add(child2); - + Extension modExt = new Extension(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateType("1995-01-02")); @@ -134,78 +134,78 @@ public class JsonParserTest { ourLog.info(output); String enc = ourCtx.newJsonParser().encodeResourceToString(patient); - assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", - "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", + "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}" - )); - assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + - "{" + - "\"url\":\"http://example.com/extensions#modext\"," + - "\"valueDate\":\"1995-01-02\"" + - "}" + + )); + assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" + + "{" + + "\"url\":\"http://example.com/extensions#modext\"," + + "\"valueDate\":\"1995-01-02\"" + + "}" + "],")); - assertThat(enc, containsString("\"_given\":[" + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext\"," + - "\"valueString\":\"given\"" + - "}" + - "]" + - "}," + - "{" + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_parent\"," + - "\"extension\":[" + - "{" + - "\"url\":\"http://examples.com#givenext_child\"," + - "\"valueString\":\"CHILD\"" + - "}" + - "]" + - "}" + - "]" + + assertThat(enc, containsString("\"_given\":[" + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext\"," + + "\"valueString\":\"given\"" + + "}" + + "]" + + "}," + + "{" + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + + "\"extension\":[" + + "{" + + "\"url\":\"http://examples.com#givenext_child\"," + + "\"valueString\":\"CHILD\"" + + "}" + + "]" + + "}" + + "]" + "}")); /* * Now parse this back */ - - Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); ext = parsed.getExtension().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeType)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeType) ext.getValue()).getValueAsString()); parent = patient.getExtension().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringType)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringType) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringType)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringType) child2.getValue()).getValueAsString()); modExt = parsed.getModifierExtension().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateType)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getExtension().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringType)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringType) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getExtension().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); Extension given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringType)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringType) given2ext2.getValue()).getValue()); } - + @Test public void testEncodeNonContained() { Organization org = new Organization(); @@ -802,7 +802,7 @@ public class JsonParserTest { code.setDisplay("someDisplay"); code.addExtension().setUrl("urn:alt").setValue( new StringType("alt name")); - + String encoded = ourCtx.newJsonParser().encodeResourceToString(valueSet); ourLog.info(encoded); @@ -813,7 +813,7 @@ public class JsonParserTest { } - + @Test public void testMoreExtensions() throws Exception { @@ -847,10 +847,10 @@ public class JsonParserTest { Extension parent = new Extension().setUrl("http://example.com#parent"); patient.getExtension().add(parent); - Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1")); parent.getExtension().add(child1); - Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1")); parent.getExtension().add(child2); // END SNIPPET: subExtension @@ -866,7 +866,7 @@ public class JsonParserTest { assertThat(enc, containsString("")); } - + @Test public void testEncodeExtensionWithResourceContent() { IParser parser = new FhirContext().newJsonParser(); diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index 7c643b944bc..0c4c80d95be 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -889,11 +889,11 @@ public class XmlParserTest { Extension parent = new Extension().setUrl("http://example.com#parent"); patient.getExtension().add(parent); - Extension child1 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value1")); + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1")); parent.getExtension().add(child1); - Extension child2 = new Extension().setUrl( "http://example.com#child").setValue( new StringType("value2")); + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value2")); parent.getExtension().add(child2); - + Extension modExt = new Extension(); modExt.setUrl("http://example.com/extensions#modext"); modExt.setValue(new DateType("1995-01-02")); @@ -927,38 +927,38 @@ public class XmlParserTest { /* * Now parse this back */ - - Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc); + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); ext = parsed.getExtension().get(0); assertEquals("http://example.com/extensions#someext", ext.getUrl()); - assertEquals("2011-01-02T11:13:15", ((DateTimeType)ext.getValue()).getValueAsString()); + assertEquals("2011-01-02T11:13:15", ((DateTimeType) ext.getValue()).getValueAsString()); parent = patient.getExtension().get(1); assertEquals("http://example.com#parent", parent.getUrl()); assertNull(parent.getValue()); child1 = parent.getExtension().get(0); - assertEquals( "http://example.com#child", child1.getUrl()); - assertEquals("value1", ((StringType)child1.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringType) child1.getValue()).getValueAsString()); child2 = parent.getExtension().get(1); - assertEquals( "http://example.com#child", child2.getUrl()); - assertEquals("value2", ((StringType)child2.getValue()).getValueAsString()); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringType) child2.getValue()).getValueAsString()); modExt = parsed.getModifierExtension().get(0); assertEquals("http://example.com/extensions#modext", modExt.getUrl()); - assertEquals("1995-01-02", ((DateType)modExt.getValue()).getValueAsString()); + assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString()); name = parsed.getName().get(0); ext2 = name.getGiven().get(0).getExtension().get(0); assertEquals("http://examples.com#givenext", ext2.getUrl()); - assertEquals("given", ((StringType)ext2.getValue()).getValueAsString()); + assertEquals("given", ((StringType) ext2.getValue()).getValueAsString()); given2ext = name.getGiven().get(1).getExtension().get(0); assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); assertNull(given2ext.getValue()); Extension given2ext2 = given2ext.getExtension().get(0); assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); - assertEquals("CHILD", ((StringType)given2ext2.getValue()).getValue()); + assertEquals("CHILD", ((StringType) given2ext2.getValue()).getValue()); } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java index c50e1d743cd..3c6a4c52174 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dev/FhirDev.java @@ -108,11 +108,4 @@ public class FhirDev implements IFhirVersion { } - //@Override - public IBaseExtension newExtension() { - return null; - } - - - } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java index dabe17737c4..704611d5281 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java @@ -380,11 +380,5 @@ public class FhirDstu1 implements IFhirVersion { return ContainedDt.class; } - //@Override - public IBaseExtension newExtension() { - return null; - } - - } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java index 8a10b831cbd..aa7c086d95c 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/FhirDstu2.java @@ -93,9 +93,5 @@ public class FhirDstu2 implements IFhirVersion { throw new UnsupportedOperationException(); } - //@Override - public IBaseExtension newExtension() { - return null; - } } diff --git a/src/site/xdoc/doc_rest_server.xml b/src/site/xdoc/doc_rest_server.xml index 7f18525bfc3..21743afcf62 100644 --- a/src/site/xdoc/doc_rest_server.xml +++ b/src/site/xdoc/doc_rest_server.xml @@ -140,30 +140,31 @@ - +

    The server will return data in a number of places that includes the complete "identity" of a resource. Identity in this case refers to the - web address that a user can use to access the resource. + web address that a user can use to access the resource.

    - For instance, if your server is hosted at http://foo.com/fhir + For instance, if your server is hosted at + http://foo.com/fhir and your resource provider returns a Patient resource with the ID "123", the server should translate that ID to "http://foo.com/fhir/Patient/123".

    - The server will attempt to determine what the base URL should be based on - what the request it receives looks like, but if it is not getting - the right address you may wish to hardcode the base URL, as shown + The server will attempt to determine what the base URL should be based on + what the request it receives looks like, but if it is not getting + the right address you may wish to hardcode the base URL, as shown in the following example:

    - - + +
    - +

    From c2a6e78e67731b85627c1d2cd7850992d349e602 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 23 Feb 2015 18:27:13 -0500 Subject: [PATCH 10/12] Add conditional deletes and updates --- .../java/example/GenericClientExample.java | 59 ++++++++- .../RestfulPatientResourceProviderMore.java | 37 ++++++ .../annotation/ConditionalOperationParam.java | 32 +++++ .../ca/uhn/fhir/rest/api/MethodOutcome.java | 4 + .../BaseOutcomeReturningMethodBinding.java | 9 +- .../rest/method/ConditionalParamBinder.java | 57 ++++++++ .../ca/uhn/fhir/rest/method/MethodUtil.java | 7 + .../fhir/rest/method/UpdateMethodBinding.java | 22 +-- .../fhir/rest/client/GenericClientTest.java | 26 ++++ .../ModelInstantiationTest.java | 2 +- .../rest/server/DeleteConditionalTest.java | 125 ++++++++++++++++++ .../rest/server/UpdateConditionalTest.java | 78 +++++++---- src/site/resources/hapi.css | 20 +++ src/site/xdoc/doc_rest_client.xml | 61 ++++++++- src/site/xdoc/doc_rest_operations.xml | 55 +++++++- 15 files changed, 533 insertions(+), 61 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalOperationParam.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConditionalParamBinder.java rename hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/{dev => dstu2}/ModelInstantiationTest.java (97%) create mode 100644 hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/DeleteConditionalTest.java diff --git a/examples/src/main/java/example/GenericClientExample.java b/examples/src/main/java/example/GenericClientExample.java index e8e9d6e1b72..63c99a6f84d 100644 --- a/examples/src/main/java/example/GenericClientExample.java +++ b/examples/src/main/java/example/GenericClientExample.java @@ -10,6 +10,7 @@ import ca.uhn.fhir.model.base.resource.BaseConformance; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome; import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; import ca.uhn.fhir.model.dstu2.resource.Observation; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; import ca.uhn.fhir.model.dstu2.resource.Organization; import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.primitive.IdDt; @@ -68,6 +69,30 @@ public class GenericClientExample { System.out.println("Got ID: " + id.getValue()); // END SNIPPET: create } + { + Patient patient = new Patient(); + // START SNIPPET: createConditional + // One form + MethodOutcome outcome = client.create() + .resource(patient) + .conditionalByUrl("Patient?identifier=system%7C00001") + .execute(); + + // Another form + MethodOutcome outcome2 = client.create() + .resource(patient) + .conditional() + .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) + .execute(); + + // This will return true if the server responded with an HTTP 201 created, + // otherwise it will return null. + Boolean created = outcome.getCreated(); + + // The ID of the created, or the pre-existing resource + IdDt id = outcome.getId(); + // END SNIPPET: createConditional + } { // START SNIPPET: update Patient patient = new Patient(); @@ -95,6 +120,21 @@ public class GenericClientExample { System.out.println("Got ID: " + id.getValue()); // END SNIPPET: update } + { + Patient patient = new Patient(); + // START SNIPPET: updateConditional + client.update() + .resource(patient) + .conditionalByUrl("Patient?identifier=system%7C00001") + .execute(); + + client.update() + .resource(patient) + .conditional() + .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) + .execute(); + // END SNIPPET: updateConditional + } { // START SNIPPET: etagupdate // First, let's retrive the latest version of a resource @@ -132,16 +172,27 @@ public class GenericClientExample { } { // START SNIPPET: delete - // Retrieve the server's conformance statement and print its - // description - BaseOperationOutcome outcome = client.delete().resourceById(new IdDt("Patient", "1234")).execute(); + BaseOperationOutcome resp = client.delete().resourceById(new IdDt("Patient", "1234")).execute(); // outcome may be null if the server didn't return one - if (outcome != null) { + if (resp != null) { + OperationOutcome outcome = (OperationOutcome) resp; System.out.println(outcome.getIssueFirstRep().getDetailsElement().getValue()); } // END SNIPPET: delete } + { + // START SNIPPET: deleteConditional + client.delete() + .resourceConditionalByUrl("Patient?identifier=system%7C00001") + .execute(); + + client.delete() + .resourceConditionalByType("Patient") + .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("system", "00001")) + .execute(); + // END SNIPPET: deleteConditional + } { // START SNIPPET: search Bundle response = client.search() diff --git a/examples/src/main/java/example/RestfulPatientResourceProviderMore.java b/examples/src/main/java/example/RestfulPatientResourceProviderMore.java index f53638d4ec6..6dbea80e0fc 100644 --- a/examples/src/main/java/example/RestfulPatientResourceProviderMore.java +++ b/examples/src/main/java/example/RestfulPatientResourceProviderMore.java @@ -34,6 +34,7 @@ import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.rest.annotation.AddTags; +import ca.uhn.fhir.rest.annotation.ConditionalOperationParam; import ca.uhn.fhir.rest.annotation.Count; import ca.uhn.fhir.rest.annotation.Create; import ca.uhn.fhir.rest.annotation.DeleteTags; @@ -324,6 +325,23 @@ public void deletePatient(@IdParam IdDt theId) { //END SNIPPET: delete +//START SNIPPET: deleteConditional +@Read() +public void deletePatientConditional(@IdParam IdDt theId, @ConditionalOperationParam String theConditionalUrl) { + // Only one of theId or theConditionalUrl will have a value depending + // on whether the URL receieved was a logical ID, or a conditional + // search string + if (theId != null) { + // do a normal delete + } else { + // do a conditional delete + } + + // otherwise, delete was successful + return; // can also return MethodOutcome +} +//END SNIPPET: deleteConditional + //START SNIPPET: history @History() public List getPatientHistory(@IdParam IdDt theId) { @@ -681,6 +699,25 @@ public MethodOutcome createPatient(@ResourceParam Patient thePatient) { public abstract MethodOutcome createNewPatient(@ResourceParam Patient thePatient); //END SNIPPET: createClient +//START SNIPPET: updateConditional +@Update +public MethodOutcome updatePatientConditional( + @ResourceParam Patient thePatient, + @IdParam IdDt theId, + @ConditionalOperationParam String theConditional) { + + // Only one of theId or theConditional will have a value and the other will be null, + // depending on the URL passed into the server. + if (theConditional != null) { + // Do a conditional update. theConditional will have a value like "Patient?identifier=system%7C00001" + } else { + // Do a normal update. theId will have the identity of the resource to update + } + + return new MethodOutcome(); // populate this +} +//END SNIPPET: updateConditional + //START SNIPPET: update @Update public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalOperationParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalOperationParam.java new file mode 100644 index 00000000000..39bf0211ae9 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/ConditionalOperationParam.java @@ -0,0 +1,32 @@ +package ca.uhn.fhir.rest.annotation; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.PARAMETER) +public @interface ConditionalOperationParam { + // just a marker +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java index 8f513af3020..4716262608c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/MethodOutcome.java @@ -131,6 +131,10 @@ public class MethodOutcome { return myVersionId; } + /** + * This will be set to {@link Boolean#TRUE} for instance of MethodOutcome which are + * returned to client instances, if the server has responded with an HTTP 201 Created. + */ public Boolean getCreated() { return myCreated; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java index 3dafdde18fe..f1c5da22ade 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java @@ -273,11 +273,16 @@ abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBinding wantedResourceType = requestContainsResourceType(); + IResource retVal; if (wantedResourceType != null) { - return (IResource) parser.parseResource(wantedResourceType, requestReader); + retVal = (IResource) parser.parseResource(wantedResourceType, requestReader); } else { - return parser.parseResource(requestReader); + retVal = parser.parseResource(requestReader); } + + retVal.setId(theRequest.getId()); + + return retVal; } protected abstract Set provideAllowableRequestTypes(); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConditionalParamBinder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConditionalParamBinder.java new file mode 100644 index 00000000000..c5bbdd43964 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConditionalParamBinder.java @@ -0,0 +1,57 @@ +package ca.uhn.fhir.rest.method; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; + +class ConditionalParamBinder implements IParameter { + + ConditionalParamBinder() { + super(); + } + + @Override + public void translateClientArgumentIntoQueryArgument(FhirContext theContext, Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException { + throw new UnsupportedOperationException(); + } + + @Override + public Object translateQueryParametersIntoServerArgument(Request theRequest, Object theRequestContents) throws InternalErrorException, InvalidRequestException { + if (theRequest.getId() != null && theRequest.getId().hasIdPart()) { + return null; + } + int questionMarkIndex = theRequest.getCompleteUrl().indexOf('?'); + return theRequest.getResourceName() + theRequest.getCompleteUrl().substring(questionMarkIndex); + } + + @Override + public void initializeTypes(Method theMethod, Class> theOuterCollectionType, Class> theInnerCollectionType, Class theParameterType) { + // nothing + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java index 37c8d260672..c43f5605376 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java @@ -47,6 +47,7 @@ import ca.uhn.fhir.model.base.resource.BaseOperationOutcome; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.rest.annotation.ConditionalOperationParam; import ca.uhn.fhir.rest.annotation.Count; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.IncludeParam; @@ -289,6 +290,10 @@ public class MethodUtil { return MethodUtil.findParamAnnotationIndex(theMethod, TagListParam.class); } + public static Integer findConditionalOperationParameterIndex(Method theMethod) { + return MethodUtil.findParamAnnotationIndex(theMethod, ConditionalOperationParam.class); + } + @SuppressWarnings("deprecation") public static Integer findVersionIdParameterIndex(Method theMethod) { return MethodUtil.findParamAnnotationIndex(theMethod, VersionIdParam.class); @@ -390,6 +395,8 @@ public class MethodUtil { param = new SortParameter(); } else if (nextAnnotation instanceof TransactionParam) { param = new TransactionParamBinder(theContext); + } else if (nextAnnotation instanceof ConditionalOperationParam) { + param = new ConditionalParamBinder(); } else { continue; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java index 3974cfef2bf..965832c2a11 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java @@ -20,19 +20,17 @@ package ca.uhn.fhir.rest.method; * #L% */ -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.lang.reflect.Method; import java.util.Collections; import java.util.Set; -import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; import ca.uhn.fhir.model.primitive.IdDt; -import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Update; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.client.BaseHttpClientInvocation; @@ -43,16 +41,11 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceParam { private Integer myIdParameterIndex; - private Integer myVersionIdParameterIndex; public UpdateMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, Update.class, theProvider); myIdParameterIndex = MethodUtil.findIdParameterIndex(theMethod); - if (myIdParameterIndex == null) { - throw new ConfigurationException("Method '" + theMethod.getName() + "' on type '" + theMethod.getDeclaringClass().getCanonicalName() + "' has no parameter annotated with the @" + IdParam.class.getSimpleName() + " annotation"); - } - myVersionIdParameterIndex = MethodUtil.findVersionIdParameterIndex(theMethod); } @Override @@ -92,7 +85,7 @@ class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceP if (theRequest.getId() != null && theRequest.getId().hasVersionIdPart() == false) { if (id != null && id.hasVersionIdPart()) { - theRequest.setId(id); + theRequest.getId().setValue(id.getValue()); } } @@ -104,9 +97,8 @@ class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceP } } - theParams[myIdParameterIndex] = theRequest.getId(); - if (myVersionIdParameterIndex != null) { - theParams[myVersionIdParameterIndex] = theRequest.getId(); + if (myIdParameterIndex != null) { + theParams[myIdParameterIndex] = theRequest.getId(); } } @@ -117,12 +109,6 @@ class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceP throw new NullPointerException("ID can not be null"); } - if (myVersionIdParameterIndex != null) { - IdDt versionIdDt = (IdDt) theArgs[myVersionIdParameterIndex]; - if (idDt.hasVersionIdPart() == false) { - idDt = idDt.withVersion(versionIdDt.getIdPart()); - } - } FhirContext context = getContext(); HttpPutClientInvocation retVal = MethodUtil.createUpdateInvocation(theResource, null, idDt, context); diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java index 2bf4ef3d39f..e828e14875d 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java @@ -119,6 +119,32 @@ public class GenericClientTest { return msg; } + @Test + public void testCreatePopulatesIsCreated() throws Exception { + + Patient p1 = new Patient(); + p1.addIdentifier("foo:bar", "12345"); + p1.addName().addFamily("Smith").addGiven("John"); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse); + when(myHttpResponse.getAllHeaders()).thenReturn(new Header[] { new BasicHeader(Constants.HEADER_LOCATION, "/Patient/44/_history/22") }); + when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"))); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir"); + + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 201, "OK")); + MethodOutcome resp = client.create().resource(ourCtx.newXmlParser().encodeResourceToString(p1)).execute(); + assertTrue(resp.getCreated()); + + when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + resp = client.create().resource(ourCtx.newXmlParser().encodeResourceToString(p1)).execute(); + assertNull(resp.getCreated()); + + } + + @Test public void testCreateWithStringAutoDetectsEncoding() throws Exception { diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dev/ModelInstantiationTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dstu2/ModelInstantiationTest.java similarity index 97% rename from hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dev/ModelInstantiationTest.java rename to hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dstu2/ModelInstantiationTest.java index 6ca37f3cfa8..a0b2120ddc6 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dev/ModelInstantiationTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/model/dstu2/ModelInstantiationTest.java @@ -1,4 +1,4 @@ -package ca.uhn.fhir.model.dev; +package ca.uhn.fhir.model.dstu2; import java.util.Properties; diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/DeleteConditionalTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/DeleteConditionalTest.java new file mode 100644 index 00000000000..9bdb257e4ec --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/DeleteConditionalTest.java @@ -0,0 +1,125 @@ +package ca.uhn.fhir.rest.server; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.concurrent.TimeUnit; + +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.servlet.ServletHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.annotation.ConditionalOperationParam; +import ca.uhn.fhir.rest.annotation.Delete; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.util.PortUtil; + +/** + * Created by dsotnikov on 2/25/2014. + */ +public class DeleteConditionalTest { + private static CloseableHttpClient ourClient; + private static String ourLastConditionalUrl; + private static int ourPort; + + private static Server ourServer; + private static IdDt ourLastIdParam; + + + + @Before + public void before() { + ourLastConditionalUrl = null; + ourLastIdParam = null; + } + + @Test + public void testUpdateWithConditionalUrl() throws Exception { + Patient patient = new Patient(); + patient.addIdentifier().setValue("002"); + + HttpDelete httpPost = new HttpDelete("http://localhost:" + ourPort + "/Patient?identifier=system%7C001"); + + HttpResponse status = ourClient.execute(httpPost); + + assertEquals(204, status.getStatusLine().getStatusCode()); + + assertNull(ourLastIdParam); + assertEquals("Patient?identifier=system%7C001", ourLastConditionalUrl); + } + + + @Test + public void testUpdateWithoutConditionalUrl() throws Exception { + Patient patient = new Patient(); + patient.addIdentifier().setValue("002"); + + HttpDelete httpPost = new HttpDelete("http://localhost:" + ourPort + "/Patient/2"); + + HttpResponse status = ourClient.execute(httpPost); + + assertEquals(204, status.getStatusLine().getStatusCode()); + + assertEquals("Patient/2", ourLastIdParam.toUnqualified().getValue()); + assertNull(ourLastConditionalUrl); + } + + @AfterClass + public static void afterClass() throws Exception { + ourServer.stop(); + } + + + @BeforeClass + public static void beforeClass() throws Exception { + ourPort = PortUtil.findFreePort(); + ourServer = new Server(ourPort); + + PatientProvider patientProvider = new PatientProvider(); + + ServletHandler proxyHandler = new ServletHandler(); + RestfulServer servlet = new RestfulServer(); + servlet.setResourceProviders(patientProvider); + ServletHolder servletHolder = new ServletHolder(servlet); + proxyHandler.addServletWithMapping(servletHolder, "/*"); + ourServer.setHandler(proxyHandler); + ourServer.start(); + + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); + HttpClientBuilder builder = HttpClientBuilder.create(); + builder.setConnectionManager(connectionManager); + ourClient = builder.build(); + + } + + public static class PatientProvider implements IResourceProvider { + + @Override + public Class getResourceType() { + return Patient.class; + } + + + @Delete() + public MethodOutcome updatePatient(@ConditionalOperationParam String theConditional, @IdParam IdDt theIdParam) { + ourLastConditionalUrl = theConditional; + ourLastIdParam = theIdParam; + return new MethodOutcome(new IdDt("Patient/001/_history/002")); + } + + } + +} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java index bdf667faa0f..bb16f19cbbb 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java @@ -31,6 +31,7 @@ import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; import ca.uhn.fhir.model.dstu2.resource.Organization; import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.annotation.ConditionalOperationParam; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.ResourceParam; import ca.uhn.fhir.rest.annotation.Update; @@ -42,17 +43,30 @@ import ca.uhn.fhir.util.PortUtil; */ public class UpdateConditionalTest { private static CloseableHttpClient ourClient; + private static String ourLastConditionalUrl; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class); private static int ourPort; + private static Server ourServer; + private static IdDt ourLastId; + private static IdDt ourLastIdParam; + + + + @Before + public void before() { + ourLastId = null; + ourLastConditionalUrl = null; + ourLastIdParam = null; + } @Test - public void testUpdate() throws Exception { + public void testUpdateWithConditionalUrl() throws Exception { Patient patient = new Patient(); patient.addIdentifier().setValue("002"); - HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001"); + HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient?identifier=system%7C001"); httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); HttpResponse status = ourClient.execute(httpPost); @@ -62,22 +76,48 @@ public class UpdateConditionalTest { ourLog.info("Response was:\n{}", responseContent); - OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent); - assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails()); + assertEquals(200, status.getStatusLine().getStatusCode()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue()); + assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue()); + + assertNull(ourLastId.getValue()); + assertNull(ourLastIdParam); + assertEquals("Patient?identifier=system%7C001", ourLastConditionalUrl); + + } + + @Test + public void testUpdateWithoutConditionalUrl() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setValue("002"); + + HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/2"); + httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); + + HttpResponse status = ourClient.execute(httpPost); + + String responseContent = IOUtils.toString(status.getEntity().getContent()); + IOUtils.closeQuietly(status.getEntity().getContent()); + + ourLog.info("Response was:\n{}", responseContent); assertEquals(200, status.getStatusLine().getStatusCode()); assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue()); assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue()); + + assertEquals("Patient/2", ourLastId.toUnqualified().getValue()); + assertEquals("Patient/2", ourLastIdParam.toUnqualified().getValue()); + assertNull(ourLastConditionalUrl); } - - - + @AfterClass public static void afterClass() throws Exception { ourServer.stop(); } - + + @BeforeClass public static void beforeClass() throws Exception { ourPort = PortUtil.findFreePort(); @@ -99,14 +139,6 @@ public class UpdateConditionalTest { ourClient = builder.build(); } - - private static String ourLastConditionalUrl; - - - @Before - public void before() { - ourLastConditionalUrl=null; - } public static class PatientProvider implements IResourceProvider { @@ -117,15 +149,11 @@ public class UpdateConditionalTest { @Update() - public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) { - IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue()); - OperationOutcome oo = new OperationOutcome(); - oo.addIssue().setDetails("OODETAILS"); - if (theId.getValueAsString().contains("CREATE")) { - return new MethodOutcome(id,oo, true); - } - - return new MethodOutcome(id,oo); + public MethodOutcome updatePatient(@ResourceParam Patient thePatient, @ConditionalOperationParam String theConditional, @IdParam IdDt theIdParam) { + ourLastConditionalUrl = theConditional; + ourLastId = thePatient.getId(); + ourLastIdParam = theIdParam; + return new MethodOutcome(new IdDt("Patient/001/_history/002")); } } diff --git a/src/site/resources/hapi.css b/src/site/resources/hapi.css index d1a0f120dad..6a8a833122e 100644 --- a/src/site/resources/hapi.css +++ b/src/site/resources/hapi.css @@ -43,6 +43,25 @@ */ +.well { + padding: 5px; +} + +.nav-list { + padding-right: 0px; + font-size: 12px; +} + +.nav-list LI { + line-height: 15px; +} + +/* +.nav-list .divider { + display: none; +} +*/ + body { padding-top: 40px; padding-bottom: 10px; @@ -126,6 +145,7 @@ h4 { font-size: 1.2em; padding: 0px; margin-bottom: 0px; + margin-top: 20px; } li.expanded ul { diff --git a/src/site/xdoc/doc_rest_client.xml b/src/site/xdoc/doc_rest_client.xml index fd645fa897b..3d79cd3b349 100644 --- a/src/site/xdoc/doc_rest_client.xml +++ b/src/site/xdoc/doc_rest_client.xml @@ -12,9 +12,6 @@

    - - -

    HAPI provides a built-in mechanism for connecting to FHIR RESTful servers. @@ -151,13 +148,23 @@ value="examples/src/main/java/example/GenericClientExample.java" /> -

    Search - Using HTTP POST or GET with _search

    +

    Search - Using HTTP POST

    +

    + The FHIR specification allows the use of an HTTP POST to transmit a search to a server instead of using + an HTTP GET. With this style of search, the search parameters are included in the request body instead + of the request URL, which can be useful if you need to transmit a search with a large number + of parameters. +

    - The FHIR specification allows several styles of search (HTTP POST, a GET with _search at the end of the URL, etc.) The usingStyle() method controls which style to use. By default, GET style is used unless the client detects that the request would result in a very long URL (over 8000 chars) in which case the client automatically switches to POST.

    +

    + An alternate form of the search URL (using a URL ending with _search) was also + supported in FHIR DSTU1. This form is no longer valid in FHIR DSTU2, but HAPI retains support + for using this form in order to interoperate with servers which use it. +

    + +

    Conditional Creates

    +

    + FHIR also specifies a type of update called "conditional create", where + a set of search parameters are provided and a new resource is only + created if no existing resource matches those parameters. See the + FHIR specification for more information on conditional creation. +

    + + + + @@ -239,7 +259,21 @@ - +

    Conditional Deletes

    +

    + Conditional deletions are also possible, which is a form where + instead of deleting a resource using its logical ID, you specify + a set of search criteria and a single resource is deleted if + it matches that criteria. Note that this is not a mechanism + for bulk deletion; see the FHIR specification for information + on conditional deletes and how they are used. +

    + + + + +

    @@ -257,6 +291,21 @@ value="examples/src/main/java/example/GenericClientExample.java" /> +

    Conditional Updates

    +

    + FHIR also specifies a type of update called "conditional updates", where + insetad of using the logical ID of a resource to update, a set of + search parameters is provided. If a single resource matches that set of + parameters, that resource is updated. See the FHIR specification for + information on how conditional updates work. +

    + + + + + +

    ETags and Resource Contention

    See also the page on ETag Support diff --git a/src/site/xdoc/doc_rest_operations.xml b/src/site/xdoc/doc_rest_operations.xml index 6ee614d5a96..629267a2cf1 100644 --- a/src/site/xdoc/doc_rest_operations.xml +++ b/src/site/xdoc/doc_rest_operations.xml @@ -9,6 +9,7 @@

    +
    - +
    +

    The following table lists the operations supported by HAPI FHIR RESTful Servers and Clients.

    +
    @@ -279,10 +283,10 @@ annotation. This parameter contains the resource instance to be created.

    - In addition, the method must have a parameter annotated with the + In addition, the method may optionally have a parameter annotated with the @IdParam - annotation, and optionally may have a parameter annotated with the - @VersionIdParam + annotation, or they may obtain the ID of the resource being updated from + the resource itself. Either way, this ID comes from the URL passed in.

    Update methods must return an object of type @@ -315,6 +319,27 @@ + +

    Conditional Updates

    +

    + If you wish to suport conditional updates, you can add a parameter + tagged with a + @ConditionalOperationParam + annotation. If the request URL contains search parameters instead of a + resource ID, then this parameter will be populated. +

    + + + + + + +

    + Example URL to invoke this method (this would be invoked using an HTTP PUT, + with the resource in the PUT body): +
    + http://fhir.example.com/Patient?identifier=system%7C00001 +

    @@ -373,6 +398,26 @@ http://fhir.example.com/Patient/111

    +

    Conditional Deletes

    + +

    + The FHIR specification also allows "conditional deletes". A conditional + delete uses a search style URL instead of a read style URL, and + deletes a single resource if it matches the given search parameters. + The following example shows how to +

    + + + + + + +

    + Example URL to perform a conditional delete (HTTP DELETE): +
    + http://fhir.example.com/Patient?identifier=system%7C0001 +

    +
    From f7a8c8d5f5e7e6f32bbccbf352dd7278dbfe9e25 Mon Sep 17 00:00:00 2001 From: mochaholic Date: Mon, 23 Feb 2015 17:39:23 -0700 Subject: [PATCH 11/12] Fixed issue #115. --- .../ca/uhn/fhirtest/TestRestfulServer.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java index 93498cec5af..e8ebe4eea95 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java @@ -1,11 +1,13 @@ package ca.uhn.fhirtest; +import java.util.ArrayList; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import ca.uhn.fhir.jpa.provider.JpaSystemProviderDstu2; import org.apache.commons.lang3.StringUtils; import org.springframework.context.ApplicationContext; import org.springframework.web.context.ContextLoaderListener; @@ -50,7 +52,8 @@ public class TestRestfulServer extends RestfulServer { // retrieve all the appropriate resource providers and the // conformance provider List beans; - JpaSystemProviderDstu1 systemProvider; + JpaSystemProviderDstu1 systemProviderDstu1 = null; + JpaSystemProviderDstu2 systemProviderDstu2 = null; IFhirSystemDao systemDao; ETagSupportEnum etagSupport; String baseUrlProperty; @@ -58,7 +61,7 @@ public class TestRestfulServer extends RestfulServer { case "BASE": { setFhirContext(FhirContext.forDstu1()); beans = myAppCtx.getBean("myResourceProvidersDstu1", List.class); - systemProvider = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProviderDstu1.class); + systemProviderDstu1 = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProviderDstu1.class); systemDao = myAppCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); etagSupport = ETagSupportEnum.DISABLED; JpaConformanceProviderDstu1 confProvider = new JpaConformanceProviderDstu1(this, systemDao); @@ -70,7 +73,7 @@ public class TestRestfulServer extends RestfulServer { case "DSTU1": { setFhirContext(FhirContext.forDstu1()); beans = myAppCtx.getBean("myResourceProvidersDstu1", List.class); - systemProvider = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProviderDstu1.class); + systemProviderDstu1 = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProviderDstu1.class); systemDao = myAppCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); etagSupport = ETagSupportEnum.DISABLED; JpaConformanceProviderDstu1 confProvider = new JpaConformanceProviderDstu1(this, systemDao); @@ -82,7 +85,7 @@ public class TestRestfulServer extends RestfulServer { case "DSTU2": { setFhirContext(FhirContext.forDstu2()); beans = myAppCtx.getBean("myResourceProvidersDstu2", List.class); - systemProvider = myAppCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu1.class); + systemProviderDstu2 = myAppCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu2.class); systemDao = myAppCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class); etagSupport = ETagSupportEnum.ENABLED; JpaConformanceProviderDstu2 confProvider = new JpaConformanceProviderDstu2(this, systemDao); @@ -115,7 +118,13 @@ public class TestRestfulServer extends RestfulServer { ourLog.info(" * Have resource provider for: {}", nextResourceProvider.getResourceType().getSimpleName()); } setResourceProviders(beans); - setPlainProviders(systemProvider); + + List provList = new ArrayList(); + if (systemProviderDstu1 != null) + provList.add(systemProviderDstu1); + if (systemProviderDstu2 != null) + provList.add(systemProviderDstu2); + setPlainProviders(provList); /* * This tells the server to use "incorrect" MIME types if it detects that the From 2c4b37e5f0c5c9d46b6d1652adb704530aabbfc8 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 24 Feb 2015 16:40:38 -0500 Subject: [PATCH 12/12] Just eclipse settings --- hapi-fhir-jpaserver-base/.classpath | 2 +- .../.settings/org.eclipse.wst.common.project.facet.core.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/.classpath b/hapi-fhir-jpaserver-base/.classpath index 9ebe1a6b158..f9148a1a7ac 100644 --- a/hapi-fhir-jpaserver-base/.classpath +++ b/hapi-fhir-jpaserver-base/.classpath @@ -27,7 +27,7 @@ - + diff --git a/hapi-fhir-jpaserver-base/.settings/org.eclipse.wst.common.project.facet.core.xml b/hapi-fhir-jpaserver-base/.settings/org.eclipse.wst.common.project.facet.core.xml index 5c9bd7532ab..4f92af543f1 100644 --- a/hapi-fhir-jpaserver-base/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/hapi-fhir-jpaserver-base/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,5 +1,5 @@ - +