Merge pull request #1507 from hapifhir/2023-12-gg-fhirpath
2023 12 gg fhirpath
This commit is contained in:
commit
f8c45e3f30
|
@ -338,8 +338,9 @@ public class ImplementationGuide40_50 {
|
|||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
if (src.hasIsExample())
|
||||
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getIsExampleElement()));
|
||||
if (src.hasProfile())
|
||||
if (src.hasProfile() && (!src.hasIsExample() || src.getIsExample())) {
|
||||
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProfile().get(0)));
|
||||
}
|
||||
if (src.hasGroupingId())
|
||||
tgt.setGroupingIdElement(Id40_50.convertId(src.getGroupingIdElement()));
|
||||
return tgt;
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode;
|
||||
import org.hl7.fhir.r4.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathConstant;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
import org.hl7.fhir.r5.model.DecimalType;
|
||||
|
@ -25,7 +26,6 @@ import org.hl7.fhir.r5.model.IdType;
|
|||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathConstant;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
/*
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4b.model.StructureMap.StructureMapGroupTypeMode;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathConstant;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
import org.hl7.fhir.r5.model.DecimalType;
|
||||
|
@ -25,7 +26,6 @@ import org.hl7.fhir.r5.model.IdType;
|
|||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathConstant;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
/*
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.text.ParseException;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -52,7 +53,8 @@ public class VSACImporter extends OIDBasedValueSetImporter {
|
|||
FHIRToolingClient fhirToolingClient = new FHIRToolingClient("https://cts.nlm.nih.gov/fhir", "fhir/vsac");
|
||||
fhirToolingClient.setUsername("apikey");
|
||||
fhirToolingClient.setPassword(apiKey);
|
||||
fhirToolingClient.setTimeoutNormal(6000);
|
||||
fhirToolingClient.setTimeoutNormal(30000);
|
||||
fhirToolingClient.setTimeoutExpand(30000);
|
||||
|
||||
CapabilityStatement cs = fhirToolingClient.getCapabilitiesStatement();
|
||||
JsonParser json = new JsonParser();
|
||||
|
@ -62,18 +64,30 @@ public class VSACImporter extends OIDBasedValueSetImporter {
|
|||
List<String> oids = new ArrayList<>();
|
||||
while (csv.line()) {
|
||||
String oid = csv.cell("OID");
|
||||
oids.add(oid);
|
||||
if (!onlyNew || !(new File(Utilities.path(dest, "ValueSet-" + oid + ".json")).exists())) {
|
||||
oids.add(oid);
|
||||
}
|
||||
}
|
||||
Collections.sort(oids);
|
||||
System.out.println("Go: "+oids.size()+" oids");
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
long t = System.currentTimeMillis();
|
||||
long tt = System.currentTimeMillis();
|
||||
for (String oid : oids) {
|
||||
try {
|
||||
j = processOid(dest, onlyNew, errs, fhirToolingClient, j, oid.trim());
|
||||
long t3 = System.currentTimeMillis();
|
||||
if (processOid(dest, onlyNew, errs, fhirToolingClient, oid.trim())) {
|
||||
j++;
|
||||
}
|
||||
i++;
|
||||
System.out.print(":"+((System.currentTimeMillis() - t3) / 1000));
|
||||
if (i % 100 == 0) {
|
||||
System.out.println(":"+i+" ("+j+")");
|
||||
long elapsed = System.currentTimeMillis() - t;
|
||||
System.out.println("");
|
||||
System.out.println(i+": "+j+" ("+((j * 100) / i)+"%) @ "+Utilities.describeDuration(elapsed)
|
||||
+", "+(elapsed/100000)+"sec/vs, estimated "+Utilities.describeDuration(estimate(i, oids.size(), tt))+" remaining");
|
||||
t = System.currentTimeMillis();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("Unable to fetch OID " + oid + ": " + e.getMessage());
|
||||
|
@ -85,63 +99,70 @@ public class VSACImporter extends OIDBasedValueSetImporter {
|
|||
oo.addIssue().setSeverity(IssueSeverity.ERROR).setCode(IssueType.EXCEPTION).setDiagnostics(errs.get(oid)).addLocation(oid);
|
||||
}
|
||||
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(dest, "other", "OperationOutcome-vsac-errors.json")), oo);
|
||||
System.out.println("Done. " + i + " ValueSets");
|
||||
System.out.println("Done. " + i + " ValueSets in "+Utilities.describeDuration(System.currentTimeMillis() - tt));
|
||||
}
|
||||
|
||||
private int processOid(String dest, boolean onlyNew, Map<String, String> errs, FHIRToolingClient fhirToolingClient, int j, String oid)
|
||||
private long estimate(int i, int size, long tt) {
|
||||
long elapsed = System.currentTimeMillis() - tt;
|
||||
long average = elapsed / i;
|
||||
return (size - i) * average;
|
||||
}
|
||||
|
||||
private boolean processOid(String dest, boolean onlyNew, Map<String, String> errs, FHIRToolingClient fhirToolingClient, String oid)
|
||||
throws IOException, InterruptedException, FileNotFoundException {
|
||||
if (!onlyNew || !(new File(Utilities.path(dest, "ValueSet-" + oid + ".json")).exists())) {
|
||||
|
||||
long t = System.currentTimeMillis();
|
||||
ValueSet vs = null;
|
||||
try {
|
||||
vs = fhirToolingClient.read(ValueSet.class, oid);
|
||||
} catch (Exception e) {
|
||||
errs.put(oid, "Read: " +e.getMessage());
|
||||
System.out.println("Read "+oid+" failed: "+e.getMessage());
|
||||
System.out.println("Read "+oid+" failed @ "+Utilities.describeDuration(System.currentTimeMillis()-t)+"ms: "+e.getMessage());
|
||||
return false;
|
||||
}
|
||||
if (vs != null) {
|
||||
t = System.currentTimeMillis();
|
||||
try {
|
||||
ValueSet vse = fhirToolingClient.expandValueset(vs.getUrl(), null);
|
||||
vs.setExpansion(vse.getExpansion());
|
||||
} catch (Exception e) {
|
||||
errs.put(oid, "Expansion: " +e.getMessage());
|
||||
System.out.println("Expand "+oid+" failed @ "+Utilities.describeDuration(System.currentTimeMillis()-t)+"ms: "+e.getMessage());
|
||||
}
|
||||
while (isIncomplete(vs.getExpansion())) {
|
||||
Parameters p = new Parameters();
|
||||
int offset = vs.getExpansion().getParameter("offset").getValueIntegerType().getValue() + vs.getExpansion().getParameter("count").getValueIntegerType().getValue();
|
||||
p.addParameter("offset", offset);
|
||||
t = System.currentTimeMillis();
|
||||
try {
|
||||
ValueSet vse = fhirToolingClient.expandValueset(vs.getUrl(), null);
|
||||
vs.setExpansion(vse.getExpansion());
|
||||
j++;
|
||||
} catch (Exception e) {
|
||||
errs.put(oid, "Expansion: " +e.getMessage());
|
||||
System.out.println("Expand "+oid+" failed: "+e.getMessage());
|
||||
}
|
||||
while (isIncomplete(vs.getExpansion())) {
|
||||
Parameters p = new Parameters();
|
||||
int offset = vs.getExpansion().getParameter("offset").getValueIntegerType().getValue() + vs.getExpansion().getParameter("count").getValueIntegerType().getValue();
|
||||
p.addParameter("offset", offset);
|
||||
try {
|
||||
ValueSet vse = fhirToolingClient.expandValueset(vs.getUrl(), p);
|
||||
vs.getExpansion().getContains().addAll(vse.getExpansion().getContains());
|
||||
vs.getExpansion().setParameter(vse.getExpansion().getParameter());
|
||||
} catch (Exception e2) {
|
||||
errs.put(oid, "Expansion: " +e2.getMessage()+" @ "+offset);
|
||||
System.out.println("Expand "+oid+" @ "+offset+" failed: "+e2.getMessage());
|
||||
}
|
||||
}
|
||||
vs.getExpansion().setOffsetElement(null);
|
||||
vs.getExpansion().getParameter().clear();
|
||||
|
||||
|
||||
if (vs.hasTitle()) {
|
||||
if (vs.getTitle().equals(vs.getDescription())) {
|
||||
vs.setTitle(vs.getName());
|
||||
} else {
|
||||
// System.out.println(oid);
|
||||
// System.out.println(" name: "+vs.getName());
|
||||
// System.out.println(" title: "+vs.getTitle());
|
||||
// System.out.println(" desc: "+vs.getDescription());
|
||||
}
|
||||
} else {
|
||||
vs.setTitle(vs.getName());
|
||||
}
|
||||
vs.setName(makeValidName(vs.getName()));
|
||||
JurisdictionUtilities.setJurisdictionCountry(vs.getJurisdiction(), "US");
|
||||
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(dest, "ValueSet-" + oid + ".json")), vs);
|
||||
ValueSet vse = fhirToolingClient.expandValueset(vs.getUrl(), p);
|
||||
vs.getExpansion().getContains().addAll(vse.getExpansion().getContains());
|
||||
vs.getExpansion().setParameter(vse.getExpansion().getParameter());
|
||||
} catch (Exception e2) {
|
||||
errs.put(oid, "Expansion: " +e2.getMessage()+" @ "+offset);
|
||||
System.out.println("Expand "+oid+" @ "+offset+" failed @ "+Utilities.describeDuration(System.currentTimeMillis()-t)+"ms: "+e2.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return j;
|
||||
vs.getExpansion().setOffsetElement(null);
|
||||
vs.getExpansion().getParameter().clear();
|
||||
|
||||
|
||||
if (vs.hasTitle()) {
|
||||
if (vs.getTitle().equals(vs.getDescription())) {
|
||||
vs.setTitle(vs.getName());
|
||||
} else {
|
||||
// System.out.println(oid);
|
||||
// System.out.println(" name: "+vs.getName());
|
||||
// System.out.println(" title: "+vs.getTitle());
|
||||
// System.out.println(" desc: "+vs.getDescription());
|
||||
}
|
||||
} else {
|
||||
vs.setTitle(vs.getName());
|
||||
}
|
||||
vs.setName(makeValidName(vs.getName()));
|
||||
JurisdictionUtilities.setJurisdictionCountry(vs.getJurisdiction(), "US");
|
||||
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(dest, "ValueSet-" + oid + ".json")), vs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isIncomplete(ValueSetExpansionComponent expansion) {
|
||||
|
|
|
@ -37,13 +37,13 @@ import java.util.List;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hl7.fhir.dstu3.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.dstu3.context.IWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.formats.FormatUtilities;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.dstu3.model;
|
||||
package org.hl7.fhir.dstu3.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
|
@ -1,38 +1,6 @@
|
|||
package org.hl7.fhir.dstu3.utils;
|
||||
package org.hl7.fhir.dstu3.fhirpath;
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.SourceLocation;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.SourceLocation;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
|
@ -366,7 +334,7 @@ public class FHIRLexer {
|
|||
return b.toString();
|
||||
}
|
||||
|
||||
void skipComments() throws FHIRLexerException {
|
||||
public void skipComments() throws FHIRLexerException {
|
||||
while (!done() && hasComment())
|
||||
next();
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.dstu3.utils;
|
||||
package org.hl7.fhir.dstu3.fhirpath;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
|
@ -13,6 +13,16 @@ import java.util.Set;
|
|||
import org.fhir.ucum.Decimal;
|
||||
import org.fhir.ucum.UcumException;
|
||||
import org.hl7.fhir.dstu3.context.IWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.Function;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.SourceLocation;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.ExecutionContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.ExecutionTypeContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.dstu3.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.BooleanType;
|
||||
import org.hl7.fhir.dstu3.model.DateTimeType;
|
||||
|
@ -20,12 +30,6 @@ import org.hl7.fhir.dstu3.model.DateType;
|
|||
import org.hl7.fhir.dstu3.model.DecimalType;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.Function;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.SourceLocation;
|
||||
import org.hl7.fhir.dstu3.model.IntegerType;
|
||||
import org.hl7.fhir.dstu3.model.Property;
|
||||
import org.hl7.fhir.dstu3.model.Resource;
|
||||
|
@ -34,12 +38,6 @@ import org.hl7.fhir.dstu3.model.StructureDefinition;
|
|||
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.dstu3.model.TimeType;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.ExecutionContext;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.ExecutionTypeContext;
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
|
@ -1,11 +1,10 @@
|
|||
package org.hl7.fhir.dstu3.utils;
|
||||
package org.hl7.fhir.dstu3.fhirpath;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class FHIRPathUtilityClasses {
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.dstu3.model;
|
||||
package org.hl7.fhir.dstu3.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -38,8 +38,9 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import org.hl7.fhir.dstu3.context.IWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition;
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -8,7 +8,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.dstu3.context.IWorkerContext;
|
||||
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
All rights reserved.
|
||||
|
@ -44,7 +45,6 @@ import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
|
|||
import org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent;
|
||||
import org.hl7.fhir.dstu3.model.DomainResource;
|
||||
import org.hl7.fhir.dstu3.model.Element;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.IntegerType;
|
||||
import org.hl7.fhir.dstu3.model.Property;
|
||||
import org.hl7.fhir.dstu3.model.Reference;
|
||||
|
|
|
@ -50,6 +50,15 @@ import org.hl7.fhir.dstu3.context.IWorkerContext;
|
|||
import org.hl7.fhir.dstu3.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.dstu3.elementmodel.Element;
|
||||
import org.hl7.fhir.dstu3.elementmodel.Property;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.dstu3.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.dstu3.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.BooleanType;
|
||||
import org.hl7.fhir.dstu3.model.CodeType;
|
||||
|
@ -70,8 +79,6 @@ import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
|
|||
import org.hl7.fhir.dstu3.model.Enumeration;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.model.IdType;
|
||||
import org.hl7.fhir.dstu3.model.IntegerType;
|
||||
import org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus;
|
||||
|
@ -100,15 +107,10 @@ import org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent;
|
|||
import org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode;
|
||||
import org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform;
|
||||
import org.hl7.fhir.dstu3.model.Type;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.dstu3.model.UriType;
|
||||
import org.hl7.fhir.dstu3.model.ValueSet;
|
||||
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
|
|
|
@ -9,14 +9,14 @@ import java.util.stream.Stream;
|
|||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.hl7.fhir.dstu3.context.SimpleWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.dstu3.formats.XmlParser;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.BooleanType;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.PrimitiveType;
|
||||
import org.hl7.fhir.dstu3.model.Resource;
|
||||
import org.hl7.fhir.dstu3.test.support.TestingUtilities;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
|
|
|
@ -14,10 +14,14 @@ import org.apache.commons.codec.Charsets;
|
|||
import org.apache.commons.io.IOUtils;
|
||||
import org.hl7.fhir.dstu3.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.dstu3.context.SimpleWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.dstu3.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.dstu3.formats.XmlParser;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.dstu3.model.MetadataResource;
|
||||
import org.hl7.fhir.dstu3.model.Resource;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition;
|
||||
|
@ -26,12 +30,8 @@ import org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent;
|
|||
import org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent;
|
||||
import org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent;
|
||||
import org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent;
|
||||
import org.hl7.fhir.dstu3.model.TypeDetails;
|
||||
import org.hl7.fhir.dstu3.test.support.TestingUtilities;
|
||||
import org.hl7.fhir.dstu3.utils.CodingUtilities;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
|
|
|
@ -8,8 +8,9 @@ import static org.mockito.Mockito.times;
|
|||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.dstu3.context.IWorkerContext;
|
||||
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.ExpressionNode;
|
||||
import org.hl7.fhir.dstu3.model.StringType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
|
|
@ -36,13 +36,13 @@ import org.hl7.fhir.exceptions.DefinitionException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r4.utils.TypesUtilities;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4.model;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -32,6 +32,9 @@ package org.hl7.fhir.r4.model;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.Quantity;
|
||||
import org.hl7.fhir.r4.model.StringType;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,37 +1,6 @@
|
|||
package org.hl7.fhir.r4.utils;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
|
@ -501,7 +470,7 @@ public class FHIRLexer {
|
|||
return b.toString();
|
||||
}
|
||||
|
||||
void skipComments() throws FHIRLexerException {
|
||||
public void skipComments() throws FHIRLexerException {
|
||||
while (!done() && hasComment())
|
||||
next();
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4.utils;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4.utils;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
@ -26,6 +26,17 @@ import org.hl7.fhir.instance.model.api.IIdType;
|
|||
import org.hl7.fhir.r4.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.BaseDateTimeType;
|
||||
import org.hl7.fhir.r4.model.BooleanType;
|
||||
|
@ -37,11 +48,6 @@ import org.hl7.fhir.r4.model.DecimalType;
|
|||
import org.hl7.fhir.r4.model.Element;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4.model.IntegerType;
|
||||
import org.hl7.fhir.r4.model.Property;
|
||||
import org.hl7.fhir.r4.model.Property.PropertyMatcher;
|
||||
|
@ -52,15 +58,7 @@ import org.hl7.fhir.r4.model.StructureDefinition;
|
|||
import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r4.model.TimeType;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4.model.ValueSet;
|
||||
import org.hl7.fhir.r4.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MergedList;
|
||||
|
@ -4532,7 +4530,7 @@ public class FHIRPathEngine {
|
|||
return false;
|
||||
}
|
||||
for (String an : node.getAttributes().keySet()) {
|
||||
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an, "title", "style", "class", "id", "lang",
|
||||
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an, "title", "style", "class", "id", "idref", "lang",
|
||||
"xml:lang", "dir", "accesskey", "tabindex",
|
||||
// tables
|
||||
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan",
|
|
@ -1,23 +1,18 @@
|
|||
package org.hl7.fhir.r4.utils;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.Element;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition;
|
||||
import org.hl7.fhir.r4.model.IntegerType;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4.model.Property;
|
||||
import org.hl7.fhir.r4.model.Resource;
|
||||
import org.hl7.fhir.r4.model.StringType;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
|
||||
public class FHIRPathUtilityClasses {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4.model;
|
||||
package org.hl7.fhir.r4.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -38,8 +38,11 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.model.CanonicalType;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4.model.UriType;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class TypeDetails {
|
|
@ -31,7 +31,8 @@ package org.hl7.fhir.r4.model;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
|
||||
/**
|
||||
* This class is the base class for Profile classes - whether generated or
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.commons.lang3.NotImplementedException;
|
|||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.r4.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.CanonicalType;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition;
|
||||
|
@ -47,7 +48,6 @@ import org.hl7.fhir.r4.model.Resource;
|
|||
import org.hl7.fhir.r4.model.ResourceFactory;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.context.SimpleWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4.formats.JsonParser;
|
||||
import org.hl7.fhir.r4.formats.XmlParser;
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.model.BackboneElement;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
|
@ -47,7 +49,6 @@ import org.hl7.fhir.r4.model.Bundle.BundleLinkComponent;
|
|||
import org.hl7.fhir.r4.model.CanonicalType;
|
||||
import org.hl7.fhir.r4.model.DomainResource;
|
||||
import org.hl7.fhir.r4.model.Element;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4.model.IntegerType;
|
||||
import org.hl7.fhir.r4.model.Property;
|
||||
import org.hl7.fhir.r4.model.Reference;
|
||||
|
|
|
@ -38,15 +38,16 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4.model.Resource;
|
||||
import org.hl7.fhir.r4.model.Tuple;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.ValueSet;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class LiquidEngine implements IEvaluationContext {
|
||||
|
|
|
@ -54,6 +54,7 @@ import org.hl7.fhir.r4.conformance.ProfileUtilities;
|
|||
import org.hl7.fhir.r4.conformance.ProfileUtilities.ProfileKnowledgeProvider;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4.formats.XmlParser;
|
||||
|
@ -154,7 +155,6 @@ import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent;
|
|||
import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent;
|
||||
import org.hl7.fhir.r4.terminologies.CodeSystemUtilities;
|
||||
import org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.utils.LiquidEngine.LiquidDocument;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
|
|
|
@ -53,6 +53,15 @@ import org.hl7.fhir.r4.context.IWorkerContext;
|
|||
import org.hl7.fhir.r4.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4.elementmodel.Element;
|
||||
import org.hl7.fhir.r4.elementmodel.Property;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.BooleanType;
|
||||
import org.hl7.fhir.r4.model.CanonicalType;
|
||||
|
@ -75,8 +84,6 @@ import org.hl7.fhir.r4.model.Enumeration;
|
|||
import org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence;
|
||||
import org.hl7.fhir.r4.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.model.IdType;
|
||||
import org.hl7.fhir.r4.model.IntegerType;
|
||||
import org.hl7.fhir.r4.model.Narrative;
|
||||
|
@ -106,15 +113,10 @@ import org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent;
|
|||
import org.hl7.fhir.r4.model.StructureMap.StructureMapTargetListMode;
|
||||
import org.hl7.fhir.r4.model.StructureMap.StructureMapTransform;
|
||||
import org.hl7.fhir.r4.model.Type;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4.model.UriType;
|
||||
import org.hl7.fhir.r4.model.ValueSet;
|
||||
import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
|
|
|
@ -18,23 +18,23 @@ import org.apache.commons.lang3.NotImplementedException;
|
|||
import org.fhir.ucum.UcumException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.formats.JsonParser;
|
||||
import org.hl7.fhir.r4.formats.XmlParser;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.BooleanType;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4.model.IdType;
|
||||
import org.hl7.fhir.r4.model.Patient;
|
||||
import org.hl7.fhir.r4.model.PrimitiveType;
|
||||
import org.hl7.fhir.r4.model.Quantity;
|
||||
import org.hl7.fhir.r4.model.Resource;
|
||||
import org.hl7.fhir.r4.model.StringType;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.ValueSet;
|
||||
import org.hl7.fhir.r4.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
|
|
@ -18,22 +18,22 @@ import org.hl7.fhir.exceptions.FHIRFormatError;
|
|||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4.conformance.ProfileUtilities.ProfileKnowledgeProvider;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4.formats.JsonParser;
|
||||
import org.hl7.fhir.r4.formats.XmlParser;
|
||||
import org.hl7.fhir.r4.model.Base;
|
||||
import org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r4.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4.model.Resource;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r4.model.TypeDetails;
|
||||
import org.hl7.fhir.r4.model.ValueSet;
|
||||
import org.hl7.fhir.r4.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4.utils.NarrativeGenerator;
|
||||
import org.hl7.fhir.r4.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.comparison.CodeSystemComparer.CodeSystemComparison;
|
||||
import org.hl7.fhir.r4b.comparison.ProfileComparer.ProfileComparison;
|
||||
import org.hl7.fhir.r4b.comparison.ResourceComparer.PlaceHolderComparison;
|
||||
|
@ -23,16 +22,16 @@ import org.hl7.fhir.r4b.comparison.ValueSetComparer.ValueSetComparison;
|
|||
|
||||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.StringType;
|
||||
import org.hl7.fhir.r4b.model.Tuple;
|
||||
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.model.ValueSet;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.utils.LiquidEngine;
|
||||
import org.hl7.fhir.r4b.utils.LiquidEngine.LiquidDocument;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
|
|
|
@ -55,6 +55,11 @@ import org.hl7.fhir.r4b.context.IWorkerContext;
|
|||
import org.hl7.fhir.r4b.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4b.elementmodel.ObjectConverter;
|
||||
import org.hl7.fhir.r4b.elementmodel.Property;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4b.formats.IParser;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.BooleanType;
|
||||
|
@ -81,9 +86,6 @@ import org.hl7.fhir.r4b.model.Enumeration;
|
|||
import org.hl7.fhir.r4b.model.Enumerations.BindingStrength;
|
||||
import org.hl7.fhir.r4b.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r4b.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4b.model.Extension;
|
||||
import org.hl7.fhir.r4b.model.IdType;
|
||||
import org.hl7.fhir.r4b.model.IntegerType;
|
||||
|
@ -107,8 +109,6 @@ import org.hl7.fhir.r4b.renderers.TerminologyRenderer;
|
|||
import org.hl7.fhir.r4b.renderers.spreadsheets.SpreadsheetGenerator;
|
||||
import org.hl7.fhir.r4b.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r4b.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4b.utils.FHIRLexer;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.utils.PublicationHacker;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r4b.utils.TranslatingUtilities;
|
||||
|
|
|
@ -47,12 +47,12 @@ import org.hl7.fhir.exceptions.FHIRFormatError;
|
|||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.elementmodel.Element.SpecialElement;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4b.formats.JsonCreator;
|
||||
import org.hl7.fhir.r4b.formats.JsonCreatorCanonical;
|
||||
import org.hl7.fhir.r4b.formats.JsonCreatorGson;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.utilities.StringPair;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
|
|
|
@ -36,13 +36,13 @@ import org.hl7.fhir.exceptions.DefinitionException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.PropertyRepresentation;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r4b.utils.TypesUtilities;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4b.model;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -32,6 +32,9 @@ package org.hl7.fhir.r4b.model;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.Quantity;
|
||||
import org.hl7.fhir.r4b.model.StringType;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,42 +1,9 @@
|
|||
package org.hl7.fhir.r4b.utils;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.apache.poi.xssf.model.Comments;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4b.utils;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
@ -26,6 +26,16 @@ import org.hl7.fhir.instance.model.api.IIdType;
|
|||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.BaseDateTimeType;
|
||||
import org.hl7.fhir.r4b.model.BooleanType;
|
||||
|
@ -37,14 +47,9 @@ import org.hl7.fhir.r4b.model.DecimalType;
|
|||
import org.hl7.fhir.r4b.model.Element;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r4b.model.Property.PropertyMatcher;
|
||||
import org.hl7.fhir.r4b.model.IntegerType;
|
||||
import org.hl7.fhir.r4b.model.Property;
|
||||
import org.hl7.fhir.r4b.model.Property.PropertyMatcher;
|
||||
import org.hl7.fhir.r4b.model.Quantity;
|
||||
import org.hl7.fhir.r4b.model.Resource;
|
||||
import org.hl7.fhir.r4b.model.StringType;
|
||||
|
@ -53,14 +58,7 @@ import org.hl7.fhir.r4b.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r4b.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r4b.model.TimeType;
|
||||
import org.hl7.fhir.r4b.model.TypeConvertor;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4b.model.ValueSet;
|
||||
import org.hl7.fhir.r4b.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MergedList;
|
||||
|
@ -4534,7 +4532,7 @@ public class FHIRPathEngine {
|
|||
return false;
|
||||
}
|
||||
for (String an : node.getAttributes().keySet()) {
|
||||
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an, "title", "style", "class", "id", "lang",
|
||||
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an, "title", "style", "class", "id", "idref", "lang",
|
||||
"xml:lang", "dir", "accesskey", "tabindex",
|
||||
// tables
|
||||
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan",
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4b.utils;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4b.model;
|
||||
package org.hl7.fhir.r4b.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -38,8 +38,11 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.CanonicalType;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4b.model.UriType;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class TypeDetails {
|
|
@ -31,7 +31,8 @@ package org.hl7.fhir.r4b.model;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
|
||||
/**
|
||||
* This class is the base class for Profile classes - whether generated or
|
||||
|
|
|
@ -15,12 +15,12 @@ import org.hl7.fhir.exceptions.FHIRFormatError;
|
|||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.conformance.ProfileUtilities.ProfileKnowledgeProvider;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.DomainResource;
|
||||
import org.hl7.fhir.r4b.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r4b.renderers.utils.Resolver.IReferenceResolver;
|
||||
import org.hl7.fhir.r4b.renderers.utils.Resolver.ResourceContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor.Dialect;
|
||||
|
|
|
@ -10,10 +10,11 @@ import java.util.Map;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.Bundle;
|
||||
import org.hl7.fhir.r4b.model.Expression;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.model.Bundle.BundleEntryComponent;
|
||||
import org.hl7.fhir.r4b.model.GraphDefinition;
|
||||
import org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent;
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.model.BackboneElement;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.Bundle;
|
||||
|
@ -47,7 +49,6 @@ import org.hl7.fhir.r4b.model.Bundle.BundleLinkComponent;
|
|||
import org.hl7.fhir.r4b.model.CanonicalType;
|
||||
import org.hl7.fhir.r4b.model.DomainResource;
|
||||
import org.hl7.fhir.r4b.model.Element;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.model.IntegerType;
|
||||
import org.hl7.fhir.r4b.model.Property;
|
||||
import org.hl7.fhir.r4b.model.Reference;
|
||||
|
|
|
@ -41,15 +41,17 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.model.Resource;
|
||||
import org.hl7.fhir.r4b.model.Tuple;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.model.ValueSet;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
|
|
|
@ -4,12 +4,12 @@ import org.apache.commons.lang3.NotImplementedException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4b.elementmodel.Element;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.Resource;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.model.ValueSet;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.hl7.fhir.r4b.utils.structuremap;
|
||||
|
||||
import org.hl7.fhir.r4b.elementmodel.Property;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
|
||||
public class PropertyWithType {
|
||||
private String path;
|
||||
|
|
|
@ -44,6 +44,15 @@ import org.hl7.fhir.r4b.context.IWorkerContext;
|
|||
import org.hl7.fhir.r4b.context.IWorkerContext.ValidationResult;
|
||||
import org.hl7.fhir.r4b.elementmodel.Element;
|
||||
import org.hl7.fhir.r4b.elementmodel.Property;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4b.model.*;
|
||||
import org.hl7.fhir.r4b.model.ConceptMap.ConceptMapEquivalence;
|
||||
import org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent;
|
||||
|
@ -55,20 +64,13 @@ import org.hl7.fhir.r4b.model.Enumeration;
|
|||
import org.hl7.fhir.r4b.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r4b.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r4b.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.Narrative.NarrativeStatus;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition.StructureDefinitionMappingComponent;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r4b.model.StructureMap.*;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r4b.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r4b.renderers.TerminologyRenderer;
|
||||
import org.hl7.fhir.r4b.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4b.utils.FHIRLexer;
|
||||
import org.hl7.fhir.r4b.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r4b.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.hl7.fhir.r4b.utils.structuremap;
|
||||
|
||||
import org.hl7.fhir.r4b.elementmodel.Property;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -11,14 +11,16 @@ import org.apache.commons.lang3.NotImplementedException;
|
|||
import org.fhir.ucum.UcumException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.formats.JsonParser;
|
||||
import org.hl7.fhir.r4b.formats.XmlParser;
|
||||
import org.hl7.fhir.r4b.model.*;
|
||||
import org.hl7.fhir.r4b.test.FHIRPathTests.TestResultType;
|
||||
import org.hl7.fhir.r4b.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
|
|
@ -20,13 +20,17 @@ import org.hl7.fhir.exceptions.PathEngineException;
|
|||
import org.hl7.fhir.r4b.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r4b.conformance.ProfileUtilities.ProfileKnowledgeProvider;
|
||||
import org.hl7.fhir.r4b.context.IWorkerContext.IContextResourceLoader;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r4b.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4b.formats.JsonParser;
|
||||
import org.hl7.fhir.r4b.formats.XmlParser;
|
||||
import org.hl7.fhir.r4b.model.Base;
|
||||
import org.hl7.fhir.r4b.model.Bundle;
|
||||
import org.hl7.fhir.r4b.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r4b.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r4b.model.Resource;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition.StructureDefinitionKind;
|
||||
|
@ -34,12 +38,8 @@ import org.hl7.fhir.r4b.model.StructureDefinition.TypeDerivationRule;
|
|||
import org.hl7.fhir.r4b.renderers.RendererFactory;
|
||||
import org.hl7.fhir.r4b.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r4b.renderers.utils.RenderingContext.ResourceRendererMode;
|
||||
import org.hl7.fhir.r4b.model.TypeDetails;
|
||||
import org.hl7.fhir.r4b.model.ValueSet;
|
||||
import org.hl7.fhir.r4b.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r4b.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.r4b.utils.XVerExtensionManager;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
|
@ -7,10 +7,10 @@ import org.hl7.fhir.r4b.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r4b.elementmodel.Element;
|
||||
import org.hl7.fhir.r4b.elementmodel.Manager;
|
||||
import org.hl7.fhir.r4b.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r4b.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.r4b.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
import org.hl7.fhir.utilities.npm.ToolsVersion;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
|
|
@ -6,6 +6,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.hl7.fhir.r4b.fhirpath.FHIRLexer;
|
||||
|
||||
class FHIRLexerTest {
|
||||
@Test
|
||||
@DisplayName("Test that a 'null' current value returns 'false' when FHIRLexer.isConstant() is called, and not NPE.")
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.comparison.CapabilityStatementComparer.CapabilityStatementComparison;
|
||||
import org.hl7.fhir.r5.comparison.CodeSystemComparer.CodeSystemComparison;
|
||||
import org.hl7.fhir.r5.comparison.ResourceComparer.PlaceHolderComparison;
|
||||
|
@ -23,15 +22,16 @@ import org.hl7.fhir.r5.comparison.StructureDefinitionComparer.ProfileComparison;
|
|||
import org.hl7.fhir.r5.comparison.ValueSetComparer.ValueSetComparison;
|
||||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.model.Tuple;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.utils.LiquidEngine;
|
||||
import org.hl7.fhir.r5.utils.LiquidEngine.LiquidDocument;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
|
|
|
@ -40,9 +40,10 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
|
|||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.stringtemplate.v4.ST;
|
||||
|
||||
public class ShExGenerator {
|
||||
|
|
|
@ -53,6 +53,10 @@ import org.hl7.fhir.r5.conformance.profile.ProfileUtilities.ElementDefinitionCou
|
|||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.ObjectConverter;
|
||||
import org.hl7.fhir.r5.elementmodel.Property;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
import org.hl7.fhir.r5.model.CanonicalType;
|
||||
|
@ -74,9 +78,6 @@ import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
|||
import org.hl7.fhir.r5.model.Enumerations.BindingStrength;
|
||||
import org.hl7.fhir.r5.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.model.Extension;
|
||||
import org.hl7.fhir.r5.model.IdType;
|
||||
import org.hl7.fhir.r5.model.MarkdownType;
|
||||
|
@ -97,7 +98,6 @@ import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent;
|
|||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.utils.TranslatingUtilities;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
|
|
|
@ -14,17 +14,17 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.Element.SpecialElement;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode;
|
||||
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
|
||||
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapTransform;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.structuremap.StructureMapUtilities;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
|
|
|
@ -54,6 +54,7 @@ import org.hl7.fhir.r5.context.ContextUtilities;
|
|||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.Element.SpecialElement;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.formats.JsonCreator;
|
||||
import org.hl7.fhir.r5.formats.JsonCreatorCanonical;
|
||||
|
@ -61,7 +62,6 @@ import org.hl7.fhir.r5.formats.JsonCreatorDirect;
|
|||
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.StringPair;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities.SourcedChildDefinitions;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.PropertyRepresentation;
|
||||
|
@ -46,7 +47,6 @@ import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
|||
import org.hl7.fhir.r5.model.Extension;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.utils.TypesUtilities;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r5.model;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -34,6 +34,9 @@ package org.hl7.fhir.r5.model;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Quantity;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,42 +1,9 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r4b.utils;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
@ -16,7 +16,6 @@ import java.util.Set;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.fhir.ucum.Decimal;
|
||||
import org.fhir.ucum.Pair;
|
||||
import org.fhir.ucum.UcumException;
|
||||
|
@ -28,6 +27,16 @@ import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities.SourcedChildDefinitions;
|
||||
import org.hl7.fhir.r5.context.ContextUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.BaseDateTimeType;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
|
@ -41,11 +50,6 @@ import org.hl7.fhir.r5.model.DecimalType;
|
|||
import org.hl7.fhir.r5.model.Element;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Function;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.model.Identifier;
|
||||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
import org.hl7.fhir.r5.model.Property;
|
||||
|
@ -58,16 +62,8 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r5.model.TimeType;
|
||||
import org.hl7.fhir.r5.model.TypeConvertor;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FHIRConstant;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.ClassTypeInfo;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor;
|
||||
|
@ -81,7 +77,6 @@ import org.hl7.fhir.utilities.validation.ValidationOptions;
|
|||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||
|
||||
import ca.uhn.fhir.fhirpath.FhirPathExecutionException;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
|
||||
|
@ -4540,7 +4535,7 @@ public class FHIRPathEngine {
|
|||
}
|
||||
for (String an : node.getAttributes().keySet()) {
|
||||
boolean ok = an.startsWith("xmlns") || Utilities.existsInList(an,
|
||||
"title", "style", "class", "id", "lang", "xml:lang", "dir", "accesskey", "tabindex",
|
||||
"title", "style", "class", "id", "idref", "lang", "xml:lang", "dir", "accesskey", "tabindex",
|
||||
// tables
|
||||
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan", "colspan") ||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.hl7.fhir.r5.model;
|
||||
package org.hl7.fhir.r5.fhirpath;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -42,10 +42,12 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.CanonicalType;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r5.model.TypeDetails.ProfiledTypeSorter;
|
||||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
@ -32,7 +32,8 @@ package org.hl7.fhir.r5.model;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
|
||||
/**
|
||||
* This class is the base class for Profile classes - whether generated or manual
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.hl7.fhir.exceptions.DefinitionException;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.ContextUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.CanonicalType;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
|
@ -48,7 +49,6 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
import org.hl7.fhir.r5.model.ResourceFactory;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
|
|
|
@ -1580,32 +1580,63 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
|
||||
public void renderTriggerDefinition(XhtmlNode x, TriggerDefinition td) throws FHIRFormatError, DefinitionException, IOException {
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
if (x.isPara()) {
|
||||
x.b().tx("Type");
|
||||
x.tx(": ");
|
||||
x.tx(td.getType().getDisplay());
|
||||
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Type");
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
if (td.hasName()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Name");
|
||||
x.tx(": ");
|
||||
x.tx(td.getType().getDisplay());
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Code");
|
||||
x.tx(": ");
|
||||
renderCodeableConcept(x, td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Timing");
|
||||
x.tx(": ");
|
||||
render(x, td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Condition");
|
||||
x.tx(": ");
|
||||
renderExpression(x, td.getCondition());
|
||||
}
|
||||
} else {
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
|
||||
if (td.hasName()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Name");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Type");
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
|
||||
if (td.hasName()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Name");
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Code");
|
||||
renderCodeableConcept(tr.td(), td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Timing");
|
||||
render(tr.td(), td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Condition");
|
||||
renderExpression(tr.td(), td.getCondition());
|
||||
}
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Code");
|
||||
renderCodeableConcept(tr.td(), td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Timing");
|
||||
render(tr.td(), td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Condition");
|
||||
renderExpression(tr.td(), td.getCondition());
|
||||
}
|
||||
}
|
||||
|
||||
public void renderDataRequirement(XhtmlNode x, DataRequirement dr) throws FHIRFormatError, DefinitionException, IOException {
|
||||
|
|
|
@ -15,10 +15,10 @@ import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.renderers.utils.Resolver.IReferenceResolver;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor.Dialect;
|
||||
|
|
|
@ -260,7 +260,7 @@ public class ValueSetValidator extends ValueSetProcessBase {
|
|||
info.getIssues().addAll(makeIssue(IssueSeverity.WARNING, unknownSystems.isEmpty() ? IssueType.CODEINVALID : IssueType.NOTFOUND, path, msg));
|
||||
} else if (!result) {
|
||||
msg = context.formatMessagePlural(code.getCoding().size(), I18nConstants.NONE_OF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_, valueset.getVersionedUrl(), b.toString());
|
||||
info.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path, msg));
|
||||
info.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, code.getCoding().size() == 1 ? path+".coding[0].code" : path, msg));
|
||||
}
|
||||
}
|
||||
if (vcc.hasCoding() && code.hasText()) {
|
||||
|
@ -520,7 +520,7 @@ public class ValueSetValidator extends ValueSetProcessBase {
|
|||
// {
|
||||
String msg = context.formatMessagePlural(1, I18nConstants.NONE_OF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_, valueset.getVersionedUrl(), "'"+code.toString()+"'");
|
||||
res.addToMessage(msg).setSeverity(IssueSeverity.ERROR);
|
||||
res.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path, msg));
|
||||
res.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path+".code", msg));
|
||||
res.setDefinition(null);
|
||||
res.setSystem(null);
|
||||
res.setDisplay(null);
|
||||
|
@ -542,7 +542,7 @@ public class ValueSetValidator extends ValueSetProcessBase {
|
|||
} else if ((res != null && !res.isOk())) {
|
||||
String msg = context.formatMessagePlural(1, I18nConstants.NONE_OF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_, valueset.getVersionedUrl(), "'"+code.toString()+"'");
|
||||
res.setMessage(res.getMessage()+"; "+msg);
|
||||
res.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path, msg));
|
||||
res.getIssues().addAll(makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path+".code", msg));
|
||||
}
|
||||
}
|
||||
if (res != null && res.getSeverity() == IssueSeverity.INFORMATION) {
|
||||
|
|
|
@ -9,10 +9,11 @@ import java.util.Map;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Bundle;
|
||||
import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.GraphDefinition;
|
||||
import org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
|
|
|
@ -41,6 +41,8 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.BackboneElement;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Bundle;
|
||||
|
@ -50,7 +52,6 @@ import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
|
|||
import org.hl7.fhir.r5.model.CanonicalType;
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.Element;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.IdType;
|
||||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
import org.hl7.fhir.r5.model.Property;
|
||||
|
|
|
@ -39,14 +39,16 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.Tuple;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.ExpressionNodeWithOffset;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
|
|
|
@ -8,21 +8,21 @@ import org.apache.commons.net.util.Base64;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Base64BinaryType;
|
||||
import org.hl7.fhir.r5.model.BaseDateTimeType;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
import org.hl7.fhir.r5.model.DecimalType;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
import org.hl7.fhir.r5.model.Property;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.json.model.JsonObject;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ import java.util.Set;
|
|||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.json.model.JsonArray;
|
||||
import org.hl7.fhir.utilities.json.model.JsonBoolean;
|
||||
|
|
|
@ -4,12 +4,12 @@ import org.apache.commons.lang3.NotImplementedException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.hl7.fhir.r5.utils.structuremap;
|
||||
|
||||
import org.hl7.fhir.r5.elementmodel.Property;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
|
||||
public class PropertyWithType {
|
||||
private String path;
|
||||
|
|
|
@ -43,6 +43,13 @@ import org.hl7.fhir.r5.context.IWorkerContext;
|
|||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Property;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
|
||||
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode;
|
||||
|
@ -54,19 +61,14 @@ import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
|||
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
|
||||
import org.hl7.fhir.r5.model.Enumerations.FHIRVersion;
|
||||
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.Narrative.NarrativeStatus;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r5.model.StructureMap.*;
|
||||
import org.hl7.fhir.r5.model.TypeDetails.ProfiledType;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r5.renderers.TerminologyRenderer;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.hl7.fhir.r5.utils.structuremap;
|
||||
|
||||
import org.hl7.fhir.r5.elementmodel.Property;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -10,10 +10,10 @@ import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.FilesystemPackageCacheMode;
|
||||
|
|
|
@ -13,14 +13,16 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.exceptions.PathEngineException;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.elementmodel.ValidatedFragment;
|
||||
import org.hl7.fhir.r5.formats.JsonParser;
|
||||
import org.hl7.fhir.r5.formats.XmlParser;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
import org.hl7.fhir.utilities.npm.NpmPackage;
|
||||
|
|
|
@ -20,27 +20,27 @@ import org.hl7.fhir.r5.conformance.profile.BindingResolution;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider;
|
||||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities.AllowUnknownProfile;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.test.utils.TestPackageLoader;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.formats.JsonParser;
|
||||
import org.hl7.fhir.r5.formats.XmlParser;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.renderers.RendererFactory;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.ResourceRendererMode;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
|
|
@ -8,12 +8,12 @@ import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Coding;
|
||||
import org.hl7.fhir.r5.model.StructureMap;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.structuremap.ITransformerServices;
|
||||
import org.hl7.fhir.r5.utils.structuremap.StructureMapUtilities;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
|
|
|
@ -8,10 +8,10 @@ import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
import org.hl7.fhir.utilities.npm.ToolsVersion;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.FilesystemPackageCacheMode;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -1447,12 +1447,14 @@ public class Utilities {
|
|||
long secs = ms / (1000) % 60;
|
||||
ms = ms % 1000;
|
||||
if (days > 0) {
|
||||
return ""+days+"d "+hours+":"+mins+":"+secs+"."+ms;
|
||||
return ""+days+"d "+pad(hours,2)+":"+pad(mins,2)+":"+pad(secs,2)+"."+ms;
|
||||
} else {
|
||||
return ""+hours+":"+mins+":"+secs+"."+ms;
|
||||
return ""+pad(hours, 2)+":"+pad(mins,2)+":"+pad(secs,2)+"."+ms;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String pad(long v, int i) {
|
||||
return padLeft(Long.toString(v), '0', i);
|
||||
}
|
||||
|
||||
public static boolean startsWithInList(String s, String... list) {
|
||||
|
|
|
@ -1030,6 +1030,10 @@ public class I18nConstants {
|
|||
public static final String FHIRPATH_COLLECTION_STATUS_PARAMETER = "FHIRPATH_COLLECTION_STATUS_PARAMETER";
|
||||
public static final String FHIRPATH_COLLECTION_STATUS_CONTEXT = "FHIRPATH_COLLECTION_STATUS_CONTEXT";
|
||||
public static final String SEARCHPARAMETER_MISSING_COMPONENTS = "SEARCHPARAMETER_MISSING_COMPONENTS";
|
||||
public static final String BUNDLE_BUNDLE_ENTRY_NOTFOUND_FRAGMENT = "BUNDLE_BUNDLE_ENTRY_NOTFOUND_FRAGMENT";
|
||||
public static final String BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE_FRAGMENT = "BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE_FRAGMENT";
|
||||
public static final String XHTML_IDREF_NOT_FOUND = "XHTML_IDREF_NOT_FOUND";
|
||||
public static final String XHTML_IDREF_NOT_MULTIPLE_MATCHES = "XHTML_IDREF_NOT_MULTIPLE_MATCHES";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -691,7 +691,7 @@ FHIRPATH_CONTINUOUS_ONLY= Error evaluating FHIRPath expression: The function {0}
|
|||
FHIRPATH_FOCUS_one =
|
||||
FHIRPATH_FOCUS_other = Error evaluating FHIRPath expression: focus for {0} can only have one value, but has {0} values
|
||||
REFERENCE_REF_SUSPICIOUS = The syntax of the reference ''{0}'' looks incorrect, and it should be checked
|
||||
XHTML_XHTML_ELEMENT_ILLEGAL_IN_PARA = Invalid element name inside in a paragraph in the XHTML (''{0}'')
|
||||
XHTML_XHTML_ELEMENT_ILLEGAL_IN_PARA = Invalid element name inside a paragraph in the XHTML (''{0}'')
|
||||
UNSUPPORTED_IDENTIFIER_PATTERN_PROPERTY_NOT_SUPPORTED_FOR_DISCRIMINATOR_FOR_SLICE = Unsupported property {3} on type {2} for pattern for discriminator ({0}) for slice {1}
|
||||
UNSUPPORTED_IDENTIFIER_PATTERN_NO_PROPERTY_NOT_SUPPORTED_FOR_DISCRIMINATOR_FOR_SLICE = Unsupported: no properties with values found on type {2} for pattern for discriminator ({0}) for slice {1}
|
||||
SD_NESTED_MUST_SUPPORT_DIFF = The element {0} has types/profiles/targets that are marked as must support, but the element itself is not marked as must-support. The inner must-supports will be ignored unless the element inherits must-support = true
|
||||
|
@ -1088,3 +1088,8 @@ BUNDLE_ENTRY_URL_MATCHES_TYPE_ID = The fullUrl ''{0}'' looks like a RESTful serv
|
|||
BUNDLE_ENTRY_URL_ABSOLUTE = The fullUrl must be an absolute URL (not ''{0}'')
|
||||
FHIRPATH_COLLECTION_STATUS_PARAMETER = Parameter {1} is inherently a collection, and so the expression ''{0}'' may fail, create an error, or return false if there is more than one item in the parameter value ({2})
|
||||
FHIRPATH_COLLECTION_STATUS_CONTEXT = The context is inherently a collection, and so the expression ''{0}'' may fail, create an error, or return false if there is more than one item in the context ({2})
|
||||
BUNDLE_BUNDLE_ENTRY_NOTFOUND_FRAGMENT = Can''t find ''{0}'' in the bundle ({1})
|
||||
BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE_FRAGMENT = Found {0} matches for fragment {2} in resource ''{1}'' in the bundle ({3})
|
||||
XHTML_IDREF_NOT_FOUND = The target of the HTML idref attribute ''{0}'' was not found in the resource
|
||||
XHTML_IDREF_NOT_MULTIPLE_MATCHES = Multiple matching targets for the HTML idref attribute ''{0}'' were found in the resource
|
||||
|
|
@ -78,6 +78,7 @@ import org.hl7.fhir.utilities.validation.ValidationMessage;
|
|||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||
import org.hl7.fhir.validation.cli.utils.ValidationLevel;
|
||||
import org.hl7.fhir.validation.instance.utils.IndexedElement;
|
||||
import org.hl7.fhir.validation.instance.utils.NodeStack;
|
||||
|
@ -1027,10 +1028,7 @@ public class BaseValidator implements IValidationContextResourceLoader {
|
|||
return null;
|
||||
}
|
||||
|
||||
protected Element resolveInBundle(Element bundle, List<Element> entries, String ref, String fullUrl, String type, String id, NodeStack stack, List<ValidationMessage> errors, String name, Element source, boolean isWarning) {
|
||||
if ("MedicationStatement/d41ac499-c7e8-45fa-9246-69028bae178f".equals(ref)) {
|
||||
System.out.println("!");
|
||||
}
|
||||
protected Element resolveInBundle(Element bundle, List<Element> entries, String ref, String fullUrl, String type, String id, NodeStack stack, List<ValidationMessage> errors, String name, Element source, boolean isWarning, boolean isNLLink) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, List<Element>> map = (Map<String, List<Element>>) bundle.getUserData("validator.entrymap");
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -1068,6 +1066,12 @@ public class BaseValidator implements IValidationContextResourceLoader {
|
|||
}
|
||||
}
|
||||
|
||||
String fragment = null;
|
||||
if (ref != null && ref.contains("#")) {
|
||||
fragment = ref.substring(ref.indexOf("#")+1);
|
||||
ref = ref.substring(0, ref.indexOf("#"));
|
||||
}
|
||||
|
||||
if (Utilities.isAbsoluteUrl(ref)) {
|
||||
// if the reference is absolute, then you resolve by fullUrl. No other thinking is required.
|
||||
List<Element> el = map.get(ref);
|
||||
|
@ -1085,6 +1089,16 @@ public class BaseValidator implements IValidationContextResourceLoader {
|
|||
}
|
||||
return null;
|
||||
} else if (el.size() == 1) {
|
||||
if (fragment != null) {
|
||||
int i = countFragmentMatches(el.get(0), fragment);
|
||||
if (i == 0) {
|
||||
source.setUserData("bundle.error.noted", true);
|
||||
hintOrError(isNLLink, errors, NO_RULE_DATE, IssueType.NOTFOUND, stack, false, I18nConstants.BUNDLE_BUNDLE_ENTRY_NOTFOUND_FRAGMENT, ref, fragment, name);
|
||||
} else if (i > 1) {
|
||||
source.setUserData("bundle.error.noted", true);
|
||||
rule(errors, "2023-11-15", IssueType.INVALID, stack, false, I18nConstants.BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE_FRAGMENT, i, ref, fragment, name);
|
||||
}
|
||||
}
|
||||
return el.get(0);
|
||||
} else {
|
||||
if (stack != null && !source.hasUserData("bundle.error.noted")) {
|
||||
|
@ -1148,6 +1162,35 @@ public class BaseValidator implements IValidationContextResourceLoader {
|
|||
}
|
||||
|
||||
|
||||
protected int countFragmentMatches(Element element, String fragment) {
|
||||
int count = 0;
|
||||
if (fragment.equals(element.getIdBase())) {
|
||||
count++;
|
||||
}
|
||||
if (element.getXhtml() != null) {
|
||||
count = count + countFragmentMatches(element.getXhtml(), fragment);
|
||||
}
|
||||
if (element.hasChildren()) {
|
||||
for (Element child : element.getChildren()) {
|
||||
count = count + countFragmentMatches(child, fragment);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private int countFragmentMatches(XhtmlNode node, String fragment) {
|
||||
int count = 0;
|
||||
if (fragment.equals(node.getAttribute("id"))) {
|
||||
count++;
|
||||
}
|
||||
if (node.hasChildren()) {
|
||||
for (XhtmlNode child : node.getChildNodes()) {
|
||||
count = count + countFragmentMatches(child, fragment);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private String extractResourceType(String ref) {
|
||||
String[] p = ref.split("\\/");
|
||||
return p[p.length -2];
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.r5.context.ContextUtilities;
|
||||
import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.ImplementationGuide;
|
||||
import org.hl7.fhir.r5.model.OperationOutcome;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
|
@ -30,7 +31,6 @@ import org.hl7.fhir.r5.renderers.RendererFactory;
|
|||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.utils.EOperationOutcome;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.SimpleHTTPClient;
|
||||
import org.hl7.fhir.utilities.SimpleHTTPClient.HTTPResult;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
|
|
|
@ -35,6 +35,8 @@ import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r5.context.SystemOutLoggingService;
|
||||
import org.hl7.fhir.r5.elementmodel.*;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.formats.JsonParser;
|
||||
|
@ -46,7 +48,6 @@ import org.hl7.fhir.r5.model.CanonicalResource;
|
|||
import org.hl7.fhir.r5.model.Coding;
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ImplementationGuide;
|
||||
import org.hl7.fhir.r5.model.OperationOutcome;
|
||||
import org.hl7.fhir.r5.model.PackageInformation;
|
||||
|
@ -60,7 +61,6 @@ import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
|||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.ResourceRendererMode;
|
||||
import org.hl7.fhir.r5.utils.EOperationOutcome;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.utils.structuremap.StructureMapUtilities;
|
||||
import org.hl7.fhir.r5.utils.validation.BundleValidationRule;
|
||||
|
|
|
@ -388,12 +388,12 @@ public class ValidatorCli {
|
|||
if (cliContext.getSv() == null) {
|
||||
cliContext.setSv(myValidationService.determineVersion(cliContext));
|
||||
}
|
||||
ValidationEngine validationEngine = getValidationEngine(tt, cliContext);
|
||||
tts.end();
|
||||
((ValidationEngineTask) cliTask).executeTask(myValidationService, validationEngine, cliContext, params, tt, tts);
|
||||
} else if (cliTask instanceof StandaloneTask) {
|
||||
((StandaloneTask) cliTask).executeTask(cliContext,params,tt,tts);
|
||||
}
|
||||
ValidationEngine validationEngine = getValidationEngine(tt, cliContext);
|
||||
tts.end();
|
||||
((ValidationEngineTask) cliTask).executeTask(myValidationService, validationEngine, cliContext, params, tt, tts);
|
||||
} else if (cliTask instanceof StandaloneTask) {
|
||||
((StandaloneTask) cliTask).executeTask(cliContext,params,tt,tts);
|
||||
}
|
||||
|
||||
System.out.println("Done. " + tt.report()+". Max Memory = "+Utilities.describeSize(Runtime.getRuntime().maxMemory()));
|
||||
SystemExitManager.finish();
|
||||
|
|
|
@ -23,12 +23,12 @@ import org.hl7.fhir.convertors.loaders.loaderR5.R5ToR5Loader;
|
|||
import org.hl7.fhir.convertors.loaders.loaderR5.R6ToR5Loader;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.context.SimpleWorkerContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.OperationOutcome;
|
||||
import org.hl7.fhir.r5.renderers.RendererFactory;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.utils.EOperationOutcome;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.OperationOutcomeUtilities;
|
||||
import org.hl7.fhir.utilities.ByteProvider;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
@ -163,6 +163,7 @@ public class ValidatorUtils {
|
|||
if (Common.isNetworkPath(name)) {
|
||||
SourceFile src = addSourceFile(refs, name);
|
||||
src.date = Long.MAX_VALUE;
|
||||
src.process = true;
|
||||
} else if (Common.isWildcardPath(name)) {
|
||||
AsteriskFilter filter = new AsteriskFilter(name);
|
||||
File[] files = new File(filter.getDir()).listFiles(filter);
|
||||
|
|
|
@ -76,6 +76,14 @@ import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
|||
import org.hl7.fhir.r5.elementmodel.ObjectConverter;
|
||||
import org.hl7.fhir.r5.elementmodel.ParserBase;
|
||||
import org.hl7.fhir.r5.elementmodel.ParserBase.ValidationPolicy;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r5.elementmodel.ResourceParser;
|
||||
import org.hl7.fhir.r5.elementmodel.ValidatedFragment;
|
||||
import org.hl7.fhir.r5.elementmodel.XmlParser;
|
||||
|
@ -115,8 +123,6 @@ import org.hl7.fhir.r5.model.Enumeration;
|
|||
import org.hl7.fhir.r5.model.Enumerations.BindingStrength;
|
||||
import org.hl7.fhir.r5.model.Enumerations.CodeSystemContentMode;
|
||||
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.CollectionStatus;
|
||||
import org.hl7.fhir.r5.model.Extension;
|
||||
import org.hl7.fhir.r5.model.HumanName;
|
||||
import org.hl7.fhir.r5.model.Identifier;
|
||||
|
@ -145,7 +151,6 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionSnapshotComp
|
|||
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.r5.model.TimeType;
|
||||
import org.hl7.fhir.r5.model.Timing;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
|
@ -153,11 +158,6 @@ import org.hl7.fhir.r5.renderers.DataRenderer;
|
|||
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.BuildExtensions;
|
||||
import org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.TypedElementDefinition;
|
||||
import org.hl7.fhir.r5.utils.ResourceUtilities;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
|
@ -262,7 +262,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
"ul", "ol", "li", "dl", "dt", "dd", "pre", "table", "caption", "colgroup", "col", "thead", "tr", "tfoot", "tbody", "th", "td",
|
||||
"code", "samp", "img", "map", "area"));
|
||||
private static final HashSet<String> HTML_ATTRIBUTES = new HashSet<>(Arrays.asList(
|
||||
"title", "style", "class", "id", "lang", "xml:lang", "dir", "accesskey", "tabindex",
|
||||
"title", "style", "class", "id", "idref", "lang", "xml:lang", "dir", "accesskey", "tabindex",
|
||||
// tables
|
||||
"span", "width", "align", "valign", "char", "charoff", "abbr", "axis", "headers", "scope", "rowspan", "colspan"));
|
||||
|
||||
|
@ -2592,7 +2592,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
return ok;
|
||||
}
|
||||
|
||||
private boolean checkPrimitive(ValidationContext valContext, List<ValidationMessage> errors, String path, String type, ElementDefinition context, Element e, StructureDefinition profile, NodeStack node) throws FHIRException {
|
||||
private boolean checkPrimitive(ValidationContext valContext, List<ValidationMessage> errors, String path, String type, ElementDefinition context, Element e, StructureDefinition profile, NodeStack node, Element resource) throws FHIRException {
|
||||
boolean ok = true;
|
||||
if (isBlank(e.primitiveValue())) {
|
||||
if (e.primitiveValue() == null)
|
||||
|
@ -2917,6 +2917,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
// check that no illegal elements and attributes have been used
|
||||
ok = checkInnerNames(errors, e, path, xhtml.getChildNodes(), false) && ok;
|
||||
ok = checkUrls(errors, e, path, xhtml.getChildNodes()) && ok;
|
||||
ok = checkIdRefs(errors, e, path, xhtml, resource) && ok;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3251,6 +3252,25 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
return ok;
|
||||
}
|
||||
|
||||
private boolean checkIdRefs(List<ValidationMessage> errors, Element e, String path, XhtmlNode node, Element resource) {
|
||||
boolean ok = true;
|
||||
if (node.getNodeType() == NodeType.Element && node.getAttribute("idref") != null) {
|
||||
String idref = node.getAttribute("idref");
|
||||
int count = countFragmentMatches(resource, idref);
|
||||
if (count == 0) {
|
||||
ok = warning(errors, "2023-12-01", IssueType.INVALID, e.line(), e.col(), path, idref == null, I18nConstants.XHTML_IDREF_NOT_FOUND, idref) && ok;
|
||||
} else if (count > 1) {
|
||||
ok = rule(errors, "2023-12-01", IssueType.INVALID, e.line(), e.col(), path, idref == null, I18nConstants.XHTML_IDREF_NOT_MULTIPLE_MATCHES, idref) && ok;
|
||||
}
|
||||
}
|
||||
if (node.hasChildren()) {
|
||||
for (XhtmlNode child : node.getChildNodes()) {
|
||||
checkIdRefs(errors, e, path, child, resource);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
private boolean checkUrls(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) {
|
||||
boolean ok = true;
|
||||
for (XhtmlNode node : list) {
|
||||
|
@ -5394,7 +5414,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
if (!Utilities.noString(ref)) {
|
||||
for (Element bundle : bundles) {
|
||||
List<Element> entries = bundle.getChildren(ENTRY);
|
||||
Element tgt = resolveInBundle(bundle, entries, ref, fu, resource.fhirType(), resource.getIdBase(), null, null, null, element, false);
|
||||
Element tgt = resolveInBundle(bundle, entries, ref, fu, resource.fhirType(), resource.getIdBase(), null, null, null, element, false, false);
|
||||
if (tgt != null) {
|
||||
element.setUserData("validator.bundle.resolution", tgt.getNamedChild(RESOURCE, false));
|
||||
return;
|
||||
|
@ -6135,7 +6155,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
boolean elementValidated = false;
|
||||
if (type != null) {
|
||||
if (isPrimitiveType(type)) {
|
||||
ok = checkPrimitive(valContext, errors, ei.getPath(), type, checkDefn, ei.getElement(), profile, stack) && ok;
|
||||
ok = checkPrimitive(valContext, errors, ei.getPath(), type, checkDefn, ei.getElement(), profile, stack, valContext.getRootResource()) && ok;
|
||||
} else {
|
||||
if (checkDefn.hasFixed()) {
|
||||
ok = checkFixedValue(errors, ei.getPath(), ei.getElement(), checkDefn.getFixed(), profile.getVersionedUrl(), checkDefn.getSliceName(), null, false) && ok;
|
||||
|
|
|
@ -37,11 +37,13 @@ public class BundleValidator extends BaseValidator {
|
|||
private String reference;
|
||||
private Element source;
|
||||
private boolean warning;
|
||||
private boolean nlLink;
|
||||
|
||||
public StringWithSource(String reference, Element source, boolean warning) {
|
||||
public StringWithSource(String reference, Element source, boolean warning, boolean nlLink) {
|
||||
this.reference = reference;
|
||||
this.source = source;
|
||||
this.warning = warning;
|
||||
this.nlLink = nlLink;
|
||||
}
|
||||
|
||||
public String getReference() {
|
||||
|
@ -56,6 +58,10 @@ public class BundleValidator extends BaseValidator {
|
|||
return warning;
|
||||
}
|
||||
|
||||
public boolean isNlLink() {
|
||||
return nlLink;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -587,7 +593,7 @@ public class BundleValidator extends BaseValidator {
|
|||
}
|
||||
|
||||
if (ref != null && !Utilities.noString(reference) && !reference.startsWith("#")) {
|
||||
Element target = resolveInBundle(bundle, entries, reference, fullUrl, type, id, stack, errors, name, ref, false);
|
||||
Element target = resolveInBundle(bundle, entries, reference, fullUrl, type, id, stack, errors, name, ref, false, false);
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -633,7 +639,7 @@ public class BundleValidator extends BaseValidator {
|
|||
for (EntrySummary e : entryList) {
|
||||
List<StringWithSource> references = findReferences(e.getEntry());
|
||||
for (StringWithSource ref : references) {
|
||||
Element tgt = resolveInBundle(bundle, entries, ref.getReference(), e.getEntry().getChildValue(FULL_URL), e.getResource().fhirType(), e.getResource().getIdBase(), stack, errors, ref.getSource().getPath(), ref.getSource(), ref.isWarning() || true);
|
||||
Element tgt = resolveInBundle(bundle, entries, ref.getReference(), e.getEntry().getChildValue(FULL_URL), e.getResource().fhirType(), e.getResource().getIdBase(), stack, errors, ref.getSource().getPath(), ref.getSource(), ref.isWarning() || true, ref.isNlLink());
|
||||
if (tgt != null) {
|
||||
EntrySummary t = entryForTarget(entryList, tgt);
|
||||
if (t != null ) {
|
||||
|
@ -673,7 +679,7 @@ public class BundleValidator extends BaseValidator {
|
|||
if (VersionUtilities.isR5VerOrLater(context.getVersion())) {
|
||||
hint(errors, NO_RULE_DATE, IssueType.INFORMATIONAL, e.getEntry().line(), e.getEntry().col(),
|
||||
stack.addToLiteralPath(ENTRY + '[' + (i + 1) + ']'), isExpectedToBeReverse(e.getResource().fhirType()),
|
||||
I18nConstants.BUNDLE_BUNDLE_ENTRY_REVERSE_R4, (e.getEntry().getChildValue(FULL_URL) != null ? "'" + e.getEntry().getChildValue(FULL_URL) + "'" : ""));
|
||||
I18nConstants.BUNDLE_BUNDLE_ENTRY_REVERSE_R5, (e.getEntry().getChildValue(FULL_URL) != null ? "'" + e.getEntry().getChildValue(FULL_URL) + "'" : ""));
|
||||
} else {
|
||||
warning(errors, NO_RULE_DATE, IssueType.INVALID, e.getEntry().line(), e.getEntry().col(),
|
||||
stack.addToLiteralPath(ENTRY + '[' + (i + 1) + ']'), isExpectedToBeReverse(e.getResource().fhirType()),
|
||||
|
@ -833,7 +839,7 @@ public class BundleValidator extends BaseValidator {
|
|||
if (child.getType().equals("Reference")) {
|
||||
String ref = child.getChildValue("reference");
|
||||
if (ref != null && !ref.startsWith("#") && !hasReference(ref, references))
|
||||
references.add(new StringWithSource(ref, child, false));
|
||||
references.add(new StringWithSource(ref, child, false, false));
|
||||
}
|
||||
if (Utilities.existsInList(child.getType(), "url", "uri"/*, "canonical"*/) &&
|
||||
!Utilities.existsInList(child.getName(), "system") &&
|
||||
|
@ -841,13 +847,17 @@ public class BundleValidator extends BaseValidator {
|
|||
"MessageHeader.source.endpoint", "MessageHeader.destination.endpoint", "Endpoint.address")) {
|
||||
String ref = child.primitiveValue();
|
||||
if (ref != null && !ref.startsWith("#") && !hasReference(ref, references))
|
||||
references.add(new StringWithSource(ref, child, true));
|
||||
references.add(new StringWithSource(ref, child, true, isNLLink(start)));
|
||||
}
|
||||
findReferences(child, references);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean isNLLink(Element parent) {
|
||||
return parent != null && "extension".equals(parent.getName()) && "http://hl7.org/fhir/StructureDefinition/narrativeLink".equals(parent.getNamedChildValue("url", false));
|
||||
}
|
||||
|
||||
private boolean hasReference(String ref, List<StringWithSource> references) {
|
||||
for (StringWithSource t : references) {
|
||||
if (ref.equals(t.getReference())) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Map;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.elementmodel.ObjectConverter;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.model.Coding;
|
||||
import org.hl7.fhir.r5.model.DateType;
|
||||
import org.hl7.fhir.r5.model.IntegerType;
|
||||
|
@ -24,7 +25,6 @@ import org.hl7.fhir.r5.model.TimeType;
|
|||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
||||
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier.ValidationContextResourceProxy;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
|
|
@ -6,12 +6,12 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Kind;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode.Operation;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.r5.model.SearchParameter;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
|
|
|
@ -20,6 +20,9 @@ import org.hl7.fhir.r5.elementmodel.Element;
|
|||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.extensions.ExtensionConstants;
|
||||
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Coding;
|
||||
|
@ -27,7 +30,6 @@ import org.hl7.fhir.r5.model.ElementDefinition;
|
|||
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
|
||||
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.r5.model.ExpressionNode;
|
||||
import org.hl7.fhir.r5.model.Extension;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
|
@ -36,8 +38,6 @@ import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
|
|||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine.IssueMessage;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.util.List;
|
|||
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.ContextUtilities;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.Coding;
|
||||
import org.hl7.fhir.r5.model.ConceptMap;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
|
@ -20,14 +22,12 @@ import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode;
|
|||
import org.hl7.fhir.r5.model.StructureMap.StructureMapInputMode;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapModelMode;
|
||||
import org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent;
|
||||
import org.hl7.fhir.r5.model.TypeDetails;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r5.terminologies.ConceptMapUtilities;
|
||||
import org.hl7.fhir.r5.terminologies.ValueSetUtilities;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.structuremap.ResolvedGroup;
|
||||
import org.hl7.fhir.r5.utils.structuremap.StructureMapUtilities;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue