From 86151d5f13ecb6d48b5895c0fcbb25856f838af2 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 7 May 2019 09:30:08 +1000 Subject: [PATCH] add generated patterns --- .gitignore | 1 + .../fhir/r5/conformance/ProfileUtilities.java | 39 +- .../org/hl7/fhir/r5/model/Definition.java | 574 ++++++++ .../java/org/hl7/fhir/r5/model/Event.java | 699 ++++++++++ .../java/org/hl7/fhir/r5/model/Fivews.java | 1044 +++++++++++++++ .../org/hl7/fhir/r5/model/PatternBase.java | 5 + .../java/org/hl7/fhir/r5/model/Request.java | 1150 ++++++++++++++++- 7 files changed, 3455 insertions(+), 57 deletions(-) create mode 100644 org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Definition.java create mode 100644 org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Event.java create mode 100644 org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Fivews.java create mode 100644 org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PatternBase.java diff --git a/.gitignore b/.gitignore index 265e9a70b..816f2294d 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,4 @@ local.properties /org.hl7.fhir.r4/src/main/resources/gen /release_batch_template.txt /org.hl7.fhir.r5/src/main/resources/graphql/*.out +/zuliprc diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index f058b3e50..0764ecb11 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -427,7 +427,7 @@ public class ProfileUtilities extends TranslatingUtilities { // we actually delegate the work to a subroutine so we can re-enter it with a different cursors processPaths("", derived.getSnapshot(), base.getSnapshot(), derived.getDifferential(), baseCursor, diffCursor, base.getSnapshot().getElement().size()-1, - derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, webUrl, derived.getId(), null, null, false, base.getUrl(), null, false, new ArrayList()); + derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, webUrl, derived.getId(), null, null, false, base.getUrl(), null, false, new ArrayList(), base); if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty()) throw new Error("type on first snapshot element for "+derived.getSnapshot().getElementFirstRep().getPath()+" in "+derived.getUrl()+" from "+base.getUrl()); updateMaps(base, derived); @@ -544,11 +544,12 @@ public class ProfileUtilities extends TranslatingUtilities { /** * @param trimDifferential + * @param srcSD * @throws DefinitionException, FHIRException * @throws Exception */ private ElementDefinition processPaths(String indent, StructureDefinitionSnapshotComponent result, StructureDefinitionSnapshotComponent base, StructureDefinitionDifferentialComponent differential, int baseCursor, int diffCursor, int baseLimit, - int diffLimit, String url, String webUrl, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone, List redirector) throws DefinitionException, FHIRException { + int diffLimit, String url, String webUrl, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone, List redirector, StructureDefinition srcSD) throws DefinitionException, FHIRException { if (DEBUG) System.out.println(indent+"PP @ "+resultPathBase+" / "+contextPathSrc+" : base = "+baseCursor+" to "+baseLimit+", diff = "+diffCursor+" to "+diffLimit+" (slicing = "+slicingDone+", redirector = "+(redirector == null ? "null" : redirector.toString())+")"); ElementDefinition res = null; @@ -590,7 +591,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), cpath+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor-1, url, webUrl, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector); + diffCursor-1, url, webUrl, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector, srcSD); } baseCursor++; } else if (diffMatches.size() == 1 && (slicingDone || !(diffMatches.get(0).hasSlicing() || (isExtension(diffMatches.get(0)) && diffMatches.get(0).hasSliceName())))) {// one matching element in the differential @@ -640,7 +641,7 @@ public class ProfileUtilities extends TranslatingUtilities { if (diffMatches.get(0).hasSliceName()) outcome.setSliceName(diffMatches.get(0).getSliceName()); outcome.setSlicing(null); - updateFromDefinition(outcome, diffMatches.get(0), profileName, trimDifferential, url); + updateFromDefinition(outcome, diffMatches.get(0), profileName, trimDifferential, url, srcSD); if (outcome.getPath().endsWith("[x]") && outcome.getType().size() == 1 && !outcome.getType().get(0).getCode().equals("*")) // if the base profile allows multiple types, but the profile only allows one, rename it outcome.setPath(outcome.getPath().substring(0, outcome.getPath().length()-3)+Utilities.capitalize(outcome.getType().get(0).getCode())); if (resultPathBase == null) @@ -689,14 +690,14 @@ public class ProfileUtilities extends TranslatingUtilities { int nbl = nbc; while (nbl < base.getElement().size() && base.getElement().get(nbl).getPath().startsWith(tgt.getPath()+".")) nbl++; - processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, webUrl, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirectorStack(redirector, outcome, cpath)); + processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, webUrl, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirectorStack(redirector, outcome, cpath), srcSD); } else { StructureDefinition dt = outcome.getType().size() == 1 ? getProfileForDataType(outcome.getType().get(0)) : getProfileForDataType("Element"); if (dt == null) throw new DefinitionException(diffMatches.get(0).getPath()+" has children ("+differential.getElement().get(diffCursor).getPath()+") for type "+typeCode(outcome.getType())+" in profile "+profileName+", but can't find type"); contextName = dt.getUrl(); processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, new ArrayList()); + diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, new ArrayList(), srcSD); } } } @@ -708,7 +709,7 @@ public class ProfileUtilities extends TranslatingUtilities { int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); ElementDefinition e = processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, - trimDifferential, contextName, resultPathBase, true, redirector); + trimDifferential, contextName, resultPathBase, true, redirector, srcSD); if (e==null) throw new FHIRException("Did not find type root: " + diffMatches.get(0).getPath()); start++; @@ -718,7 +719,7 @@ public class ProfileUtilities extends TranslatingUtilities { // our processing scope for the differential is the item in the list, and all the items before the next one in the list ndc = differential.getElement().indexOf(diffMatches.get(i)); ndl = findEndOfElement(differential, ndc); - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, redirector); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, redirector, srcSD); } // ok, done with that - next in the base list baseCursor = nbl+1; @@ -741,7 +742,7 @@ public class ProfileUtilities extends TranslatingUtilities { int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); ElementDefinition e = processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, - trimDifferential, contextName, resultPathBase, true, redirector); + trimDifferential, contextName, resultPathBase, true, redirector, srcSD); if (e==null) throw new FHIRException("Did not find single slice: " + diffMatches.get(0).getPath()); e.setSlicing(diffMatches.get(0).getSlicing()); @@ -762,7 +763,7 @@ public class ProfileUtilities extends TranslatingUtilities { // differential - if the first one in the list has a name, we'll process it. Else we'll treat it as the base definition of the slice. if (!diffMatches.get(0).hasSliceName()) { - updateFromDefinition(outcome, diffMatches.get(0), profileName, trimDifferential, url); + updateFromDefinition(outcome, diffMatches.get(0), profileName, trimDifferential, url, srcSD); if (!outcome.hasContentReference() && !outcome.hasType()) { throw new DefinitionException("not done yet"); } @@ -785,7 +786,7 @@ public class ProfileUtilities extends TranslatingUtilities { continue; }*/ // now we process the base scope repeatedly for each instance of the item in the differential list - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, redirector); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, redirector, srcSD); } // ok, done with that - next in the base list baseCursor = nbl+1; @@ -835,7 +836,7 @@ public class ProfileUtilities extends TranslatingUtilities { updateFromBase(outcome, currentBase); if (diffMatches.get(0).hasSlicing() || !diffMatches.get(0).hasSliceName()) { updateFromSlicing(outcome.getSlicing(), diffMatches.get(0).getSlicing()); - updateFromDefinition(outcome, diffMatches.get(0), profileName, closed, url); // if there's no slice, we don't want to update the unsliced description + updateFromDefinition(outcome, diffMatches.get(0), profileName, closed, url, srcSD); // if there's no slice, we don't want to update the unsliced description } else if (!diffMatches.get(0).hasSliceName()) diffMatches.get(0).setUserData(GENERATED_IN_SNAPSHOT, true); // because of updateFromDefinition isn't called @@ -848,7 +849,7 @@ public class ProfileUtilities extends TranslatingUtilities { int nbl = findEndOfElement(base, baseCursor); int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); - processPaths(indent+" ", result, base, differential, baseCursor+1, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null); + processPaths(indent+" ", result, base, differential, baseCursor+1, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null, srcSD); // throw new Error("Not done yet"); // } else if (currentBase.getType().get(0).getCode().equals("BackboneElement") && diffMatches.size() > 0 && diffMatches.get(0).hasSliceName()) { } else if (currentBase.getType().get(0).getCode().equals("BackboneElement")) { @@ -878,7 +879,7 @@ public class ProfileUtilities extends TranslatingUtilities { int ndc = differential.getElement().indexOf(diffMatches.get(diffpos)); int ndl = findEndOfElement(differential, ndc); // now we process the base scope repeatedly for each instance of the item in the differential list - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true, redirector); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, webUrl, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true, redirector, srcSD); // ok, done with that - now set the cursors for if this is the end baseCursor = nbl; diffCursor = ndl+1; @@ -919,7 +920,7 @@ public class ProfileUtilities extends TranslatingUtilities { if (!outcome.getPath().startsWith(resultPathBase)) throw new DefinitionException("Adding wrong path"); result.getElement().add(outcome); - updateFromDefinition(outcome, diffItem, profileName, trimDifferential, url); + updateFromDefinition(outcome, diffItem, profileName, trimDifferential, url, srcSD); // --- LM Added this diffCursor = differential.getElement().indexOf(diffItem)+1; if (!outcome.getType().isEmpty() && (/*outcome.getType().get(0).getCode().equals("Extension") || */differential.getElement().size() > diffCursor) && outcome.getPath().contains(".") && isDataType(outcome.getType())) { // don't want to do this for the root, since that's base, and we're already processing it @@ -940,7 +941,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), diffMatches.get(0).getPath()+".")) diffCursor++; processPaths(indent+" ", result, base, differential, baseStart, start-1, baseMax-1, - diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), base.getElement().get(0).getPath(), base.getElement().get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirector); + diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), base.getElement().get(0).getPath(), base.getElement().get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirector, srcSD); } else { StructureDefinition dt = getProfileForDataType(outcome.getType().get(0)); @@ -954,7 +955,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), diffMatches.get(0).getPath()+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start-1, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector); + diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector, srcSD); } } else if (outcome.getType().get(0).getCode().equals("Extension")) { // Force URL to appear if we're dealing with an extension. (This is a kludge - may need to drill down in other cases where we're slicing and the type has a profile declaration that could be setting the fixed value) @@ -1455,7 +1456,7 @@ public class ProfileUtilities extends TranslatingUtilities { return true; } - private void updateFromDefinition(ElementDefinition dest, ElementDefinition source, String pn, boolean trimDifferential, String purl) throws DefinitionException, FHIRException { + private void updateFromDefinition(ElementDefinition dest, ElementDefinition source, String pn, boolean trimDifferential, String purl, StructureDefinition srcSD) throws DefinitionException, FHIRException { source.setUserData(GENERATED_IN_SNAPSHOT, true); // we start with a clone of the base profile ('dest') and we copy from the profile ('source') // over the top for anything the source has @@ -1723,7 +1724,7 @@ public class ProfileUtilities extends TranslatingUtilities { ok = true; } if (!ok) - throw new DefinitionException("StructureDefinition "+pn+" at "+derived.getPath()+": illegal constrained type "+t+" from "+b.toString()); + throw new DefinitionException("StructureDefinition "+pn+" at "+derived.getPath()+": illegal constrained type "+t+" from "+b.toString()+" in "+srcSD.getUrl()); } } base.getType().clear(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Definition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Definition.java new file mode 100644 index 000000000..ea48d0638 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Definition.java @@ -0,0 +1,574 @@ +package org.hl7.fhir.r5.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, May 7, 2019 08:21+1000 for FHIR v4.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A pattern to be followed by resources that represent a specific proposal, plan and/or order for some sort of action or service. + */ +public interface Definition extends PatternBase { + + /** + * @return {@link #url} (An absolute URL that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this {{title}} is (or will be) published. The URL SHOULD include the major version of the {{title}}. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement(); + + public boolean hasUrlElement(); + + public boolean hasUrl(); + + /** + * @param value {@link #url} (An absolute URL that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this {{title}} is (or will be) published. The URL SHOULD include the major version of the {{title}}. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Definition setUrlElement(UriType value) ; + + /** + * @return An absolute URL that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this {{title}} is (or will be) published. The URL SHOULD include the major version of the {{title}}. For more information see [Technical and Business Versions](resource.html#versions). + */ + public String getUrl(); + + /** + * @param value An absolute URL that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this {{title}} is (or will be) published. The URL SHOULD include the major version of the {{title}}. For more information see [Technical and Business Versions](resource.html#versions). + */ + public Definition setUrl(String value); + + /** + * @return {@link #identifier} (Business identifiers assigned to this {{title}} by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.) + */ + public Identifier getIdentifier(); + + public boolean hasIdentifier(); + + /** + * @param value {@link #identifier} (Business identifiers assigned to this {{title}} by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.) + */ + public Definition setIdentifier(Identifier value); + + /** + * @return {@link #version} (The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement(); + + public boolean hasVersionElement(); + + public boolean hasVersion(); + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Definition setVersionElement(StringType value) ; + + /** + * @return The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable. + */ + public String getVersion(); + + /** + * @param value The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable. + */ + public Definition setVersion(String value); + + /** + * @return {@link #title} (A short, descriptive, user-friendly title for the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement(); + + public boolean hasTitleElement(); + + public boolean hasTitle(); + + /** + * @param value {@link #title} (A short, descriptive, user-friendly title for the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public Definition setTitleElement(StringType value) ; + + /** + * @return A short, descriptive, user-friendly title for the {{title}}. + */ + public String getTitle(); + + /** + * @param value A short, descriptive, user-friendly title for the {{title}}. + */ + public Definition setTitle(String value); + + /** + * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public List getDerivedFromCanonical(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setDerivedFromCanonical(List theDerivedFromCanonical); + + public boolean hasDerivedFromCanonical(); + + /** + * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public CanonicalType addDerivedFromCanonicalElement(); + + /** + * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public Definition addDerivedFromCanonical(String value); + + /** + * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public boolean hasDerivedFromCanonical(String value) ; + + /** + * @return {@link #derivedFromUri} (The URL pointing to an externally-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public List getDerivedFromUri(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setDerivedFromUri(List theDerivedFromUri); + + public boolean hasDerivedFromUri(); + + /** + * @return {@link #derivedFromUri} (The URL pointing to an externally-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public UriType addDerivedFromUriElement(); + + /** + * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public Definition addDerivedFromUri(String value); + + /** + * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this definition.) + */ + public boolean hasDerivedFromUri(String value) ; + + /** + * @return {@link #partOf} (A larger definition of which this particular definition is a component or step.) + */ + public List getPartOf(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setPartOf(List thePartOf); + + public boolean hasPartOf(); + + /** + * @return {@link #partOf} (A larger definition of which this particular definition is a component or step.) + */ + public CanonicalType addPartOfElement(); + + /** + * @param value {@link #partOf} (A larger definition of which this particular definition is a component or step.) + */ + public Definition addPartOf(String value); + + /** + * @param value {@link #partOf} (A larger definition of which this particular definition is a component or step.) + */ + public boolean hasPartOf(String value) ; + + /** + * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) + */ + public List getReplaces(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setReplaces(List theReplaces); + + public boolean hasReplaces(); + + /** + * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) + */ + public CanonicalType addReplacesElement(); + + /** + * @param value {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) + */ + public Definition addReplaces(String value); + + /** + * @param value {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) + */ + public boolean hasReplaces(String value) ; + + /** + * @return {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement(); + + public boolean hasStatusElement(); + + public boolean hasStatus(); + + /** + * @param value {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Definition setStatusElement(Enumeration value) ; + + /** + * @return The current state of the {{title}}. + */ + public PublicationStatus getStatus(); + + /** + * @param value The current state of the {{title}}. + */ + public Definition setStatus(PublicationStatus value); + + /** + * @return {@link #experimental} (A flag to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement(); + + public boolean hasExperimentalElement(); + + public boolean hasExperimental(); + + /** + * @param value {@link #experimental} (A flag to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public Definition setExperimentalElement(BooleanType value) ; + + /** + * @return A flag to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental(); + + /** + * @param value A flag to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public Definition setExperimental(boolean value); + + /** + * @return {@link #subject} (A code or group definition that describes the intended subject of instantiations of this definition.) + */ + public Type getSubject(); + + /** + * @return {@link #subject} (A code or group definition that describes the intended subject of instantiations of this definition.) + */ + public CodeableConcept getSubjectCodeableConcept() throws FHIRException; + + public boolean hasSubjectCodeableConcept(); + + /** + * @return {@link #subject} (A code or group definition that describes the intended subject of instantiations of this definition.) + */ + public Reference getSubjectReference() throws FHIRException; + + public boolean hasSubjectReference(); + + public boolean hasSubject(); + + /** + * @param value {@link #subject} (A code or group definition that describes the intended subject of instantiations of this definition.) + */ + public Definition setSubject(Type value); + + /** + * @return {@link #date} (For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement(); + + public boolean hasDateElement(); + + public boolean hasDate(); + + /** + * @param value {@link #date} (For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Definition setDateElement(DateTimeType value) ; + + /** + * @return For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal. + */ + public Date getDate(); + + /** + * @param value For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal. + */ + public Definition setDate(Date value); + + /** + * @return {@link #publisher} (Helps establish the "authority/credibility" of the {{title}}. May also allow for contact.) + */ + public Reference getPublisher(); + + public boolean hasPublisher(); + + /** + * @param value {@link #publisher} (Helps establish the "authority/credibility" of the {{title}}. May also allow for contact.) + */ + public Definition setPublisher(Reference value); + + /** + * @return {@link #publisher} 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. (Helps establish the "authority/credibility" of the {{title}}. May also allow for contact.) + */ + public Resource getPublisherTarget(); + + /** + * @param value {@link #publisher} 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. (Helps establish the "authority/credibility" of the {{title}}. May also allow for contact.) + */ + public Definition setPublisherTarget(Resource value); + + /** + * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) + */ + public List getContact(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setContact(List theContact); + + public boolean hasContact(); + + public ContactDetail addContact(); + + public Definition addContact(ContactDetail t); + + /** + * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist + */ + public ContactDetail getContactFirstRep() ; + + /** + * @return {@link #description} (A free text natural language description of the {{title}} from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement(); + + public boolean hasDescriptionElement(); + + public boolean hasDescription(); + + /** + * @param value {@link #description} (A free text natural language description of the {{title}} from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Definition setDescriptionElement(MarkdownType value) ; + + /** + * @return A free text natural language description of the {{title}} from the consumer's perspective. + */ + public String getDescription(); + + /** + * @param value A free text natural language description of the {{title}} from the consumer's perspective. + */ + public Definition setDescription(String value); + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.) + */ + public List getUseContext(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setUseContext(List theUseContext); + + public boolean hasUseContext(); + + public UsageContext addUseContext(); + + public Definition addUseContext(UsageContext t); + + /** + * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist + */ + public UsageContext getUseContextFirstRep() ; + + /** + * @return {@link #jurisdiction} (A jurisdiction in which the {{title}} is intended to be used.) + */ + public List getJurisdiction(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Definition setJurisdiction(List theJurisdiction); + + public boolean hasJurisdiction(); + + public CodeableConcept addJurisdiction(); + + public Definition addJurisdiction(CodeableConcept t); + + /** + * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist + */ + public CodeableConcept getJurisdictionFirstRep() ; + + /** + * @return {@link #purpose} (Explains why this {{title}} is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public MarkdownType getPurposeElement(); + + public boolean hasPurposeElement(); + + public boolean hasPurpose(); + + /** + * @param value {@link #purpose} (Explains why this {{title}} is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public Definition setPurposeElement(MarkdownType value) ; + + /** + * @return Explains why this {{title}} is needed and why it has been designed as it has. + */ + public String getPurpose(); + + /** + * @param value Explains why this {{title}} is needed and why it has been designed as it has. + */ + public Definition setPurpose(String value); + + /** + * @return {@link #copyright} (A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public MarkdownType getCopyrightElement(); + + public boolean hasCopyrightElement(); + + public boolean hasCopyright(); + + /** + * @param value {@link #copyright} (A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public Definition setCopyrightElement(MarkdownType value) ; + + /** + * @return A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}. + */ + public String getCopyright(); + + /** + * @param value A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}. + */ + public Definition setCopyright(String value); + + /** + * @return {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value + */ + public DateType getApprovalDateElement(); + + public boolean hasApprovalDateElement(); + + public boolean hasApprovalDate(); + + /** + * @param value {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value + */ + public Definition setApprovalDateElement(DateType value) ; + + /** + * @return The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage. + */ + public Date getApprovalDate(); + + /** + * @param value The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage. + */ + public Definition setApprovalDate(Date value); + + /** + * @return {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value + */ + public DateType getLastReviewDateElement(); + + public boolean hasLastReviewDateElement(); + + public boolean hasLastReviewDate(); + + /** + * @param value {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value + */ + public Definition setLastReviewDateElement(DateType value) ; + + /** + * @return The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date. + */ + public Date getLastReviewDate(); + + /** + * @param value The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date. + */ + public Definition setLastReviewDate(Date value); + + /** + * @return {@link #effectivePeriod} (The period during which the {{title}} content was or is planned to be effective.) + */ + public Period getEffectivePeriod(); + + public boolean hasEffectivePeriod(); + + /** + * @param value {@link #effectivePeriod} (The period during which the {{title}} content was or is planned to be effective.) + */ + public Definition setEffectivePeriod(Period value); + + /** + * @return {@link #performerType} (The type of individual that is expected to act upon instances of this definition.) + */ + public CodeableConcept getPerformerType(); + + public boolean hasPerformerType(); + + /** + * @param value {@link #performerType} (The type of individual that is expected to act upon instances of this definition.) + */ + public Definition setPerformerType(CodeableConcept value); + + public String fhirType(); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Event.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Event.java new file mode 100644 index 000000000..7bc232f79 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Event.java @@ -0,0 +1,699 @@ +package org.hl7.fhir.r5.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, May 7, 2019 08:29+1000 for FHIR v4.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A pattern to be followed by resources that represent the performance of some activity, possibly in accordance with a request or service definition. + */ +public interface Event extends PatternBase { + + public enum EventStatus { + /** + * The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation). Preparation stages may be tracked for billing purposes. + */ + PREPARATION, + /** + * The event is currently occurring. + */ + INPROGRESS, + /** + * The event was terminated prior to any activity beyond preparation. I.e. The 'main' activity has not yet begun. The boundary between preparatory and the 'main' activity is context-specific. + */ + NOTDONE, + /** + * The event has been temporarily stopped but is expected to resume in the future. + */ + ONHOLD, + /** + * The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred. + */ + STOPPED, + /** + * The event has now concluded. + */ + COMPLETED, + /** + * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). + */ + ENTEREDINERROR, + /** + * The authoring/source system does not know which of the status values currently applies for this event. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. + */ + UNKNOWN, + /** + * added to help the parsers with the generic types + */ + NULL; + public static EventStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return PREPARATION; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("not-done".equals(codeString)) + return NOTDONE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("stopped".equals(codeString)) + return STOPPED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown EventStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREPARATION: return "preparation"; + case INPROGRESS: return "in-progress"; + case NOTDONE: return "not-done"; + case ONHOLD: return "on-hold"; + case STOPPED: return "stopped"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PREPARATION: return "http://hl7.org/fhir/event-status"; + case INPROGRESS: return "http://hl7.org/fhir/event-status"; + case NOTDONE: return "http://hl7.org/fhir/event-status"; + case ONHOLD: return "http://hl7.org/fhir/event-status"; + case STOPPED: return "http://hl7.org/fhir/event-status"; + case COMPLETED: return "http://hl7.org/fhir/event-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/event-status"; + case UNKNOWN: return "http://hl7.org/fhir/event-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation). Preparation stages may be tracked for billing purposes."; + case INPROGRESS: return "The event is currently occurring."; + case NOTDONE: return "The event was terminated prior to any activity beyond preparation. I.e. The 'main' activity has not yet begun. The boundary between preparatory and the 'main' activity is context-specific."; + case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future."; + case STOPPED: return "The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred."; + case COMPLETED: return "The event has now concluded."; + case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)."; + case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this event. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREPARATION: return "Preparation"; + case INPROGRESS: return "In Progress"; + case NOTDONE: return "Not Done"; + case ONHOLD: return "On Hold"; + case STOPPED: return "Stopped"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + } + + public class EventStatusEnumFactory implements EnumFactory { + public EventStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return EventStatus.PREPARATION; + if ("in-progress".equals(codeString)) + return EventStatus.INPROGRESS; + if ("not-done".equals(codeString)) + return EventStatus.NOTDONE; + if ("on-hold".equals(codeString)) + return EventStatus.ONHOLD; + if ("stopped".equals(codeString)) + return EventStatus.STOPPED; + if ("completed".equals(codeString)) + return EventStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return EventStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return EventStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return new Enumeration(this, EventStatus.PREPARATION); + if ("in-progress".equals(codeString)) + return new Enumeration(this, EventStatus.INPROGRESS); + if ("not-done".equals(codeString)) + return new Enumeration(this, EventStatus.NOTDONE); + if ("on-hold".equals(codeString)) + return new Enumeration(this, EventStatus.ONHOLD); + if ("stopped".equals(codeString)) + return new Enumeration(this, EventStatus.STOPPED); + if ("completed".equals(codeString)) + return new Enumeration(this, EventStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, EventStatus.ENTEREDINERROR); + if ("unknown".equals(codeString)) + return new Enumeration(this, EventStatus.UNKNOWN); + throw new FHIRException("Unknown EventStatus code '"+codeString+"'"); + } + public String toCode(EventStatus code) { + if (code == EventStatus.PREPARATION) + return "preparation"; + if (code == EventStatus.INPROGRESS) + return "in-progress"; + if (code == EventStatus.NOTDONE) + return "not-done"; + if (code == EventStatus.ONHOLD) + return "on-hold"; + if (code == EventStatus.STOPPED) + return "stopped"; + if (code == EventStatus.COMPLETED) + return "completed"; + if (code == EventStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == EventStatus.UNKNOWN) + return "unknown"; + return "?"; + } + public String toSystem(EventStatus code) { + return code.getSystem(); + } + } + + @Block() + public interface EventPerformerComponent extends PatternBase { + /** + * @return {@link #function} (Distinguishes the type of involvement of the performer in the {{title}}. [Consider adding examples].) + */ + public CodeableConcept getFunction(); + + public boolean hasFunction(); + + /** + * @param value {@link #function} (Distinguishes the type of involvement of the performer in the {{title}}. [Consider adding examples].) + */ + public EventPerformerComponent setFunction(CodeableConcept value); + + /** + * @return {@link #actor} (Indicates who or what performed the {{title}}.) + */ + public Reference getActor(); + + public boolean hasActor(); + + /** + * @param value {@link #actor} (Indicates who or what performed the {{title}}.) + */ + public EventPerformerComponent setActor(Reference value); + + /** + * @return {@link #actor} 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. (Indicates who or what performed the {{title}}.) + */ + public Resource getActorTarget(); + + /** + * @param value {@link #actor} 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. (Indicates who or what performed the {{title}}.) + */ + public EventPerformerComponent setActorTarget(Resource value); + + } + + /** + * @return {@link #identifier} (Business identifiers assigned to this {{title}} by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.) + */ + public List getIdentifier(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setIdentifier(List theIdentifier); + + public boolean hasIdentifier(); + + public Identifier addIdentifier(); + + public Event addIdentifier(Identifier t); + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist + */ + public Identifier getIdentifierFirstRep() ; + + /** + * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public List getInstantiatesCanonical(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setInstantiatesCanonical(List theInstantiatesCanonical); + + public boolean hasInstantiatesCanonical(); + + /** + * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public CanonicalType addInstantiatesCanonicalElement(); + + /** + * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public Event addInstantiatesCanonical(String value); + + /** + * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public boolean hasInstantiatesCanonical(String value) ; + + /** + * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public List getInstantiatesUri(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setInstantiatesUri(List theInstantiatesUri); + + public boolean hasInstantiatesUri(); + + /** + * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public UriType addInstantiatesUriElement(); + + /** + * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public Event addInstantiatesUri(String value); + + /** + * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public boolean hasInstantiatesUri(String value) ; + + /** + * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this {{title}}.) + */ + public List getBasedOn(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setBasedOn(List theBasedOn); + + public boolean hasBasedOn(); + + public Reference addBasedOn(); + + public Event addBasedOn(Reference t); + + /** + * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist + */ + public Reference getBasedOnFirstRep() ; + + /** + * @return {@link #partOf} (A larger event of which this particular {{title}} is a component or step.) + */ + public List getPartOf(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setPartOf(List thePartOf); + + public boolean hasPartOf(); + + public Reference addPartOf(); + + public Event addPartOf(Reference t); + + /** + * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist + */ + public Reference getPartOfFirstRep() ; + + /** + * @return {@link #researchStudy} (Indicates that this {{title}} is relevant to the specified research study(ies).) + */ + public List getResearchStudy(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setResearchStudy(List theResearchStudy); + + public boolean hasResearchStudy(); + + public Reference addResearchStudy(); + + public Event addResearchStudy(Reference t); + + /** + * @return The first repetition of repeating field {@link #researchStudy}, creating it if it does not already exist + */ + public Reference getResearchStudyFirstRep() ; + + /** + * @return {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement(); + + public boolean hasStatusElement(); + + public boolean hasStatus(); + + /** + * @param value {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Event setStatusElement(Enumeration value) ; + + /** + * @return The current state of the {{title}}. + */ + public EventStatus getStatus(); + + /** + * @param value The current state of the {{title}}. + */ + public Event setStatus(EventStatus value); + + /** + * @return {@link #statusReason} (Captures the reason for the current state of the {{title}}.) + */ + public CodeableConcept getStatusReason(); + + public boolean hasStatusReason(); + + /** + * @param value {@link #statusReason} (Captures the reason for the current state of the {{title}}.) + */ + public Event setStatusReason(CodeableConcept value); + + /** + * @return {@link #code} (A code that identifies the specific service or action that was or is being performed.) + */ + public CodeableConcept getCode(); + + public boolean hasCode(); + + /** + * @param value {@link #code} (A code that identifies the specific service or action that was or is being performed.) + */ + public Event setCode(CodeableConcept value); + + /** + * @return {@link #subject} (The individual or set of individuals the action is being or was performed on.) + */ + public Reference getSubject(); + + public boolean hasSubject(); + + /** + * @param value {@link #subject} (The individual or set of individuals the action is being or was performed on.) + */ + public Event setSubject(Reference value); + + /** + * @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 individual or set of individuals the action is being or was performed on.) + */ + public Resource getSubjectTarget(); + + /** + * @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 individual or set of individuals the action is being or was performed on.) + */ + public Event setSubjectTarget(Resource value); + + /** + * @return {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Reference getEncounter(); + + public boolean hasEncounter(); + + /** + * @param value {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Event setEncounter(Reference value); + + /** + * @return {@link #encounter} 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 Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Encounter getEncounterTarget(); + + /** + * @param value {@link #encounter} 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 Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Event setEncounterTarget(Encounter value); + + /** + * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.) + */ + public Type getOccurrence(); + + /** + * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.) + */ + public DateTimeType getOccurrenceDateTimeType() throws FHIRException; + + public boolean hasOccurrenceDateTimeType(); + + /** + * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.) + */ + public Period getOccurrencePeriod() throws FHIRException; + + public boolean hasOccurrencePeriod(); + + /** + * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.) + */ + public Timing getOccurrenceTiming() throws FHIRException; + + public boolean hasOccurrenceTiming(); + + public boolean hasOccurrence(); + + /** + * @param value {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.) + */ + public Event setOccurrence(Type value); + + /** + * @return {@link #recorded} (The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public DateTimeType getRecordedElement(); + + public boolean hasRecordedElement(); + + public boolean hasRecorded(); + + /** + * @param value {@link #recorded} (The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public Event setRecordedElement(DateTimeType value) ; + + /** + * @return The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event. + */ + public Date getRecorded(); + + /** + * @param value The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event. + */ + public Event setRecorded(Date value); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Type getReported(); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public BooleanType getReportedBooleanType() throws FHIRException; + + public boolean hasReportedBooleanType(); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Reference getReportedReference() throws FHIRException; + + public boolean hasReportedReference(); + + public boolean hasReported(); + + /** + * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Event setReported(Type value); + + /** + * @return {@link #performer} (Indicates who or what performed the {{title}} and how they were involved.) + */ + public List getPerformer(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setPerformer(List thePerformer); + + public boolean hasPerformer(); + + public EventPerformerComponent addPerformer(); + + public Event addPerformer(EventPerformerComponent t); + + /** + * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist + */ + public EventPerformerComponent getPerformerFirstRep() ; + + /** + * @return {@link #location} (The principal physical location where the {{title}} was performed.) + */ + public Reference getLocation(); + + public boolean hasLocation(); + + /** + * @param value {@link #location} (The principal physical location where the {{title}} was performed.) + */ + public Event setLocation(Reference value); + + /** + * @return {@link #location} 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 principal physical location where the {{title}} was performed.) + */ + public Location getLocationTarget(); + + /** + * @param value {@link #location} 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 principal physical location where the {{title}} was performed.) + */ + public Event setLocationTarget(Location value); + + /** + * @return {@link #reasonCode} (Describes why the {{title}} occurred in coded or textual form.) + */ + public List getReasonCode(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setReasonCode(List theReasonCode); + + public boolean hasReasonCode(); + + public CodeableConcept addReasonCode(); + + public Event addReasonCode(CodeableConcept t); + + /** + * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist + */ + public CodeableConcept getReasonCodeFirstRep() ; + + /** + * @return {@link #reasonReference} (Indicates another resource whose existence justifies this {{title}}.) + */ + public List getReasonReference(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setReasonReference(List theReasonReference); + + public boolean hasReasonReference(); + + public Reference addReasonReference(); + + public Event addReasonReference(Reference t); + + /** + * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist + */ + public Reference getReasonReferenceFirstRep() ; + + /** + * @return {@link #note} (Comments made about the {{title}} by the performer, subject or other participants.) + */ + public List getNote(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Event setNote(List theNote); + + public boolean hasNote(); + + public Annotation addNote(); + + public Event addNote(Annotation t); + + /** + * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist + */ + public Annotation getNoteFirstRep() ; + + public String fhirType(); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Fivews.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Fivews.java new file mode 100644 index 000000000..164495074 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Fivews.java @@ -0,0 +1,1044 @@ +package org.hl7.fhir.r5.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, May 7, 2019 08:21+1000 for FHIR v4.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Who What When Where Why - Common pattern for all resources that deals with attribution. + */ +public interface Fivews extends PatternBase { + + public enum CanonicalStatus { + /** + * The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record) + */ + ERROR, + /** + * The resource describes an action or plan that is proposed, and not yet approved by the participants + */ + PROPOSED, + /** + * The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future + */ + PLANNED, + /** + * The information in the resource is still being prepared and edited + */ + DRAFT, + /** + * A fulfiller has been asked to perform this action, but it has not yet occurred + */ + REQUESTED, + /** + * The fulfiller has received the request, but not yet agreed to carry out the action + */ + RECEIVED, + /** + * The fulfiller chose not to perform the action + */ + DECLINED, + /** + * The fulfiller has decided to perform the action, and plans are in train to do this in the future + */ + ACCEPTED, + /** + * The pre-conditions for the action are all fulfilled, and it is imminent + */ + ARRIVED, + /** + * The resource describes information that is currently valid or a process that is presently occuring + */ + ACTIVE, + /** + * The process described/requested in this resource has been halted for some reason + */ + SUSPENDED, + /** + * The process described/requested in the resource could not be completed, and no further action is planned + */ + FAILED, + /** + * The information in this resource has been replaced by information in another resource + */ + REPLACED, + /** + * The process described/requested in the resource has been completed, and no further action is planned + */ + COMPLETE, + /** + * The resource describes information that is no longer valid or a process that is stopped occurring + */ + INACTIVE, + /** + * The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned + */ + ABANDONED, + /** + * Authoring system does not know the status + */ + UNKNOWN, + /** + * The information in this resource is not yet approved + */ + UNCONFIRMED, + /** + * The information in this resource is approved + */ + CONFIRMED, + /** + * The issue identified by this resource is no longer of concern + */ + RESOLVED, + /** + * This information has been ruled out by testing and evaluation + */ + REFUTED, + /** + * Potentially true? + */ + DIFFERENTIAL, + /** + * This information is still being assembled + */ + PARTIAL, + /** + * not available at this time/location + */ + BUSYUNAVAILABLE, + /** + * Free for scheduling + */ + FREE, + /** + * Ready to act + */ + ONTARGET, + /** + * Ahead of the planned timelines + */ + AHEADOFTARGET, + /** + * + */ + BEHINDTARGET, + /** + * Behind the planned timelines + */ + NOTREADY, + /** + * The device transducer is disconnected + */ + TRANSDUCDISCON, + /** + * The hardware is disconnected + */ + HWDISCON, + /** + * added to help the parsers with the generic types + */ + NULL; + public static CanonicalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ERROR; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("declined".equals(codeString)) + return DECLINED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("failed".equals(codeString)) + return FAILED; + if ("replaced".equals(codeString)) + return REPLACED; + if ("complete".equals(codeString)) + return COMPLETE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("abandoned".equals(codeString)) + return ABANDONED; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("unconfirmed".equals(codeString)) + return UNCONFIRMED; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("resolved".equals(codeString)) + return RESOLVED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("differential".equals(codeString)) + return DIFFERENTIAL; + if ("partial".equals(codeString)) + return PARTIAL; + if ("busy-unavailable".equals(codeString)) + return BUSYUNAVAILABLE; + if ("free".equals(codeString)) + return FREE; + if ("on-target".equals(codeString)) + return ONTARGET; + if ("ahead-of-target".equals(codeString)) + return AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return BEHINDTARGET; + if ("not-ready".equals(codeString)) + return NOTREADY; + if ("transduc-discon".equals(codeString)) + return TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return HWDISCON; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown CanonicalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ERROR: return "error"; + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case DECLINED: return "declined"; + case ACCEPTED: return "accepted"; + case ARRIVED: return "arrived"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case FAILED: return "failed"; + case REPLACED: return "replaced"; + case COMPLETE: return "complete"; + case INACTIVE: return "inactive"; + case ABANDONED: return "abandoned"; + case UNKNOWN: return "unknown"; + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case RESOLVED: return "resolved"; + case REFUTED: return "refuted"; + case DIFFERENTIAL: return "differential"; + case PARTIAL: return "partial"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case FREE: return "free"; + case ONTARGET: return "on-target"; + case AHEADOFTARGET: return "ahead-of-target"; + case BEHINDTARGET: return "behind-target"; + case NOTREADY: return "not-ready"; + case TRANSDUCDISCON: return "transduc-discon"; + case HWDISCON: return "hw-discon"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ERROR: return "http://hl7.org/fhir/resource-status"; + case PROPOSED: return "http://hl7.org/fhir/resource-status"; + case PLANNED: return "http://hl7.org/fhir/resource-status"; + case DRAFT: return "http://hl7.org/fhir/resource-status"; + case REQUESTED: return "http://hl7.org/fhir/resource-status"; + case RECEIVED: return "http://hl7.org/fhir/resource-status"; + case DECLINED: return "http://hl7.org/fhir/resource-status"; + case ACCEPTED: return "http://hl7.org/fhir/resource-status"; + case ARRIVED: return "http://hl7.org/fhir/resource-status"; + case ACTIVE: return "http://hl7.org/fhir/resource-status"; + case SUSPENDED: return "http://hl7.org/fhir/resource-status"; + case FAILED: return "http://hl7.org/fhir/resource-status"; + case REPLACED: return "http://hl7.org/fhir/resource-status"; + case COMPLETE: return "http://hl7.org/fhir/resource-status"; + case INACTIVE: return "http://hl7.org/fhir/resource-status"; + case ABANDONED: return "http://hl7.org/fhir/resource-status"; + case UNKNOWN: return "http://hl7.org/fhir/resource-status"; + case UNCONFIRMED: return "http://hl7.org/fhir/resource-status"; + case CONFIRMED: return "http://hl7.org/fhir/resource-status"; + case RESOLVED: return "http://hl7.org/fhir/resource-status"; + case REFUTED: return "http://hl7.org/fhir/resource-status"; + case DIFFERENTIAL: return "http://hl7.org/fhir/resource-status"; + case PARTIAL: return "http://hl7.org/fhir/resource-status"; + case BUSYUNAVAILABLE: return "http://hl7.org/fhir/resource-status"; + case FREE: return "http://hl7.org/fhir/resource-status"; + case ONTARGET: return "http://hl7.org/fhir/resource-status"; + case AHEADOFTARGET: return "http://hl7.org/fhir/resource-status"; + case BEHINDTARGET: return "http://hl7.org/fhir/resource-status"; + case NOTREADY: return "http://hl7.org/fhir/resource-status"; + case TRANSDUCDISCON: return "http://hl7.org/fhir/resource-status"; + case HWDISCON: return "http://hl7.org/fhir/resource-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ERROR: return "The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record)"; + case PROPOSED: return "The resource describes an action or plan that is proposed, and not yet approved by the participants"; + case PLANNED: return "The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future"; + case DRAFT: return "The information in the resource is still being prepared and edited"; + case REQUESTED: return "A fulfiller has been asked to perform this action, but it has not yet occurred"; + case RECEIVED: return "The fulfiller has received the request, but not yet agreed to carry out the action"; + case DECLINED: return "The fulfiller chose not to perform the action"; + case ACCEPTED: return "The fulfiller has decided to perform the action, and plans are in train to do this in the future"; + case ARRIVED: return "The pre-conditions for the action are all fulfilled, and it is imminent"; + case ACTIVE: return "The resource describes information that is currently valid or a process that is presently occuring"; + case SUSPENDED: return "The process described/requested in this resource has been halted for some reason"; + case FAILED: return "The process described/requested in the resource could not be completed, and no further action is planned"; + case REPLACED: return "The information in this resource has been replaced by information in another resource"; + case COMPLETE: return "The process described/requested in the resource has been completed, and no further action is planned"; + case INACTIVE: return "The resource describes information that is no longer valid or a process that is stopped occurring"; + case ABANDONED: return "The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned"; + case UNKNOWN: return "Authoring system does not know the status"; + case UNCONFIRMED: return "The information in this resource is not yet approved"; + case CONFIRMED: return "The information in this resource is approved"; + case RESOLVED: return "The issue identified by this resource is no longer of concern"; + case REFUTED: return "This information has been ruled out by testing and evaluation"; + case DIFFERENTIAL: return "Potentially true?"; + case PARTIAL: return "This information is still being assembled"; + case BUSYUNAVAILABLE: return "not available at this time/location"; + case FREE: return "Free for scheduling"; + case ONTARGET: return "Ready to act"; + case AHEADOFTARGET: return "Ahead of the planned timelines"; + case BEHINDTARGET: return ""; + case NOTREADY: return "Behind the planned timelines"; + case TRANSDUCDISCON: return "The device transducer is disconnected"; + case HWDISCON: return "The hardware is disconnected"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ERROR: return "error"; + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case DECLINED: return "declined"; + case ACCEPTED: return "accepted"; + case ARRIVED: return "arrived"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case FAILED: return "failed"; + case REPLACED: return "replaced"; + case COMPLETE: return "complete"; + case INACTIVE: return "inactive"; + case ABANDONED: return "abandoned"; + case UNKNOWN: return "unknown"; + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case RESOLVED: return "resolved"; + case REFUTED: return "refuted"; + case DIFFERENTIAL: return "differential"; + case PARTIAL: return "partial"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case FREE: return "free"; + case ONTARGET: return "on-target"; + case AHEADOFTARGET: return "ahead-of-target"; + case BEHINDTARGET: return "behind-target"; + case NOTREADY: return "not-ready"; + case TRANSDUCDISCON: return "transduc-discon"; + case HWDISCON: return "hw-discon"; + default: return "?"; + } + } + } + + public class CanonicalStatusEnumFactory implements EnumFactory { + public CanonicalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return CanonicalStatus.ERROR; + if ("proposed".equals(codeString)) + return CanonicalStatus.PROPOSED; + if ("planned".equals(codeString)) + return CanonicalStatus.PLANNED; + if ("draft".equals(codeString)) + return CanonicalStatus.DRAFT; + if ("requested".equals(codeString)) + return CanonicalStatus.REQUESTED; + if ("received".equals(codeString)) + return CanonicalStatus.RECEIVED; + if ("declined".equals(codeString)) + return CanonicalStatus.DECLINED; + if ("accepted".equals(codeString)) + return CanonicalStatus.ACCEPTED; + if ("arrived".equals(codeString)) + return CanonicalStatus.ARRIVED; + if ("active".equals(codeString)) + return CanonicalStatus.ACTIVE; + if ("suspended".equals(codeString)) + return CanonicalStatus.SUSPENDED; + if ("failed".equals(codeString)) + return CanonicalStatus.FAILED; + if ("replaced".equals(codeString)) + return CanonicalStatus.REPLACED; + if ("complete".equals(codeString)) + return CanonicalStatus.COMPLETE; + if ("inactive".equals(codeString)) + return CanonicalStatus.INACTIVE; + if ("abandoned".equals(codeString)) + return CanonicalStatus.ABANDONED; + if ("unknown".equals(codeString)) + return CanonicalStatus.UNKNOWN; + if ("unconfirmed".equals(codeString)) + return CanonicalStatus.UNCONFIRMED; + if ("confirmed".equals(codeString)) + return CanonicalStatus.CONFIRMED; + if ("resolved".equals(codeString)) + return CanonicalStatus.RESOLVED; + if ("refuted".equals(codeString)) + return CanonicalStatus.REFUTED; + if ("differential".equals(codeString)) + return CanonicalStatus.DIFFERENTIAL; + if ("partial".equals(codeString)) + return CanonicalStatus.PARTIAL; + if ("busy-unavailable".equals(codeString)) + return CanonicalStatus.BUSYUNAVAILABLE; + if ("free".equals(codeString)) + return CanonicalStatus.FREE; + if ("on-target".equals(codeString)) + return CanonicalStatus.ONTARGET; + if ("ahead-of-target".equals(codeString)) + return CanonicalStatus.AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return CanonicalStatus.BEHINDTARGET; + if ("not-ready".equals(codeString)) + return CanonicalStatus.NOTREADY; + if ("transduc-discon".equals(codeString)) + return CanonicalStatus.TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return CanonicalStatus.HWDISCON; + throw new IllegalArgumentException("Unknown CanonicalStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ERROR); + if ("proposed".equals(codeString)) + return new Enumeration(this, CanonicalStatus.PROPOSED); + if ("planned".equals(codeString)) + return new Enumeration(this, CanonicalStatus.PLANNED); + if ("draft".equals(codeString)) + return new Enumeration(this, CanonicalStatus.DRAFT); + if ("requested".equals(codeString)) + return new Enumeration(this, CanonicalStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, CanonicalStatus.RECEIVED); + if ("declined".equals(codeString)) + return new Enumeration(this, CanonicalStatus.DECLINED); + if ("accepted".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ACCEPTED); + if ("arrived".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ARRIVED); + if ("active".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ACTIVE); + if ("suspended".equals(codeString)) + return new Enumeration(this, CanonicalStatus.SUSPENDED); + if ("failed".equals(codeString)) + return new Enumeration(this, CanonicalStatus.FAILED); + if ("replaced".equals(codeString)) + return new Enumeration(this, CanonicalStatus.REPLACED); + if ("complete".equals(codeString)) + return new Enumeration(this, CanonicalStatus.COMPLETE); + if ("inactive".equals(codeString)) + return new Enumeration(this, CanonicalStatus.INACTIVE); + if ("abandoned".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ABANDONED); + if ("unknown".equals(codeString)) + return new Enumeration(this, CanonicalStatus.UNKNOWN); + if ("unconfirmed".equals(codeString)) + return new Enumeration(this, CanonicalStatus.UNCONFIRMED); + if ("confirmed".equals(codeString)) + return new Enumeration(this, CanonicalStatus.CONFIRMED); + if ("resolved".equals(codeString)) + return new Enumeration(this, CanonicalStatus.RESOLVED); + if ("refuted".equals(codeString)) + return new Enumeration(this, CanonicalStatus.REFUTED); + if ("differential".equals(codeString)) + return new Enumeration(this, CanonicalStatus.DIFFERENTIAL); + if ("partial".equals(codeString)) + return new Enumeration(this, CanonicalStatus.PARTIAL); + if ("busy-unavailable".equals(codeString)) + return new Enumeration(this, CanonicalStatus.BUSYUNAVAILABLE); + if ("free".equals(codeString)) + return new Enumeration(this, CanonicalStatus.FREE); + if ("on-target".equals(codeString)) + return new Enumeration(this, CanonicalStatus.ONTARGET); + if ("ahead-of-target".equals(codeString)) + return new Enumeration(this, CanonicalStatus.AHEADOFTARGET); + if ("behind-target".equals(codeString)) + return new Enumeration(this, CanonicalStatus.BEHINDTARGET); + if ("not-ready".equals(codeString)) + return new Enumeration(this, CanonicalStatus.NOTREADY); + if ("transduc-discon".equals(codeString)) + return new Enumeration(this, CanonicalStatus.TRANSDUCDISCON); + if ("hw-discon".equals(codeString)) + return new Enumeration(this, CanonicalStatus.HWDISCON); + throw new FHIRException("Unknown CanonicalStatus code '"+codeString+"'"); + } + public String toCode(CanonicalStatus code) { + if (code == CanonicalStatus.ERROR) + return "error"; + if (code == CanonicalStatus.PROPOSED) + return "proposed"; + if (code == CanonicalStatus.PLANNED) + return "planned"; + if (code == CanonicalStatus.DRAFT) + return "draft"; + if (code == CanonicalStatus.REQUESTED) + return "requested"; + if (code == CanonicalStatus.RECEIVED) + return "received"; + if (code == CanonicalStatus.DECLINED) + return "declined"; + if (code == CanonicalStatus.ACCEPTED) + return "accepted"; + if (code == CanonicalStatus.ARRIVED) + return "arrived"; + if (code == CanonicalStatus.ACTIVE) + return "active"; + if (code == CanonicalStatus.SUSPENDED) + return "suspended"; + if (code == CanonicalStatus.FAILED) + return "failed"; + if (code == CanonicalStatus.REPLACED) + return "replaced"; + if (code == CanonicalStatus.COMPLETE) + return "complete"; + if (code == CanonicalStatus.INACTIVE) + return "inactive"; + if (code == CanonicalStatus.ABANDONED) + return "abandoned"; + if (code == CanonicalStatus.UNKNOWN) + return "unknown"; + if (code == CanonicalStatus.UNCONFIRMED) + return "unconfirmed"; + if (code == CanonicalStatus.CONFIRMED) + return "confirmed"; + if (code == CanonicalStatus.RESOLVED) + return "resolved"; + if (code == CanonicalStatus.REFUTED) + return "refuted"; + if (code == CanonicalStatus.DIFFERENTIAL) + return "differential"; + if (code == CanonicalStatus.PARTIAL) + return "partial"; + if (code == CanonicalStatus.BUSYUNAVAILABLE) + return "busy-unavailable"; + if (code == CanonicalStatus.FREE) + return "free"; + if (code == CanonicalStatus.ONTARGET) + return "on-target"; + if (code == CanonicalStatus.AHEADOFTARGET) + return "ahead-of-target"; + if (code == CanonicalStatus.BEHINDTARGET) + return "behind-target"; + if (code == CanonicalStatus.NOTREADY) + return "not-ready"; + if (code == CanonicalStatus.TRANSDUCDISCON) + return "transduc-discon"; + if (code == CanonicalStatus.HWDISCON) + return "hw-discon"; + return "?"; + } + public String toSystem(CanonicalStatus code) { + return code.getSystem(); + } + } + + /** + * @return {@link #identifier} (Business Identifier.) + */ + public List getIdentifier(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setIdentifier(List theIdentifier); + + public boolean hasIdentifier(); + + public Identifier addIdentifier(); + + public Fivews addIdentifier(Identifier t); + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist + */ + public Identifier getIdentifierFirstRep() ; + + /** + * @return {@link #version} (Identifier for this version.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement(); + + public boolean hasVersionElement(); + + public boolean hasVersion(); + + /** + * @param value {@link #version} (Identifier for this version.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Fivews setVersionElement(StringType value) ; + + /** + * @return Identifier for this version. + */ + public String getVersion(); + + /** + * @param value Identifier for this version. + */ + public Fivews setVersion(String value); + + /** + * @return {@link #status} (Status Field.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement(); + + public boolean hasStatusElement(); + + public boolean hasStatus(); + + /** + * @param value {@link #status} (Status Field.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Fivews setStatusElement(Enumeration value) ; + + /** + * @return Status Field. + */ + public CanonicalStatus getStatus(); + + /** + * @param value Status Field. + */ + public Fivews setStatus(CanonicalStatus value); + + /** + * @return {@link #class_} (Classifier Field.) + */ + public List getClass_(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setClass_(List theClass_); + + public boolean hasClass_(); + + public CodeableConcept addClass_(); + + public Fivews addClass_(CodeableConcept t); + + /** + * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist + */ + public CodeableConcept getClass_FirstRep() ; + + /** + * @return {@link #grade} (A field that indicates the potential impact of the content of the resource.) + */ + public CodeableConcept getGrade(); + + public boolean hasGrade(); + + /** + * @param value {@link #grade} (A field that indicates the potential impact of the content of the resource.) + */ + public Fivews setGrade(CodeableConcept value); + + /** + * @return {@link #what} (what this resource is about.) + */ + public Type getWhat(); + + /** + * @return {@link #what} (what this resource is about.) + */ + public CodeableConcept getWhatCodeableConcept() throws FHIRException; + + public boolean hasWhatCodeableConcept(); + + /** + * @return {@link #what} (what this resource is about.) + */ + public Reference getWhatReference() throws FHIRException; + + public boolean hasWhatReference(); + + public boolean hasWhat(); + + /** + * @param value {@link #what} (what this resource is about.) + */ + public Fivews setWhat(Type value); + + /** + * @return {@link #subject} (Who this resource is about.) + */ + public List getSubject(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setSubject(List theSubject); + + public boolean hasSubject(); + + public Reference addSubject(); + + public Fivews addSubject(Reference t); + + /** + * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist + */ + public Reference getSubjectFirstRep() ; + + /** + * @return {@link #context} (a resource that gives context for the work described in this resource (usually Encounter or EpisodeOfCare).) + */ + public Reference getContext(); + + public boolean hasContext(); + + /** + * @param value {@link #context} (a resource that gives context for the work described in this resource (usually Encounter or EpisodeOfCare).) + */ + public Fivews setContext(Reference value); + + /** + * @return {@link #context} 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. (a resource that gives context for the work described in this resource (usually Encounter or EpisodeOfCare).) + */ + public Resource getContextTarget(); + + /** + * @param value {@link #context} 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. (a resource that gives context for the work described in this resource (usually Encounter or EpisodeOfCare).) + */ + public Fivews setContextTarget(Resource value); + + /** + * @return {@link #init} (when the work described in this resource was started (or will be).). This is the underlying object with id, value and extensions. The accessor "getInit" gives direct access to the value + */ + public DateTimeType getInitElement(); + + public boolean hasInitElement(); + + public boolean hasInit(); + + /** + * @param value {@link #init} (when the work described in this resource was started (or will be).). This is the underlying object with id, value and extensions. The accessor "getInit" gives direct access to the value + */ + public Fivews setInitElement(DateTimeType value) ; + + /** + * @return when the work described in this resource was started (or will be). + */ + public Date getInit(); + + /** + * @param value when the work described in this resource was started (or will be). + */ + public Fivews setInit(Date value); + + /** + * @return {@link #planned} (when this resource is planned to occur.) + */ + public List getPlanned(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setPlanned(List thePlanned); + + public boolean hasPlanned(); + + public Timing addPlanned(); + + public Fivews addPlanned(Timing t); + + /** + * @return The first repetition of repeating field {@link #planned}, creating it if it does not already exist + */ + public Timing getPlannedFirstRep() ; + + /** + * @return {@link #done} (when the work described in this resource was completed (or will be).) + */ + public Type getDone(); + + /** + * @return {@link #done} (when the work described in this resource was completed (or will be).) + */ + public DateTimeType getDoneDateTimeType() throws FHIRException; + + public boolean hasDoneDateTimeType(); + + /** + * @return {@link #done} (when the work described in this resource was completed (or will be).) + */ + public Period getDonePeriod() throws FHIRException; + + public boolean hasDonePeriod(); + + public boolean hasDone(); + + /** + * @param value {@link #done} (when the work described in this resource was completed (or will be).) + */ + public Fivews setDone(Type value); + + /** + * @return {@link #recorded} (when this resource itself was created.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public InstantType getRecordedElement(); + + public boolean hasRecordedElement(); + + public boolean hasRecorded(); + + /** + * @param value {@link #recorded} (when this resource itself was created.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public Fivews setRecordedElement(InstantType value) ; + + /** + * @return when this resource itself was created. + */ + public Date getRecorded(); + + /** + * @param value when this resource itself was created. + */ + public Fivews setRecorded(Date value); + + /** + * @return {@link #author} (who authored the content of the resource.) + */ + public List getAuthor(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setAuthor(List theAuthor); + + public boolean hasAuthor(); + + public Reference addAuthor(); + + public Fivews addAuthor(Reference t); + + /** + * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist + */ + public Reference getAuthorFirstRep() ; + + /** + * @return {@link #source} (Who provided the information in this resource.) + */ + public List getSource(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setSource(List theSource); + + public boolean hasSource(); + + public Reference addSource(); + + public Fivews addSource(Reference t); + + /** + * @return The first repetition of repeating field {@link #source}, creating it if it does not already exist + */ + public Reference getSourceFirstRep() ; + + /** + * @return {@link #actor} (who did the work described the resource (or will do).) + */ + public List getActor(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setActor(List theActor); + + public boolean hasActor(); + + public Reference addActor(); + + public Fivews addActor(Reference t); + + /** + * @return The first repetition of repeating field {@link #actor}, creating it if it does not already exist + */ + public Reference getActorFirstRep() ; + + /** + * @return {@link #cause} (who prompted the work described in the resource.) + */ + public List getCause(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setCause(List theCause); + + public boolean hasCause(); + + public Reference addCause(); + + public Fivews addCause(Reference t); + + /** + * @return The first repetition of repeating field {@link #cause}, creating it if it does not already exist + */ + public Reference getCauseFirstRep() ; + + /** + * @return {@link #witness} (who attests to the content of the resource (individual or org).) + */ + public List getWitness(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setWitness(List theWitness); + + public boolean hasWitness(); + + public Reference addWitness(); + + public Fivews addWitness(Reference t); + + /** + * @return The first repetition of repeating field {@link #witness}, creating it if it does not already exist + */ + public Reference getWitnessFirstRep() ; + + /** + * @return {@link #who} (An actor involved in the work described by this resource.) + */ + public List getWho(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setWho(List theWho); + + public boolean hasWho(); + + public Reference addWho(); + + public Fivews addWho(Reference t); + + /** + * @return The first repetition of repeating field {@link #who}, creating it if it does not already exist + */ + public Reference getWhoFirstRep() ; + + /** + * @return {@link #where} (The location of the work described.) + */ + public List getWhere(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setWhere(List theWhere); + + public boolean hasWhere(); + + public Type addWhere(); + + public Fivews addWhere(Type t); + + /** + * @return The first repetition of repeating field {@link #where}, creating it if it does not already exist + */ + public Type getWhereFirstRep() ; + + /** + * @return {@link #why} (Why this work was done.) + */ + public List getWhy(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Fivews setWhy(List theWhy); + + public boolean hasWhy(); + + public Type addWhy(); + + public Fivews addWhy(Type t); + + /** + * @return The first repetition of repeating field {@link #why}, creating it if it does not already exist + */ + public Type getWhyFirstRep() ; + + public String fhirType(); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PatternBase.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PatternBase.java new file mode 100644 index 000000000..88b9b88c9 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PatternBase.java @@ -0,0 +1,5 @@ +package org.hl7.fhir.r5.model; + +public interface PatternBase { + +} diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Request.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Request.java index 2e318aaf1..3a0e7090b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Request.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Request.java @@ -1,38 +1,1112 @@ -package org.hl7.fhir.r5.model; - -/*- - * #%L - * org.hl7.fhir.r5 - * %% - * Copyright (C) 2014 - 2019 Health Level 7 - * %% - * 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 Request { - - public List getRequestIdentifier(); - public boolean hasRequestIdentifier(); - public int getRequestIdentifierMin(); - public int getRequestIdentifierMax(); // 0 means that it is not implemented on this resource (or not able to be generated - - public List getRequestDefinition(); - public boolean hasRequestDefinition(); - public int getRequestDefinitionMin(); - public int getRequestDefinitionMax(); // 0 means that it is not implemented on this resource (or not able to be generated - -} +package org.hl7.fhir.r5.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, May 7, 2019 08:21+1000 for FHIR v4.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A pattern to be followed by resources that represent a specific proposal, plan and/or order for some sort of action or service. + */ +public interface Request extends PatternBase { + + public enum RequestStatus { + /** + * The request has been created but is not yet complete or ready for action. + */ + DRAFT, + /** + * The request is in force and ready to be acted upon. + */ + ACTIVE, + /** + * The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future. + */ + ONHOLD, + /** + * The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur. + */ + REVOKED, + /** + * The activity described by the request has been fully performed. No further activity will occur. + */ + COMPLETED, + /** + * This request should never have existed and should be considered 'void'. (It is possible that real-world decisions were based on it. If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). + */ + ENTEREDINERROR, + /** + * The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. + */ + UNKNOWN, + /** + * added to help the parsers with the generic types + */ + NULL; + public static RequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("revoked".equals(codeString)) + return REVOKED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case ONHOLD: return "on-hold"; + case REVOKED: return "revoked"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/request-status"; + case ACTIVE: return "http://hl7.org/fhir/request-status"; + case ONHOLD: return "http://hl7.org/fhir/request-status"; + case REVOKED: return "http://hl7.org/fhir/request-status"; + case COMPLETED: return "http://hl7.org/fhir/request-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/request-status"; + case UNKNOWN: return "http://hl7.org/fhir/request-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The request has been created but is not yet complete or ready for action."; + case ACTIVE: return "The request is in force and ready to be acted upon."; + case ONHOLD: return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future."; + case REVOKED: return "The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur."; + case COMPLETED: return "The activity described by the request has been fully performed. No further activity will occur."; + case ENTEREDINERROR: return "This request should never have existed and should be considered 'void'. (It is possible that real-world decisions were based on it. If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)."; + case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case ONHOLD: return "On Hold"; + case REVOKED: return "Revoked"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + } + + public class RequestStatusEnumFactory implements EnumFactory { + public RequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return RequestStatus.DRAFT; + if ("active".equals(codeString)) + return RequestStatus.ACTIVE; + if ("on-hold".equals(codeString)) + return RequestStatus.ONHOLD; + if ("revoked".equals(codeString)) + return RequestStatus.REVOKED; + if ("completed".equals(codeString)) + return RequestStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return RequestStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return RequestStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, RequestStatus.DRAFT); + if ("active".equals(codeString)) + return new Enumeration(this, RequestStatus.ACTIVE); + if ("on-hold".equals(codeString)) + return new Enumeration(this, RequestStatus.ONHOLD); + if ("revoked".equals(codeString)) + return new Enumeration(this, RequestStatus.REVOKED); + if ("completed".equals(codeString)) + return new Enumeration(this, RequestStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, RequestStatus.ENTEREDINERROR); + if ("unknown".equals(codeString)) + return new Enumeration(this, RequestStatus.UNKNOWN); + throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); + } + public String toCode(RequestStatus code) { + if (code == RequestStatus.DRAFT) + return "draft"; + if (code == RequestStatus.ACTIVE) + return "active"; + if (code == RequestStatus.ONHOLD) + return "on-hold"; + if (code == RequestStatus.REVOKED) + return "revoked"; + if (code == RequestStatus.COMPLETED) + return "completed"; + if (code == RequestStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == RequestStatus.UNKNOWN) + return "unknown"; + return "?"; + } + public String toSystem(RequestStatus code) { + return code.getSystem(); + } + } + + public enum RequestIntent { + /** + * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act. + */ + PROPOSAL, + /** + * The request represents an intention to ensure something occurs without providing an authorization for others to act. + */ + PLAN, + /** + * The request represents a legally binding instruction authored by a Patient or RelatedPerson. + */ + DIRECTIVE, + /** + * The request represents a request/demand and authorization for action by a Practitioner. + */ + ORDER, + /** + * The request represents an original authorization for action. + */ + ORIGINALORDER, + /** + * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization. + */ + REFLEXORDER, + /** + * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order. + */ + FILLERORDER, + /** + * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug. + */ + INSTANCEORDER, + /** + * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used. + */ + OPTION, + /** + * added to help the parsers with the generic types + */ + NULL; + public static RequestIntent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return PROPOSAL; + if ("plan".equals(codeString)) + return PLAN; + if ("directive".equals(codeString)) + return DIRECTIVE; + if ("order".equals(codeString)) + return ORDER; + if ("original-order".equals(codeString)) + return ORIGINALORDER; + if ("reflex-order".equals(codeString)) + return REFLEXORDER; + if ("filler-order".equals(codeString)) + return FILLERORDER; + if ("instance-order".equals(codeString)) + return INSTANCEORDER; + if ("option".equals(codeString)) + return OPTION; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSAL: return "proposal"; + case PLAN: return "plan"; + case DIRECTIVE: return "directive"; + case ORDER: return "order"; + case ORIGINALORDER: return "original-order"; + case REFLEXORDER: return "reflex-order"; + case FILLERORDER: return "filler-order"; + case INSTANCEORDER: return "instance-order"; + case OPTION: return "option"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSAL: return "http://hl7.org/fhir/request-intent"; + case PLAN: return "http://hl7.org/fhir/request-intent"; + case DIRECTIVE: return "http://hl7.org/fhir/request-intent"; + case ORDER: return "http://hl7.org/fhir/request-intent"; + case ORIGINALORDER: return "http://hl7.org/fhir/request-intent"; + case REFLEXORDER: return "http://hl7.org/fhir/request-intent"; + case FILLERORDER: return "http://hl7.org/fhir/request-intent"; + case INSTANCEORDER: return "http://hl7.org/fhir/request-intent"; + case OPTION: return "http://hl7.org/fhir/request-intent"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act."; + case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act."; + case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson."; + case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner."; + case ORIGINALORDER: return "The request represents an original authorization for action."; + case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization."; + case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order."; + case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug."; + case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSAL: return "Proposal"; + case PLAN: return "Plan"; + case DIRECTIVE: return "Directive"; + case ORDER: return "Order"; + case ORIGINALORDER: return "Original Order"; + case REFLEXORDER: return "Reflex Order"; + case FILLERORDER: return "Filler Order"; + case INSTANCEORDER: return "Instance Order"; + case OPTION: return "Option"; + default: return "?"; + } + } + } + + public class RequestIntentEnumFactory implements EnumFactory { + public RequestIntent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return RequestIntent.PROPOSAL; + if ("plan".equals(codeString)) + return RequestIntent.PLAN; + if ("directive".equals(codeString)) + return RequestIntent.DIRECTIVE; + if ("order".equals(codeString)) + return RequestIntent.ORDER; + if ("original-order".equals(codeString)) + return RequestIntent.ORIGINALORDER; + if ("reflex-order".equals(codeString)) + return RequestIntent.REFLEXORDER; + if ("filler-order".equals(codeString)) + return RequestIntent.FILLERORDER; + if ("instance-order".equals(codeString)) + return RequestIntent.INSTANCEORDER; + if ("option".equals(codeString)) + return RequestIntent.OPTION; + throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return new Enumeration(this, RequestIntent.PROPOSAL); + if ("plan".equals(codeString)) + return new Enumeration(this, RequestIntent.PLAN); + if ("directive".equals(codeString)) + return new Enumeration(this, RequestIntent.DIRECTIVE); + if ("order".equals(codeString)) + return new Enumeration(this, RequestIntent.ORDER); + if ("original-order".equals(codeString)) + return new Enumeration(this, RequestIntent.ORIGINALORDER); + if ("reflex-order".equals(codeString)) + return new Enumeration(this, RequestIntent.REFLEXORDER); + if ("filler-order".equals(codeString)) + return new Enumeration(this, RequestIntent.FILLERORDER); + if ("instance-order".equals(codeString)) + return new Enumeration(this, RequestIntent.INSTANCEORDER); + if ("option".equals(codeString)) + return new Enumeration(this, RequestIntent.OPTION); + throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); + } + public String toCode(RequestIntent code) { + if (code == RequestIntent.PROPOSAL) + return "proposal"; + if (code == RequestIntent.PLAN) + return "plan"; + if (code == RequestIntent.DIRECTIVE) + return "directive"; + if (code == RequestIntent.ORDER) + return "order"; + if (code == RequestIntent.ORIGINALORDER) + return "original-order"; + if (code == RequestIntent.REFLEXORDER) + return "reflex-order"; + if (code == RequestIntent.FILLERORDER) + return "filler-order"; + if (code == RequestIntent.INSTANCEORDER) + return "instance-order"; + if (code == RequestIntent.OPTION) + return "option"; + return "?"; + } + public String toSystem(RequestIntent code) { + return code.getSystem(); + } + } + + public enum RequestPriority { + /** + * The request has normal priority. + */ + ROUTINE, + /** + * The request should be actioned promptly - higher priority than routine. + */ + URGENT, + /** + * The request should be actioned as soon as possible - higher priority than urgent. + */ + ASAP, + /** + * The request should be actioned immediately - highest possible priority. E.g. an emergency. + */ + STAT, + /** + * added to help the parsers with the generic types + */ + NULL; + public static RequestPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("asap".equals(codeString)) + return ASAP; + if ("stat".equals(codeString)) + return STAT; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case ASAP: return "asap"; + case STAT: return "stat"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ROUTINE: return "http://hl7.org/fhir/request-priority"; + case URGENT: return "http://hl7.org/fhir/request-priority"; + case ASAP: return "http://hl7.org/fhir/request-priority"; + case STAT: return "http://hl7.org/fhir/request-priority"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The request has normal priority."; + case URGENT: return "The request should be actioned promptly - higher priority than routine."; + case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent."; + case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case ASAP: return "ASAP"; + case STAT: return "STAT"; + default: return "?"; + } + } + } + + public class RequestPriorityEnumFactory implements EnumFactory { + public RequestPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return RequestPriority.ROUTINE; + if ("urgent".equals(codeString)) + return RequestPriority.URGENT; + if ("asap".equals(codeString)) + return RequestPriority.ASAP; + if ("stat".equals(codeString)) + return RequestPriority.STAT; + throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return new Enumeration(this, RequestPriority.ROUTINE); + if ("urgent".equals(codeString)) + return new Enumeration(this, RequestPriority.URGENT); + if ("asap".equals(codeString)) + return new Enumeration(this, RequestPriority.ASAP); + if ("stat".equals(codeString)) + return new Enumeration(this, RequestPriority.STAT); + throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); + } + public String toCode(RequestPriority code) { + if (code == RequestPriority.ROUTINE) + return "routine"; + if (code == RequestPriority.URGENT) + return "urgent"; + if (code == RequestPriority.ASAP) + return "asap"; + if (code == RequestPriority.STAT) + return "stat"; + return "?"; + } + public String toSystem(RequestPriority code) { + return code.getSystem(); + } + } + + /** + * @return {@link #identifier} (Business identifiers assigned to this {{title}} by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.) + */ + public List getIdentifier(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setIdentifier(List theIdentifier); + + public boolean hasIdentifier(); + + public Identifier addIdentifier(); + + public Request addIdentifier(Identifier t); + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist + */ + public Identifier getIdentifierFirstRep() ; + + /** + * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public List getInstantiatesCanonical(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setInstantiatesCanonical(List theInstantiatesCanonical); + + public boolean hasInstantiatesCanonical(); + + /** + * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public CanonicalType addInstantiatesCanonicalElement(); + + /** + * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public Request addInstantiatesCanonical(String value); + + /** + * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public boolean hasInstantiatesCanonical(String value) ; + + /** + * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public List getInstantiatesUri(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setInstantiatesUri(List theInstantiatesUri); + + public boolean hasInstantiatesUri(); + + /** + * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public UriType addInstantiatesUriElement(); + + /** + * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public Request addInstantiatesUri(String value); + + /** + * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.) + */ + public boolean hasInstantiatesUri(String value) ; + + /** + * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this {{title}}.) + */ + public List getBasedOn(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setBasedOn(List theBasedOn); + + public boolean hasBasedOn(); + + public Reference addBasedOn(); + + public Request addBasedOn(Reference t); + + /** + * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist + */ + public Reference getBasedOnFirstRep() ; + + /** + * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new {{title}}.) + */ + public List getReplaces(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setReplaces(List theReplaces); + + public boolean hasReplaces(); + + public Reference addReplaces(); + + public Request addReplaces(Reference t); + + /** + * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist + */ + public Reference getReplacesFirstRep() ; + + /** + * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) + */ + public Identifier getGroupIdentifier(); + + public boolean hasGroupIdentifier(); + + /** + * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) + */ + public Request setGroupIdentifier(Identifier value); + + /** + * @return {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement(); + + public boolean hasStatusElement(); + + public boolean hasStatus(); + + /** + * @param value {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Request setStatusElement(Enumeration value) ; + + /** + * @return The current state of the {{title}}. + */ + public RequestStatus getStatus(); + + /** + * @param value The current state of the {{title}}. + */ + public Request setStatus(RequestStatus value); + + /** + * @return {@link #statusReason} (Captures the reason for the current state of the {{title}}.) + */ + public CodeableConcept getStatusReason(); + + public boolean hasStatusReason(); + + /** + * @param value {@link #statusReason} (Captures the reason for the current state of the {{title}}.) + */ + public Request setStatusReason(CodeableConcept value); + + /** + * @return {@link #intent} (Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value + */ + public Enumeration getIntentElement(); + + public boolean hasIntentElement(); + + public boolean hasIntent(); + + /** + * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value + */ + public Request setIntentElement(Enumeration value) ; + + /** + * @return Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain. + */ + public RequestIntent getIntent(); + + /** + * @param value Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain. + */ + public Request setIntent(RequestIntent value); + + /** + * @return {@link #priority} (Indicates how quickly the {{title}} should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement(); + + public boolean hasPriorityElement(); + + public boolean hasPriority(); + + /** + * @param value {@link #priority} (Indicates how quickly the {{title}} should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Request setPriorityElement(Enumeration value) ; + + /** + * @return Indicates how quickly the {{title}} should be addressed with respect to other requests. + */ + public RequestPriority getPriority(); + + /** + * @param value Indicates how quickly the {{title}} should be addressed with respect to other requests. + */ + public Request setPriority(RequestPriority value); + + /** + * @return {@link #doNotPerform} (If true indicates that the {{title}} is asking for the specified action to *not* occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value + */ + public BooleanType getDoNotPerformElement(); + + public boolean hasDoNotPerformElement(); + + public boolean hasDoNotPerform(); + + /** + * @param value {@link #doNotPerform} (If true indicates that the {{title}} is asking for the specified action to *not* occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value + */ + public Request setDoNotPerformElement(BooleanType value) ; + + /** + * @return If true indicates that the {{title}} is asking for the specified action to *not* occur. + */ + public boolean getDoNotPerform(); + + /** + * @param value If true indicates that the {{title}} is asking for the specified action to *not* occur. + */ + public Request setDoNotPerform(boolean value); + + /** + * @return {@link #code} (A code that identifies the specific service or action being asked to be done (or not done).) + */ + public CodeableConcept getCode(); + + public boolean hasCode(); + + /** + * @param value {@link #code} (A code that identifies the specific service or action being asked to be done (or not done).) + */ + public Request setCode(CodeableConcept value); + + /** + * @return {@link #subject} (The individual or set of individuals the action is to be performed/not performed on or for.) + */ + public Reference getSubject(); + + public boolean hasSubject(); + + /** + * @param value {@link #subject} (The individual or set of individuals the action is to be performed/not performed on or for.) + */ + public Request setSubject(Reference value); + + /** + * @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 individual or set of individuals the action is to be performed/not performed on or for.) + */ + public Resource getSubjectTarget(); + + /** + * @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 individual or set of individuals the action is to be performed/not performed on or for.) + */ + public Request setSubjectTarget(Resource value); + + /** + * @return {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Reference getEncounter(); + + public boolean hasEncounter(); + + /** + * @param value {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Request setEncounter(Reference value); + + /** + * @return {@link #encounter} 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 Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Encounter getEncounterTarget(); + + /** + * @param value {@link #encounter} 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 Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.) + */ + public Request setEncounterTarget(Encounter value); + + /** + * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.) + */ + public Type getOccurrence(); + + /** + * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.) + */ + public DateTimeType getOccurrenceDateTimeType() throws FHIRException; + + public boolean hasOccurrenceDateTimeType(); + + /** + * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.) + */ + public Period getOccurrencePeriod() throws FHIRException; + + public boolean hasOccurrencePeriod(); + + /** + * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.) + */ + public Timing getOccurrenceTiming() throws FHIRException; + + public boolean hasOccurrenceTiming(); + + public boolean hasOccurrence(); + + /** + * @param value {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.) + */ + public Request setOccurrence(Type value); + + /** + * @return {@link #authoredOn} (For draft {{title}}s, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value + */ + public DateTimeType getAuthoredOnElement(); + + public boolean hasAuthoredOnElement(); + + public boolean hasAuthoredOn(); + + /** + * @param value {@link #authoredOn} (For draft {{title}}s, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value + */ + public Request setAuthoredOnElement(DateTimeType value) ; + + /** + * @return For draft {{title}}s, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. + */ + public Date getAuthoredOn(); + + /** + * @param value For draft {{title}}s, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. + */ + public Request setAuthoredOn(Date value); + + /** + * @return {@link #requester} (Who initiated the {{request}} and has responsibility for its activation.) + */ + public Reference getRequester(); + + public boolean hasRequester(); + + /** + * @param value {@link #requester} (Who initiated the {{request}} and has responsibility for its activation.) + */ + public Request setRequester(Reference value); + + /** + * @return {@link #requester} 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. (Who initiated the {{request}} and has responsibility for its activation.) + */ + public Resource getRequesterTarget(); + + /** + * @param value {@link #requester} 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. (Who initiated the {{request}} and has responsibility for its activation.) + */ + public Request setRequesterTarget(Resource value); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Type getReported(); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public BooleanType getReportedBooleanType() throws FHIRException; + + public boolean hasReportedBooleanType(); + + /** + * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Reference getReportedReference() throws FHIRException; + + public boolean hasReportedReference(); + + public boolean hasReported(); + + /** + * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) + */ + public Request setReported(Type value); + + /** + * @return {@link #performerType} (The type of individual that is desired to act upon/ not act upon the {{request}}.) + */ + public CodeableConcept getPerformerType(); + + public boolean hasPerformerType(); + + /** + * @param value {@link #performerType} (The type of individual that is desired to act upon/ not act upon the {{request}}.) + */ + public Request setPerformerType(CodeableConcept value); + + /** + * @return {@link #performer} (Indicates who or what is being asked to perform (or not perform) the {{request}}.) + */ + public Reference getPerformer(); + + public boolean hasPerformer(); + + /** + * @param value {@link #performer} (Indicates who or what is being asked to perform (or not perform) the {{request}}.) + */ + public Request setPerformer(Reference value); + + /** + * @return {@link #performer} 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. (Indicates who or what is being asked to perform (or not perform) the {{request}}.) + */ + public Resource getPerformerTarget(); + + /** + * @param value {@link #performer} 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. (Indicates who or what is being asked to perform (or not perform) the {{request}}.) + */ + public Request setPerformerTarget(Resource value); + + /** + * @return {@link #reasonCode} (Describes why the request is being made in coded or textual form.) + */ + public List getReasonCode(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setReasonCode(List theReasonCode); + + public boolean hasReasonCode(); + + public CodeableConcept addReasonCode(); + + public Request addReasonCode(CodeableConcept t); + + /** + * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist + */ + public CodeableConcept getReasonCodeFirstRep() ; + + /** + * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request.) + */ + public List getReasonReference(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setReasonReference(List theReasonReference); + + public boolean hasReasonReference(); + + public Reference addReasonReference(); + + public Request addReasonReference(Reference t); + + /** + * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist + */ + public Reference getReasonReferenceFirstRep() ; + + /** + * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service.) + */ + public List getInsurance(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setInsurance(List theInsurance); + + public boolean hasInsurance(); + + public Reference addInsurance(); + + public Request addInsurance(Reference t); + + /** + * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist + */ + public Reference getInsuranceFirstRep() ; + + /** + * @return {@link #supportingInfo} (Information that may be needed by/relevant to the performer in their execution of this {{title}}.) + */ + public List getSupportingInfo(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setSupportingInfo(List theSupportingInfo); + + public boolean hasSupportingInfo(); + + public Reference addSupportingInfo(); + + public Request addSupportingInfo(Reference t); + + /** + * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist + */ + public Reference getSupportingInfoFirstRep() ; + + /** + * @return {@link #note} (Comments made about the {{title}} by the requester, performer, subject or other participants.) + */ + public List getNote(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setNote(List theNote); + + public boolean hasNote(); + + public Annotation addNote(); + + public Request addNote(Annotation t); + + /** + * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist + */ + public Annotation getNoteFirstRep() ; + + /** + * @return {@link #relevantHistory} (Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.) + */ + public List getRelevantHistory(); + + /** + * @return Returns a reference to this for easy method chaining + */ + public Request setRelevantHistory(List theRelevantHistory); + + public boolean hasRelevantHistory(); + + public Reference addRelevantHistory(); + + public Request addRelevantHistory(Reference t); + + /** + * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist + */ + public Reference getRelevantHistoryFirstRep() ; + + public String fhirType(); + + +} +