Fix for HAPI-FHIR issue 1820

This commit is contained in:
markiantorno 2020-04-29 14:08:36 -04:00
parent 6110b56396
commit 368a45a150
5 changed files with 3947 additions and 3656 deletions

View File

@ -9,9 +9,9 @@ package org.hl7.fhir.r4.model;
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -50,119 +50,130 @@ package org.hl7.fhir.r4.model;
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.List;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import java.util.List;
/**
* A length of time.
*/
@DatatypeDef(name="Duration")
@DatatypeDef(name = "Duration")
public class Duration extends Quantity implements ICompositeType {
private static final long serialVersionUID = 0L;
private static final long serialVersionUID = 0L;
/**
* Constructor
*/
public Duration() {
super();
public Duration() {
super();
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
default:
return super.getNamedProperty(_hash, _name, _checkValid);
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
}
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
default:
return super.getProperty(hash, name, checkValid);
}
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
default: return super.getProperty(hash, name, checkValid);
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
default:
return super.setProperty(hash, name, value);
}
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
default: return super.setProperty(hash, name, value);
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
return super.setProperty(name, value);
}
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
default:
return super.makeProperty(hash, name);
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
return super.setProperty(name, value);
}
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.makeProperty(hash, name);
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
default:
return super.getTypesForProperty(hash, name);
}
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
return super.addChild(name);
}
@Override
public Base addChild(String name) throws FHIRException {
return super.addChild(name);
}
public String fhirType() {
return "Duration";
}
public Duration copy() {
Duration dst = new Duration();
copyValues(dst);
return dst;
}
public Duration copy() {
Duration dst = new Duration();
copyValues(dst);
dst.value = value == null ? null : value.copy();
dst.comparator = comparator == null ? null : comparator.copy();
dst.unit = unit == null ? null : unit.copy();
dst.system = system == null ? null : system.copy();
dst.code = code == null ? null : code.copy();
return dst;
}
protected Duration typedCopy() {
return copy();
}
protected Duration typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Duration))
return false;
Duration o = (Duration) other_;
return true;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Duration))
return false;
Duration o = (Duration) other_;
return true;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Duration))
return false;
Duration o = (Duration) other_;
return true;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Duration))
return false;
Duration o = (Duration) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
}
}

View File

@ -9,10 +9,12 @@ import org.hl7.fhir.r5.model.DomainResource;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.r5.utils.NarrativeGenerator;
import org.hl7.fhir.utilities.xml.XMLUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
@ -29,7 +31,7 @@ import java.util.List;
import java.util.stream.Stream;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Disabled //Test case 1 doesn't pass in r5 yet
@Disabled //Test case 1 doesn't pass
public class NarrativeGenerationTests {
private IWorkerContext context;

View File

@ -47,7 +47,7 @@ import java.util.*;
import java.util.Map.Entry;
@RunWith(Parameterized.class)
public class ValidationTestSuite implements IEvaluationContext, IValidatorResourceFetcher {
public class ValidationTests implements IEvaluationContext, IValidatorResourceFetcher {
public final static boolean PRINT_OUTPUT_TO_CONSOLE = false;
@ -78,7 +78,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
private JsonObject content;
private String version;
public ValidationTestSuite(String name, JsonObject content) {
public ValidationTests(String name, JsonObject content) {
this.name = name;
this.content = content;
}

View File

@ -1,14 +1,5 @@
package org.hl7.fhir.validation.tests.utilities;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.validation.tests.ValidationTestSuite;
import com.google.common.base.Charsets;
public class TestUtilities {
public static boolean silent = false;
@ -17,5 +8,4 @@ public class TestUtilities {
// return org.hl7.fhir.utilities.Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", name);
// }
}