add generated patterns

This commit is contained in:
Grahame Grieve 2019-05-07 09:30:08 +10:00
parent 62ec11aad2
commit 86151d5f13
7 changed files with 3455 additions and 57 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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<ElementRedirection>());
derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, webUrl, derived.getId(), null, null, false, base.getUrl(), null, false, new ArrayList<ElementRedirection>(), 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<ElementRedirection> 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<ElementRedirection> 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<ElementRedirection>());
diffCursor - 1, url, webUrl, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, new ArrayList<ElementRedirection>(), 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();

View File

@ -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<CanonicalType> getDerivedFromCanonical();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setDerivedFromCanonical(List<CanonicalType> 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<UriType> getDerivedFromUri();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setDerivedFromUri(List<UriType> 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<CanonicalType> getPartOf();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setPartOf(List<CanonicalType> 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<CanonicalType> getReplaces();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setReplaces(List<CanonicalType> 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<PublicationStatus> 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<PublicationStatus> 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<ContactDetail> getContact();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setContact(List<ContactDetail> 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<UsageContext> getUseContext();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setUseContext(List<UsageContext> 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<CodeableConcept> getJurisdiction();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Definition setJurisdiction(List<CodeableConcept> 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();
}

View File

@ -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<EventStatus> {
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<EventStatus> fromType(Base code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration<EventStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("preparation".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.PREPARATION);
if ("in-progress".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.INPROGRESS);
if ("not-done".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.NOTDONE);
if ("on-hold".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.ONHOLD);
if ("stopped".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.STOPPED);
if ("completed".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.COMPLETED);
if ("entered-in-error".equals(codeString))
return new Enumeration<EventStatus>(this, EventStatus.ENTEREDINERROR);
if ("unknown".equals(codeString))
return new Enumeration<EventStatus>(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<Identifier> getIdentifier();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setIdentifier(List<Identifier> 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<CanonicalType> getInstantiatesCanonical();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setInstantiatesCanonical(List<CanonicalType> 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<UriType> getInstantiatesUri();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setInstantiatesUri(List<UriType> 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<Reference> getBasedOn();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setBasedOn(List<Reference> 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<Reference> getPartOf();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setPartOf(List<Reference> 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<Reference> getResearchStudy();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setResearchStudy(List<Reference> 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<EventStatus> 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<EventStatus> 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<EventPerformerComponent> getPerformer();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setPerformer(List<EventPerformerComponent> 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<CodeableConcept> getReasonCode();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setReasonCode(List<CodeableConcept> 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<Reference> getReasonReference();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setReasonReference(List<Reference> 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<Annotation> getNote();
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Event setNote(List<Annotation> 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();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
package org.hl7.fhir.r5.model;
public interface PatternBase {
}