Merge remote-tracking branch 'origin/master' into do-20231127-package-cache-threadsafe
This commit is contained in:
commit
27e0fbad16
|
@ -20,4 +20,6 @@
|
|||
# Appears to be Apache 2.0: https://github.com/NCIP/lexevs/blob/master/lgSharedLibraries/apache/commons/jakarta-regexp-1.4.license.txt
|
||||
(Unknown license) jakarta-regexp (jakarta-regexp:jakarta-regexp:1.4 - no url defined)
|
||||
# License string includes nested brackets, causing parser breakage, but is a valid BSD license.
|
||||
(BSD 3-Clause "New" or "Revised" License (BSD-3-Clause)) abego TreeLayout Core (org.abego.treelayout:org.abego.treelayout.core:1.0.3 - http://treelayout.sourceforge.net)
|
||||
(BSD 3-Clause "New" or "Revised" License (BSD-3-Clause)) abego TreeLayout Core (org.abego.treelayout:org.abego.treelayout.core:1.0.3 - http://treelayout.sourceforge.net)
|
||||
# License name includes brackets (javax.xml.bind)
|
||||
(The Apache Software License, Version 2.0) Jackson module: Old JAXB Annotations (javax.xml.bind) (com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.16.0 - https://github.com/FasterXML/jackson-modules-base)
|
|
@ -1,7 +1,28 @@
|
|||
## Validator Changes
|
||||
|
||||
* no changes
|
||||
* Fix bug where validator doesn't actually validate web sourced input
|
||||
* Fix narrative link validation and add id/idref validation
|
||||
* Remove fhir-test-cases from Validator CLI JAR (#1497) (reduce size)
|
||||
* Fix to CDA xsi:type validation per SD decision
|
||||
* Apply regex pattern to literal format if defined
|
||||
* Improvements to vital signs related messages
|
||||
* Fix R4 con-3 FHIRPath expression
|
||||
* Fix bug loading packages with partially specified version that doesn't exist
|
||||
|
||||
## Other code changes
|
||||
|
||||
* Bump commonmark version
|
||||
* Bump commonmark version
|
||||
* fix Utilities display of time periods (fixed width hour:min)
|
||||
* Fix stated path for error when code not in value set
|
||||
* Fix rendering of trigger definition using tables inside paragraphs
|
||||
* Update VSAC importer to fix timeout issues
|
||||
* Refactor FHIRPath java package
|
||||
* Fix problem with profiled resources being called examples in IG publisher
|
||||
* Remove dependencies for unused UI experiment (#1465)
|
||||
* Remove AU connectathon
|
||||
* Include hamcrest dependency
|
||||
* Fix breaking ValidationEngineTests
|
||||
* Give kinder error message for missing param
|
||||
* Fix commonmark group and bump version (#1500)
|
||||
* Remove dep used for local testing
|
||||
* Bump jackson & logback versions
|
||||
|
|
|
@ -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 {
|
|
@ -0,0 +1,100 @@
|
|||
package org.hl7.fhir.r4.ips;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.r4.ips.IPSRenderer.InternalTemplateEngine;
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
import org.hl7.fhir.r4.model.Composition;
|
||||
import org.hl7.fhir.r4.model.Composition.SectionComponent;
|
||||
import org.hl7.fhir.r4.model.DomainResource;
|
||||
import org.hl7.fhir.r4.model.Reference;
|
||||
import org.hl7.fhir.r4.terminologies.TerminologyClient;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlComposer;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||
|
||||
public class IPSRenderer {
|
||||
|
||||
public class InternalTemplateEngine implements ITemplateImplementer {
|
||||
|
||||
@Override
|
||||
public String buildPage(Map<String, String> headers, String content) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private interface ITemplateImplementer {
|
||||
public String buildPage(Map<String, String> headers, String content);
|
||||
}
|
||||
private TerminologyClient tx;
|
||||
private String folder; // for images etc
|
||||
private Map<String, byte[]> binaries; // from the pubpack
|
||||
private ITemplateImplementer templater;
|
||||
private Map<String, String> headers;
|
||||
|
||||
public IPSRenderer(TerminologyClient tx, String folder, Map<String, byte[]> binaries, ITemplateImplementer templater) {
|
||||
super();
|
||||
this.tx = tx;
|
||||
this.folder = folder;
|
||||
this.binaries = binaries;
|
||||
this.templater = templater;
|
||||
}
|
||||
|
||||
public IPSRenderer(TerminologyClient tx, String folder, Map<String, byte[]> binaries) {
|
||||
super();
|
||||
this.tx = tx;
|
||||
this.folder = folder;
|
||||
this.binaries = binaries;
|
||||
this.templater = new InternalTemplateEngine();
|
||||
}
|
||||
|
||||
public String render(Bundle document) throws IOException {
|
||||
headers = new HashMap<>();
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
generate(x, document);
|
||||
return templater.buildPage(headers, new XhtmlComposer(false, true).compose(x));
|
||||
}
|
||||
|
||||
private void generate(XhtmlNode x, Bundle document) {
|
||||
Composition cmp = (Composition) document.getEntryFirstRep().getResource();
|
||||
int sectionDepth = findSectionDepth(cmp.getSection());
|
||||
XhtmlNode table = x.table("grid");
|
||||
|
||||
// row 1: header
|
||||
XhtmlNode tr = table.tr();
|
||||
XhtmlNode td = tr.td().colspan(1+sectionDepth);
|
||||
td.b().tx("Provided");
|
||||
td = tr.td().colspan(1+sectionDepth);
|
||||
td.b().tx("Generated");
|
||||
|
||||
// row 2: Subject
|
||||
DomainResource subject = findResource(document, cmp.getSubject());
|
||||
tr = table.tr();
|
||||
td = tr.td().colspan(1+sectionDepth);
|
||||
// genNarrative("subject", subject, td);
|
||||
td = tr.td().colspan(1+sectionDepth);
|
||||
td.b().tx("Generated");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private DomainResource findResource(Bundle document, Reference subject) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private int findSectionDepth(List<SectionComponent> list) {
|
||||
int i = 1;
|
||||
for (SectionComponent sect : list) {
|
||||
i = Integer.max(i, 1+findSectionDepth(sect.getSection()));
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -11,12 +11,15 @@ import org.hl7.fhir.r4.model.Base64BinaryType;
|
|||
import org.hl7.fhir.r4.model.Bundle;
|
||||
import org.hl7.fhir.r4.utils.client.FHIRToolingClient;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class IpsBuilderTest {
|
||||
|
||||
@Test
|
||||
@Tag("excludedInSurefire")
|
||||
@DisplayName("Test IPS Generation")
|
||||
void testIpsGeneration() throws URISyntaxException, FileNotFoundException, IOException {
|
||||
FHIRToolingClient server = new FHIRToolingClient("https://hl7auconnectathon.salessbx.smiledigitalhealth.com/fhir-request", "FHIR-Validator");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -149,12 +149,12 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark-ext-gfm-tables</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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.")
|
||||
|
|
|
@ -145,12 +145,12 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark-ext-gfm-tables</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1333,7 +1333,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
}
|
||||
String csumm =cachingAllowed && txCache != null ? txCache.summary(code) : null;
|
||||
if (cachingAllowed && txCache != null) {
|
||||
txLog("$validate "+csumm+" for "+ txCache.summary(vs));
|
||||
txLog("$validate "+csumm+(vs == null ? "" : " for "+ txCache.summary(vs)));
|
||||
} else {
|
||||
txLog("$validate "+csumm+" before cache exists");
|
||||
}
|
||||
|
|
|
@ -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,14 +39,15 @@ 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.Constants;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.PropertyRepresentation;
|
||||
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;
|
||||
|
@ -345,12 +346,13 @@ public class Property {
|
|||
}
|
||||
ElementDefinition ed = definition;
|
||||
StructureDefinition sd = structure;
|
||||
boolean isCDA = isCDAElement(structure);
|
||||
SourcedChildDefinitions children = profileUtilities.getChildMap(sd, ed);
|
||||
String url = null;
|
||||
if (children.getList().isEmpty() || isElementWithOnlyExtension(ed, children.getList())) {
|
||||
// ok, find the right definitions
|
||||
String t = null;
|
||||
if (ed.getType().size() == 1)
|
||||
if (ed.getType().size() == 1 && (statedType == null || !isCDA))
|
||||
t = ed.getType().get(0).getWorkingCode();
|
||||
else if (ed.getType().size() == 0)
|
||||
throw new Error("types == 0, and no children found on "+getDefinition().getPath());
|
||||
|
@ -363,9 +365,9 @@ public class Property {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!all) {
|
||||
if (!all || (isCDA && statedType != null)) {
|
||||
// ok, it's polymorphic
|
||||
if (ed.hasRepresentation(PropertyRepresentation.TYPEATTR)) {
|
||||
if (ed.hasRepresentation(PropertyRepresentation.TYPEATTR) || isCDA) {
|
||||
t = statedType;
|
||||
if (t == null && ToolingExtensions.hasExtension(ed, "http://hl7.org/fhir/StructureDefinition/elementdefinition-defaulttype"))
|
||||
t = ToolingExtensions.readStringExtension(ed, "http://hl7.org/fhir/StructureDefinition/elementdefinition-defaulttype");
|
||||
|
@ -379,13 +381,21 @@ public class Property {
|
|||
url = tr.getWorkingCode();
|
||||
ok = true;
|
||||
}
|
||||
if (!ok) {
|
||||
sdt = findAncestor(t, sdt);
|
||||
if (sdt != null) {
|
||||
url = sdt.getUrl();
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok)
|
||||
if (ok) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
throw new DefinitionException("Type '"+t+"' is not an acceptable type for '"+elementName+"' on property "+definition.getPath());
|
||||
}
|
||||
if (!ok)
|
||||
throw new DefinitionException("Type '"+t+"' is not an acceptable type for '"+elementName+"' on property "+definition.getPath());
|
||||
|
||||
} else {
|
||||
t = elementName.substring(tail(ed.getPath()).length() - 3);
|
||||
if (isPrimitive(lowFirst(t)))
|
||||
|
@ -421,6 +431,26 @@ public class Property {
|
|||
return properties;
|
||||
}
|
||||
|
||||
private StructureDefinition findAncestor(String type, StructureDefinition sdt) {
|
||||
if (sdt != null) {
|
||||
StructureDefinition sd = context.fetchTypeDefinition(type);
|
||||
StructureDefinition t = sd;
|
||||
while (t != null) {
|
||||
if (t == sdt) {
|
||||
return sd;
|
||||
}
|
||||
t = context.fetchResource(StructureDefinition.class, t.getBaseDefinition());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private boolean isCDAElement(StructureDefinition sd) {
|
||||
return sd.hasUrl() && sd.getUrl().startsWith(Constants.NS_CDA_ROOT);
|
||||
}
|
||||
|
||||
|
||||
protected List<Property> getChildProperties(TypeDetails type) throws DefinitionException {
|
||||
ElementDefinition ed = definition;
|
||||
StructureDefinition sd = structure;
|
||||
|
|
|
@ -60,6 +60,7 @@ import org.hl7.fhir.r5.elementmodel.Element.SpecialElement;
|
|||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.formats.FormatUtilities;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.model.Constants;
|
||||
import org.hl7.fhir.r5.model.DateTimeType;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition.PropertyRepresentation;
|
||||
|
@ -232,7 +233,7 @@ public class XmlParser extends ParserBase {
|
|||
|
||||
Element result = new Element(element.getLocalName(), new Property(context, sd.getSnapshot().getElement().get(0), sd)).setFormat(FhirFormat.XML);
|
||||
result.setPath(element.getLocalName());
|
||||
checkElement(errors, element, path, result.getProperty(), false);
|
||||
checkElement(errors, element, result, path, result.getProperty(), false);
|
||||
result.markLocation(line(element, false), col(element, false));
|
||||
result.setType(element.getLocalName());
|
||||
parseChildren(errors, path, element, result);
|
||||
|
@ -274,7 +275,7 @@ public class XmlParser extends ParserBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void checkElement(List<ValidationMessage> errors, org.w3c.dom.Element element, String path, Property prop, boolean xsiTypeChecked) throws FHIRFormatError {
|
||||
private void checkElement(List<ValidationMessage> errors, org.w3c.dom.Element element, Element e, String path, Property prop, boolean xsiTypeChecked) throws FHIRFormatError {
|
||||
if (policy == ValidationPolicy.EVERYTHING) {
|
||||
if (empty(element) && FormatUtilities.FHIR_NS.equals(element.getNamespaceURI())) // this rule only applies to FHIR Content
|
||||
logError(errors, ValidationMessage.NO_RULE_DATE, line(element, false), col(element, false), path, IssueType.INVALID, context.formatMessage(I18nConstants.ELEMENT_MUST_HAVE_SOME_CONTENT), IssueSeverity.ERROR);
|
||||
|
@ -290,22 +291,40 @@ public class XmlParser extends ParserBase {
|
|||
String xsiType = element.getAttributeNS(FormatUtilities.NS_XSI, "type");
|
||||
if (!Utilities.noString(xsiType)) {
|
||||
String actualType = prop.getXmlTypeName();
|
||||
if (!xsiType.equals(actualType)) {
|
||||
logError(errors, "2023-10-12", line(element, false), col(element, false), path, IssueType.INVALID, context.formatMessage(I18nConstants.XSI_TYPE_WRONG, xsiType, actualType), IssueSeverity.ERROR);
|
||||
} else {
|
||||
if (xsiType.equals(actualType)) {
|
||||
logError(errors, "2023-10-12", line(element, false), col(element, false), path, IssueType.INVALID, context.formatMessage(I18nConstants.XSI_TYPE_UNNECESSARY), IssueSeverity.INFORMATION);
|
||||
}
|
||||
} else {
|
||||
StructureDefinition sd = findLegalConstraint(xsiType, actualType);
|
||||
if (sd != null) {
|
||||
e.setType(sd.getType());
|
||||
e.setExplicitType(xsiType);
|
||||
} else {
|
||||
logError(errors, "2023-10-12", line(element, false), col(element, false), path, IssueType.INVALID, context.formatMessage(I18nConstants.XSI_TYPE_WRONG, xsiType, actualType), IssueSeverity.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private StructureDefinition findLegalConstraint(String xsiType, String actualType) {
|
||||
StructureDefinition sdA = context.fetchTypeDefinition(actualType);
|
||||
StructureDefinition sd = context.fetchTypeDefinition(xsiType);
|
||||
while (sd != null) {
|
||||
if (sd == sdA) {
|
||||
return sd;
|
||||
}
|
||||
sd = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Element parse(List<ValidationMessage> errors, org.w3c.dom.Element base, String type) throws Exception {
|
||||
StructureDefinition sd = getDefinition(errors, 0, 0, FormatUtilities.FHIR_NS, type);
|
||||
Element result = new Element(base.getLocalName(), new Property(context, sd.getSnapshot().getElement().get(0), sd)).setFormat(FhirFormat.XML).setNativeObject(base);
|
||||
result.setPath(base.getLocalName());
|
||||
String path = "/"+pathPrefix(base.getNamespaceURI())+base.getLocalName();
|
||||
checkElement(errors, base, path, result.getProperty(), false);
|
||||
checkElement(errors, base, result, path, result.getProperty(), false);
|
||||
result.setType(base.getLocalName());
|
||||
parseChildren(errors, path, base, result);
|
||||
result.numberChildren();
|
||||
|
@ -469,7 +488,7 @@ public class XmlParser extends ParserBase {
|
|||
} else
|
||||
n.setType(n.getType());
|
||||
}
|
||||
checkElement(errors, (org.w3c.dom.Element) child, npath, n.getProperty(), xsiTypeChecked);
|
||||
checkElement(errors, (org.w3c.dom.Element) child, n, npath, n.getProperty(), xsiTypeChecked);
|
||||
element.getChildren().add(n);
|
||||
if (ok) {
|
||||
if (property.isResource())
|
||||
|
@ -500,7 +519,7 @@ public class XmlParser extends ParserBase {
|
|||
Element n = new Element(name, property).markLocation(line(child, false), col(child, false)).setFormat(FhirFormat.XML).setNativeObject(child);
|
||||
cgn.getChildren().add(n);
|
||||
n.setPath(element.getPath()+"."+property.getName());
|
||||
checkElement(errors, (org.w3c.dom.Element) child, npath, n.getProperty(), false);
|
||||
checkElement(errors, (org.w3c.dom.Element) child, n, npath, n.getProperty(), false);
|
||||
parseChildren(errors, npath, (org.w3c.dom.Element) child, n);
|
||||
}
|
||||
}
|
||||
|
@ -749,6 +768,11 @@ public class XmlParser extends ParserBase {
|
|||
if (hasTypeAttr(c))
|
||||
return true;
|
||||
}
|
||||
// xsi_type is always allowed on CDA elements. right now, I'm not sure where to indicate this in the model,
|
||||
// so it's just hardcoded here
|
||||
if (e.getType() != null && e.getType().startsWith(Constants.NS_CDA_ROOT)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1229,7 +1229,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
} else if ("concept".equals(f.getProperty()) && inc.hasSystem()) {
|
||||
wli.addText(f.getValue());
|
||||
ValidationResult vr = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions(), inc.getSystem(), inc.getVersion(), f.getValue(), null);
|
||||
if (vr.isOk()) {
|
||||
if (vr.isOk() && vr.getDisplay() != null) {
|
||||
wli.tx(" ("+vr.getDisplay()+")");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -701,8 +701,9 @@ public class RenderingContext {
|
|||
public GenerationRules getRules() {
|
||||
return rules;
|
||||
}
|
||||
public void setRules(GenerationRules rules) {
|
||||
public RenderingContext setRules(GenerationRules rules) {
|
||||
this.rules = rules;
|
||||
return this;
|
||||
}
|
||||
public StandardsStatus getDefaultStandardsStatus() {
|
||||
return defaultStandardsStatus;
|
||||
|
|
|
@ -750,7 +750,7 @@ public class TerminologyCache {
|
|||
}
|
||||
|
||||
public String summary(Coding code) {
|
||||
return code.getSystem()+"#"+code.getCode()+": \""+code.getDisplay()+"\"";
|
||||
return code.getSystem()+"#"+code.getCode()+(code.hasDisplay() ? ": \""+code.getDisplay()+"\"" : "");
|
||||
}
|
||||
|
||||
public String summary(CodeableConcept code) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.model.CanonicalResource;
|
||||
import org.hl7.fhir.r5.model.CompartmentDefinition;
|
||||
import org.hl7.fhir.r5.model.Constants;
|
||||
import org.hl7.fhir.r5.model.ContactPoint.ContactPointSystem;
|
||||
import org.hl7.fhir.utilities.HL7WorkGroups;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
|
||||
public class CanonicalResourceUtilities {
|
||||
|
||||
public static void setHl7WG(CanonicalResource cr, String wgc) {
|
||||
var wg = HL7WorkGroups.find(wgc);
|
||||
if (wg == null) {
|
||||
throw new Error("Unknown WG "+wgc);
|
||||
}
|
||||
ToolingExtensions.setCodeExtension(cr, ToolingExtensions.EXT_WORKGROUP, wg.getCode());
|
||||
cr.setPublisher("HL7 International / "+wg.getName());
|
||||
cr.getContact().clear();
|
||||
cr.addContact().addTelecom().setSystem(ContactPointSystem.URL).setValue(wg.getLink());
|
||||
}
|
||||
|
||||
public static void setHl7WG(CanonicalResource cr) {
|
||||
String wgc = ToolingExtensions.readStringExtension(cr, ToolingExtensions.EXT_WORKGROUP);
|
||||
if (wgc == null) {
|
||||
wgc = "fhir";
|
||||
}
|
||||
var wg = HL7WorkGroups.find(wgc);
|
||||
if (wg == null) {
|
||||
throw new Error("Unknown WG '"+wgc+"' in "+cr.fhirType()+"/"+cr.getIdBase());
|
||||
}
|
||||
ToolingExtensions.setCodeExtension(cr, ToolingExtensions.EXT_WORKGROUP, wg.getCode());
|
||||
cr.setPublisher("HL7 International / "+wg.getName());
|
||||
cr.getContact().clear();
|
||||
cr.addContact().addTelecom().setSystem(ContactPointSystem.URL).setValue(wg.getLink());
|
||||
}
|
||||
|
||||
public static void setHl7WG(Element res, String code) {
|
||||
if (VersionUtilities.getExtendedCanonicalResourceNames(res.getFHIRPublicationVersion().toCode()).contains(res.fhirType())) {
|
||||
var wg = HL7WorkGroups.find(code);
|
||||
if (wg == null) {
|
||||
throw new Error("Unknown WG "+code);
|
||||
}
|
||||
|
||||
Element ext = res.getExtension(ToolingExtensions.EXT_WORKGROUP);
|
||||
if (ext == null) {
|
||||
ext = res.addElement("extension");
|
||||
ext.setChildValue("url", ToolingExtensions.EXT_WORKGROUP);
|
||||
}
|
||||
ext.setChildValue("valueCode", code);
|
||||
res.setChildValue("publisher", "HL7 International / "+wg.getName());
|
||||
while (res.hasChild("contact")) {
|
||||
res.removeChild("contact");
|
||||
}
|
||||
Element c = res.addElement("contact");
|
||||
Element t = c.addElement("telecom");
|
||||
t.setChildValue("system", "url");
|
||||
t.setChildValue("value", wg.getLink());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* for use in the core build where the context is not fully populated. Only known safe for R6 resources
|
||||
*
|
||||
* @param res
|
||||
* @param code
|
||||
*/
|
||||
public static void setHl7WG(org.w3c.dom.Element res, String code) {
|
||||
String rt = res.getNodeName();
|
||||
if (VersionUtilities.getExtendedCanonicalResourceNames("5.0.0").contains(rt)) {
|
||||
var wg = HL7WorkGroups.find(code);
|
||||
if (wg == null) {
|
||||
throw new Error("Unknown WG "+code);
|
||||
}
|
||||
|
||||
List<org.w3c.dom.Element> extensions = XMLUtil.getNamedChildren(res, "extension");
|
||||
org.w3c.dom.Element wgext = null;
|
||||
for (org.w3c.dom.Element ext : extensions) {
|
||||
String url = ext.getAttribute("url");
|
||||
if (ToolingExtensions.EXT_WORKGROUP.equals(url)) {
|
||||
wgext = ext;
|
||||
}
|
||||
}
|
||||
if (wgext == null) {
|
||||
wgext = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "extension");
|
||||
wgext.setAttribute("url", ToolingExtensions.EXT_WORKGROUP);
|
||||
org.w3c.dom.Element after = XMLUtil.getLastChild(res, "id", "meta", "text", "implicitRules", "language", "text", "contained");
|
||||
if (after != null) {
|
||||
after = XMLUtil.getNextSibling(after);
|
||||
}
|
||||
res.insertBefore(wgext, after);
|
||||
res.insertBefore(res.getOwnerDocument().createTextNode("\n "), after);
|
||||
}
|
||||
XMLUtil.clearChildren(wgext);
|
||||
org.w3c.dom.Element valueCode = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "valueCode");
|
||||
wgext.appendChild(valueCode);
|
||||
valueCode.setAttribute("value", code);
|
||||
|
||||
org.w3c.dom.Element pub = XMLUtil.getNamedChild(res, "publisher");
|
||||
if (pub == null) {
|
||||
pub = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "publisher");
|
||||
org.w3c.dom.Element after = XMLUtil.getLastChild(res, "id", "meta", "text", "implicitRules", "language", "text", "contained", "extension", "modifierExtension",
|
||||
"url", "identifier", "version", "versionAlgorithmString", "versionAlgorithmCoding", "name", "title", "status", "experimental", "date", ("EvidenceReport".equals(rt) ? "subject" : "xx"));
|
||||
if (after != null) {
|
||||
after = XMLUtil.getNextSibling(after);
|
||||
}
|
||||
res.insertBefore(pub, after);
|
||||
res.insertBefore(res.getOwnerDocument().createTextNode("\n "), after);
|
||||
}
|
||||
pub.setAttribute("value", "HL7 International / "+wg.getName());
|
||||
|
||||
org.w3c.dom.Element contact = XMLUtil.getNamedChild(res, "contact");
|
||||
if (contact == null) {
|
||||
contact = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "contact");
|
||||
res.insertBefore(contact, XMLUtil.getNextSibling(pub));
|
||||
res.insertBefore(res.getOwnerDocument().createTextNode("\n "), contact.getNextSibling());
|
||||
}
|
||||
|
||||
org.w3c.dom.Element telecom = XMLUtil.getNamedChild(contact, "telecom");
|
||||
if (telecom == null) {
|
||||
contact.appendChild(res.getOwnerDocument().createTextNode("\n "));
|
||||
telecom = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "telecom");
|
||||
contact.appendChild(telecom);
|
||||
contact.appendChild(res.getOwnerDocument().createTextNode("\n "));
|
||||
}
|
||||
|
||||
org.w3c.dom.Element system = XMLUtil.getNamedChild(telecom, "system");
|
||||
if (system == null) {
|
||||
system = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "system");
|
||||
org.w3c.dom.Element after = XMLUtil.getLastChild(telecom, "id", "extension");
|
||||
if (after != null) {
|
||||
after = XMLUtil.getNextSibling(after);
|
||||
}
|
||||
telecom.insertBefore(system, after);
|
||||
telecom.insertBefore(res.getOwnerDocument().createTextNode("\n "), after);
|
||||
}
|
||||
system.setAttribute("value", "url");
|
||||
|
||||
|
||||
org.w3c.dom.Element value = XMLUtil.getNamedChild(telecom, "value");
|
||||
if (value == null) {
|
||||
value = res.getOwnerDocument().createElementNS(Constants.NS_FHIR_ROOT, "value");
|
||||
org.w3c.dom.Element after = XMLUtil.getLastChild(telecom, "id", "extension", "system");
|
||||
if (after != null) {
|
||||
after = XMLUtil.getNextSibling(after);
|
||||
}
|
||||
telecom.insertBefore(system, after);
|
||||
telecom.insertBefore(res.getOwnerDocument().createTextNode("\n "), after);
|
||||
}
|
||||
value.setAttribute("value", wg.getLink());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -875,7 +875,7 @@ public class ToolingExtensions {
|
|||
Iterator<Extension> i = focus.getExtension().iterator();
|
||||
while (i.hasNext()) {
|
||||
Extension e = i.next(); // must be called before you can call i.remove()
|
||||
if (e.getUrl().equals(url)) {
|
||||
if (url.equals(e.getUrl())) {
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -31,12 +31,12 @@
|
|||
|
||||
<!-- Markdown Utilities -->
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<groupId>org.commonmark</groupId>
|
||||
<artifactId>commonmark-ext-gfm-tables</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
|
|
@ -5,13 +5,15 @@ public class HL7WorkGroups {
|
|||
public static class HL7WorkGroup {
|
||||
private String link;
|
||||
private String name;
|
||||
private String name2;
|
||||
private String code;
|
||||
|
||||
|
||||
protected HL7WorkGroup(String code, String name, String link) {
|
||||
protected HL7WorkGroup(String code, String name, String name2, String link) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.name2 = name2;
|
||||
this.link = link;
|
||||
}
|
||||
public String getLink() {
|
||||
|
@ -20,6 +22,9 @@ public class HL7WorkGroups {
|
|||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName2() {
|
||||
return name2;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
@ -27,9 +32,10 @@ public class HL7WorkGroups {
|
|||
|
||||
public static HL7WorkGroup find(String wg) {
|
||||
String name = nameForWG(wg);
|
||||
String name2 = name2ForWG(wg);
|
||||
String url = urlForWG(wg);
|
||||
if (name != null) {
|
||||
return new HL7WorkGroup(wg, name, url);
|
||||
return new HL7WorkGroup(wg, name, name2, url);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -129,10 +135,17 @@ public class HL7WorkGroups {
|
|||
case "tsmg": return "Terminology Services Management Group (TSMG)";
|
||||
case "us": return "US Realm Steering Committee";
|
||||
case "v2": return "V2 Management Group";
|
||||
case "vocab": return "Terminology Infrastructure";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String name2ForWG(String wg) {
|
||||
switch (wg) {
|
||||
case "ti": return "Vocabulary";
|
||||
case "vocab": return "Vocabulary";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue