reverse SearchParameter.base change

This commit is contained in:
Grahame Grieve 2022-12-14 06:29:21 +11:00
parent 0cf8cbcba5
commit 38c4785236
11 changed files with 45 additions and 65 deletions

View File

@ -10,8 +10,6 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri1
import org.hl7.fhir.dstu2.utils.ToolingExtensions; import org.hl7.fhir.dstu2.utils.ToolingExtensions;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class SearchParameter10_50 { public class SearchParameter10_50 {
@ -38,7 +36,7 @@ public class SearchParameter10_50 {
tgt.setRequirements(src.getPurpose()); tgt.setRequirements(src.getPurpose());
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.setBase(t.getCode()); for (CodeType t : src.getBase()) tgt.setBaseElement(Code10_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription()) if (src.hasDescription())
@ -75,7 +73,7 @@ public class SearchParameter10_50 {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
tgt.addBase(AllResourceTypes.fromCode(src.getBase())); tgt.getBase().add(Code10_50.convertCode(src.getBaseElement()));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription()) if (src.hasDescription())

View File

@ -11,8 +11,6 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Stri
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50; import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class SearchParameter14_50 { public class SearchParameter14_50 {
@ -44,7 +42,7 @@ public class SearchParameter14_50 {
tgt.setRequirements(src.getPurpose()); tgt.setRequirements(src.getPurpose());
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.setBase(t.asStringValue()); for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription()) if (src.hasDescription())
@ -87,7 +85,7 @@ public class SearchParameter14_50 {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
tgt.addBase(AllResourceTypes.fromCode(src.getBase())); tgt.getBase().add(Code14_50.convertCode(src.getBaseElement()));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription()) if (src.hasDescription())

View File

@ -15,8 +15,6 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Stri
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class SearchParameter30_50 { public class SearchParameter30_50 {
@ -215,7 +213,7 @@ public class SearchParameter30_50 {
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.addBase(AllResourceTypes.fromCode(t.asStringValue())); for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDerivedFrom()) if (src.hasDerivedFrom())
@ -270,7 +268,7 @@ public class SearchParameter30_50 {
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.addBase(t.getCode()); for (CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDerivedFrom()) if (src.hasDerivedFrom())

View File

@ -15,8 +15,6 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
/* /*
Copyright (c) 2011+, HL7, Inc. Copyright (c) 2011+, HL7, Inc.
@ -82,7 +80,7 @@ public class SearchParameter40_50 {
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.addBase(AllResourceTypes.fromCode(t.asStringValue())); for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression()) if (src.hasExpression())
@ -141,7 +139,7 @@ public class SearchParameter40_50 {
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.addBase(t.getCode()); for (CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression()) if (src.hasExpression())

View File

@ -15,8 +15,6 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
/* /*
Copyright (c) 2011+, HL7, Inc. Copyright (c) 2011+, HL7, Inc.
@ -82,7 +80,7 @@ public class SearchParameter43_50 {
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.addBase(AllResourceTypes.fromCode(t.asStringValue())); for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression()) if (src.hasExpression())
@ -141,7 +139,7 @@ public class SearchParameter43_50 {
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode()) if (src.hasCode())
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement())); tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.addBase(t.getCode()); for (CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertCode(t));
if (src.hasType()) if (src.hasType())
tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement())); tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression()) if (src.hasExpression())

View File

@ -309,7 +309,7 @@ public class Analyser {
if (!Utilities.existsInList(name, "Resource")) { if (!Utilities.existsInList(name, "Resource")) {
for (SearchParameter sp : definitions.getSearchParams().getList()) { for (SearchParameter sp : definitions.getSearchParams().getList()) {
boolean relevant = false; boolean relevant = false;
for (Enumeration<AllResourceTypes> c : sp.getBase()) { for (CodeType c : sp.getBase()) {
if (c.getValue().equals(name)) { if (c.getValue().equals(name)) {
relevant = true; relevant = true;
break; break;

View File

@ -27903,9 +27903,9 @@ public class JsonParser extends JsonParserBase {
JsonArray array = getJArray(json, "base"); JsonArray array = getJArray(json, "base");
for (int i = 0; i < array.size(); i++) { for (int i = 0; i < array.size(); i++) {
if (array.get(i).isJsonNull()) { if (array.get(i).isJsonNull()) {
res.getBase().add(new Enumeration<Enumerations.AllResourceTypes>(new Enumerations.AllResourceTypesEnumFactory(), Enumerations.AllResourceTypes.NULL)); res.getBase().add(new CodeType());
} else {; } else {;
res.getBase().add(parseEnumeration(array.get(i).getAsString(), Enumerations.AllResourceTypes.NULL, new Enumerations.AllResourceTypesEnumFactory())); res.getBase().add(parseCode(array.get(i).getAsString()));
} }
} }
}; };
@ -27913,7 +27913,7 @@ public class JsonParser extends JsonParserBase {
JsonArray array = getJArray(json, "_base"); JsonArray array = getJArray(json, "_base");
for (int i = 0; i < array.size(); i++) { for (int i = 0; i < array.size(); i++) {
if (i == res.getBase().size()) if (i == res.getBase().size())
res.getBase().add(parseEnumeration(null, Enumerations.AllResourceTypes.NULL, new Enumerations.AllResourceTypesEnumFactory())); res.getBase().add(new CodeType());
if (array.get(i) instanceof JsonObject) if (array.get(i) instanceof JsonObject)
parseElementProperties(array.get(i).getAsJsonObject(), res.getBase().get(i)); parseElementProperties(array.get(i).getAsJsonObject(), res.getBase().get(i));
} }
@ -64718,13 +64718,13 @@ public class JsonParser extends JsonParserBase {
} }
if (element.hasBase()) { if (element.hasBase()) {
openArray("base"); openArray("base");
for (Enumeration<Enumerations.AllResourceTypes> e : element.getBase()) for (CodeType e : element.getBase())
composeEnumerationCore(null, e, new Enumerations.AllResourceTypesEnumFactory(), true); composeCodeCore(null, e, true);
closeArray(); closeArray();
if (anyHasExtras(element.getBase())) { if (anyHasExtras(element.getBase())) {
openArray("_base"); openArray("_base");
for (Enumeration<Enumerations.AllResourceTypes> e : element.getBase()) for (CodeType e : element.getBase())
composeEnumerationExtras(null, e, new Enumerations.AllResourceTypesEnumFactory(), true); composeCodeExtras(null, e, true);
closeArray(); closeArray();
} }
}; };

View File

@ -22356,7 +22356,7 @@ public class RdfParser extends RdfParserBase {
composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1); composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1);
} }
for (int i = 0; i < element.getBase().size(); i++) { for (int i = 0; i < element.getBase().size(); i++) {
composeEnum(t, "SearchParameter", "base", element.getBase().get(i), i); composeCode(t, "SearchParameter", "base", element.getBase().get(i), i);
} }
if (element.hasTypeElement()) { if (element.hasTypeElement()) {
composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1); composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1);

View File

@ -24175,7 +24175,7 @@ public class XmlParser extends XmlParserBase {
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) {
res.setCodeElement(parseCode(xpp)); res.setCodeElement(parseCode(xpp));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) {
res.getBase().add(parseEnumeration(xpp, Enumerations.AllResourceTypes.NULL, new Enumerations.AllResourceTypesEnumFactory())); res.getBase().add(parseCode(xpp));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) {
res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory()));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) {
@ -55508,8 +55508,8 @@ public class XmlParser extends XmlParserBase {
composeCode("code", element.getCodeElement()); composeCode("code", element.getCodeElement());
} }
if (element.hasBase()) if (element.hasBase())
for (Enumeration<Enumerations.AllResourceTypes> e : element.getBase()) for (CodeType e : element.getBase())
composeEnumeration("base", e, new Enumerations.AllResourceTypesEnumFactory()); composeCode("base", e);
if (element.hasTypeElement()) if (element.hasTypeElement())
composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory());
if (element.hasExpressionElement()) { if (element.hasExpressionElement()) {

View File

@ -1050,7 +1050,7 @@ public class SearchParameter extends CanonicalResource {
@Child(name = "base", type = {CodeType.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Child(name = "base", type = {CodeType.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="The resource type(s) this search parameter applies to", formalDefinition="The base resource type(s) that this search parameter can be used against." ) @Description(shortDefinition="The resource type(s) this search parameter applies to", formalDefinition="The base resource type(s) that this search parameter can be used against." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-resource-types") @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-resource-types")
protected List<Enumeration<AllResourceTypes>> base; protected List<CodeType> base;
/** /**
* The type of value that a search parameter may contain, and how the content is interpreted. * The type of value that a search parameter may contain, and how the content is interpreted.
@ -1146,7 +1146,7 @@ public class SearchParameter extends CanonicalResource {
/** /**
* Constructor * Constructor
*/ */
public SearchParameter(String url, String name, PublicationStatus status, String description, String code, AllResourceTypes base, SearchParamType type) { public SearchParameter(String url, String name, PublicationStatus status, String description, String code, String base, SearchParamType type) {
super(); super();
this.setUrl(url); this.setUrl(url);
this.setName(name); this.setName(name);
@ -1934,16 +1934,16 @@ public class SearchParameter extends CanonicalResource {
/** /**
* @return {@link #base} (The base resource type(s) that this search parameter can be used against.) * @return {@link #base} (The base resource type(s) that this search parameter can be used against.)
*/ */
public List<Enumeration<AllResourceTypes>> getBase() { public List<CodeType> getBase() {
if (this.base == null) if (this.base == null)
this.base = new ArrayList<Enumeration<AllResourceTypes>>(); this.base = new ArrayList<CodeType>();
return this.base; return this.base;
} }
/** /**
* @return Returns a reference to <code>this</code> for easy method chaining * @return Returns a reference to <code>this</code> for easy method chaining
*/ */
public SearchParameter setBase(List<Enumeration<AllResourceTypes>> theBase) { public SearchParameter setBase(List<CodeType> theBase) {
this.base = theBase; this.base = theBase;
return this; return this;
} }
@ -1951,7 +1951,7 @@ public class SearchParameter extends CanonicalResource {
public boolean hasBase() { public boolean hasBase() {
if (this.base == null) if (this.base == null)
return false; return false;
for (Enumeration<AllResourceTypes> item : this.base) for (CodeType item : this.base)
if (!item.isEmpty()) if (!item.isEmpty())
return true; return true;
return false; return false;
@ -1960,10 +1960,10 @@ public class SearchParameter extends CanonicalResource {
/** /**
* @return {@link #base} (The base resource type(s) that this search parameter can be used against.) * @return {@link #base} (The base resource type(s) that this search parameter can be used against.)
*/ */
public Enumeration<AllResourceTypes> addBaseElement() {//2 public CodeType addBaseElement() {//2
Enumeration<AllResourceTypes> t = new Enumeration<AllResourceTypes>(new AllResourceTypesEnumFactory()); CodeType t = new CodeType();
if (this.base == null) if (this.base == null)
this.base = new ArrayList<Enumeration<AllResourceTypes>>(); this.base = new ArrayList<CodeType>();
this.base.add(t); this.base.add(t);
return t; return t;
} }
@ -1971,11 +1971,11 @@ public class SearchParameter extends CanonicalResource {
/** /**
* @param value {@link #base} (The base resource type(s) that this search parameter can be used against.) * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.)
*/ */
public SearchParameter addBase(AllResourceTypes value) { //1 public SearchParameter addBase(String code) { //1
Enumeration<AllResourceTypes> t = new Enumeration<AllResourceTypes>(new AllResourceTypesEnumFactory()); CodeType t = new CodeType();
t.setValue(value); t.setValue(code);
if (this.base == null) if (this.base == null)
this.base = new ArrayList<Enumeration<AllResourceTypes>>(); this.base = new ArrayList<CodeType>();
this.base.add(t); this.base.add(t);
return this; return this;
} }
@ -1983,11 +1983,11 @@ public class SearchParameter extends CanonicalResource {
/** /**
* @param value {@link #base} (The base resource type(s) that this search parameter can be used against.) * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.)
*/ */
public boolean hasBase(AllResourceTypes value) { public boolean hasBase(String code) {
if (this.base == null) if (this.base == null)
return false; return false;
for (Enumeration<AllResourceTypes> v : this.base) for (CodeType v : this.base)
if (v.getValue().equals(value)) // code if (v.getValue().equals(code)) // code
return true; return true;
return false; return false;
} }
@ -2838,8 +2838,8 @@ public class SearchParameter extends CanonicalResource {
this.code = TypeConvertor.castToCode(value); // CodeType this.code = TypeConvertor.castToCode(value); // CodeType
return value; return value;
case 3016401: // base case 3016401: // base
value = new AllResourceTypesEnumFactory().fromType(TypeConvertor.castToCode(value)); value = TypeConvertor.castToCode(value);
this.getBase().add((Enumeration) value); // Enumeration<AllResourceTypes> this.getBase().add((CodeType) value); // Enumeration<AllResourceTypes>
return value; return value;
case 3575610: // type case 3575610: // type
value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
@ -2919,8 +2919,8 @@ public class SearchParameter extends CanonicalResource {
} else if (name.equals("code")) { } else if (name.equals("code")) {
this.code = TypeConvertor.castToCode(value); // CodeType this.code = TypeConvertor.castToCode(value); // CodeType
} else if (name.equals("base")) { } else if (name.equals("base")) {
value = new AllResourceTypesEnumFactory().fromType(TypeConvertor.castToCode(value)); value = TypeConvertor.castToCode(value);
this.getBase().add((Enumeration) value); this.getBase().add((CodeType) value);
} else if (name.equals("type")) { } else if (name.equals("type")) {
value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
this.type = (Enumeration) value; // Enumeration<SearchParamType> this.type = (Enumeration) value; // Enumeration<SearchParamType>
@ -3162,8 +3162,8 @@ public class SearchParameter extends CanonicalResource {
dst.purpose = purpose == null ? null : purpose.copy(); dst.purpose = purpose == null ? null : purpose.copy();
dst.code = code == null ? null : code.copy(); dst.code = code == null ? null : code.copy();
if (base != null) { if (base != null) {
dst.base = new ArrayList<Enumeration<AllResourceTypes>>(); dst.base = new ArrayList<CodeType>();
for (Enumeration<AllResourceTypes> i : base) for (CodeType i : base)
dst.base.add(i.copy()); dst.base.add(i.copy());
}; };
dst.type = type == null ? null : type.copy(); dst.type = type == null ? null : type.copy();
@ -4477,15 +4477,6 @@ public class SearchParameter extends CanonicalResource {
return false; return false;
} }
public boolean hasBase(String n) {
for (Enumeration<AllResourceTypes> b : getBase()) {
if (b.getCode().equals(n)) {
return true;
}
}
return false;
}
// end addition // end addition
} }

View File

@ -7,7 +7,6 @@ import java.util.List;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
import org.hl7.fhir.r5.model.OperationDefinition; import org.hl7.fhir.r5.model.OperationDefinition;
import org.hl7.fhir.r5.model.Resource; import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.SearchParameter; import org.hl7.fhir.r5.model.SearchParameter;
@ -50,7 +49,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
XhtmlNode tr = tbl.tr(); XhtmlNode tr = tbl.tr();
tr.td().tx(Utilities.pluralize("Resource", spd.getBase().size())); tr.td().tx(Utilities.pluralize("Resource", spd.getBase().size()));
XhtmlNode td = tr.td(); XhtmlNode td = tr.td();
for (Enumeration<AllResourceTypes> t : spd.getBase()) { for (CodeType t : spd.getBase()) {
StructureDefinition sd = context.getWorker().fetchTypeDefinition(t.toString()); StructureDefinition sd = context.getWorker().fetchTypeDefinition(t.toString());
if (sd != null && sd.hasUserData("path")) { if (sd != null && sd.hasUserData("path")) {
td.ah(sd.getUserString("path")).sep(", ").tx(t.getCode()); td.ah(sd.getUserString("path")).sep(", ").tx(t.getCode());