Merge branch 'master' of https://github.com/hapifhir/org.hl7.fhir.core into IGRenderingChanges

This commit is contained in:
Lloyd McKenzie 2022-09-27 08:27:12 -06:00
commit d5f6e1450f
135 changed files with 2995 additions and 6490 deletions

View File

@ -1,7 +1,8 @@
## Validator Changes
* no changes
* Work around R4 issue with http://www.rfc-editor.org/bcp/bcp13.txt value set (should be http://hl7.org/fhir/ValueSet/mimetypes)
* Minor improvements to error messages
## Other code changes
* no changes
n/a

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -183,12 +183,12 @@ public class ExtensionDefinitionGenerator {
private StructureDefinition generateExtension(StructureDefinition type, ElementDefinition ed) throws FHIRException {
StructureDefinition ext = new StructureDefinition();
ext.setId("extension-" + ed.getPath().replace("[x]", ""));
ext.setUrl("http://hl7.org/fhir/" + sourceVersion.toCode(3) + "/StructureDefinition/" + ext.getId());
ext.setUrl("http://hl7.org/fhir/" + sourceVersion.toCode().substring(0, 3) + "/StructureDefinition/" + ext.getId());
if (ext.getId().length() > 64)
ext.setId(contract(ext.getId()));
ext.setVersion(sourceVersion.toCode());
ext.setName("ExtensionR" + sourceVersion.toCode(1) + ed.getPath().replace(".", ""));
ext.setTitle("Extension definition for R" + sourceVersion.toCode(1) + " element " + ed.getPath());
ext.setName("ExtensionR" + sourceVersion.toCode().substring(0, 1) + ed.getPath().replace(".", ""));
ext.setTitle("Extension definition for R" + sourceVersion.toCode().substring(0, 1) + " element " + ed.getPath());
ext.setStatus(PublicationStatus.ACTIVE);
ext.setDate(type.getDate());
ext.setFhirVersion(type.getFhirVersion());
@ -212,7 +212,7 @@ public class ExtensionDefinitionGenerator {
v.setSliceName(n);
v.getType().clear();
v.setIsSummaryElement(null);
v.addType().setCode("Extension").addProfile("http://hl7.org/fhir/" + sourceVersion.toCode(3) + "/StructureDefinition/extension-" + child.getPath().replace("[x]", ""));
v.addType().setCode("Extension").addProfile("http://hl7.org/fhir/" + sourceVersion.toCode().substring(0, 3) + "/StructureDefinition/extension-" + child.getPath().replace("[x]", ""));
ext.getDifferential().addElement(v);
}
}
@ -237,7 +237,7 @@ public class ExtensionDefinitionGenerator {
v.setSliceName(n);
v.getType().clear();
v.setIsSummaryElement(null);
v.addType().setCode("Extension").addProfile("http://hl7.org/fhir/" + sourceVersion.toCode(3) + "/StructureDefinition/extension-" + child.getPath().replace("[x]", ""));
v.addType().setCode("Extension").addProfile("http://hl7.org/fhir/" + sourceVersion.toCode().substring(0, 3) + "/StructureDefinition/extension-" + child.getPath().replace("[x]", ""));
ext.getDifferential().addElement(v);
}
}
@ -357,13 +357,13 @@ public class ExtensionDefinitionGenerator {
private void savePackage(List<StructureDefinition> extensions) throws FHIRException, IOException {
JsonObject npm = new JsonObject();
npm.addProperty("name", "hl7.fhir.extensions.r" + sourceVersion.toCode(1));
npm.addProperty("version", targetVersion.toCode(3));
npm.addProperty("name", "hl7.fhir.extensions.r" + sourceVersion.toCode().substring(0, 1));
npm.addProperty("version", targetVersion.toCode().substring(0, 3));
npm.addProperty("tools-version", ToolsVersion.TOOLS_VERSION);
npm.addProperty("type", PackageType.IG.getCode());
npm.addProperty("license", SPDXLicense.CC01_0.toCode());
npm.addProperty("canonical", "http://hl7.org/fhir/" + sourceVersion.toCode(3) + "/extensions/" + targetVersion.toCode(3));
npm.addProperty("url", "http://hl7.org/fhir/" + sourceVersion.toCode(3) + "/extensions/" + targetVersion.toCode(3));
npm.addProperty("canonical", "http://hl7.org/fhir/" + sourceVersion.toCode().substring(0, 3) + "/extensions/" + targetVersion.toCode().substring(0, 3));
npm.addProperty("url", "http://hl7.org/fhir/" + sourceVersion.toCode().substring(0, 3) + "/extensions/" + targetVersion.toCode().substring(0, 3));
npm.addProperty("title", "Extension Definitions for representing elements from " + sourceVersion.toCode() + " in " + targetVersion.toCode());
npm.addProperty("description", "Extension Definitions for representing elements from " + sourceVersion.toCode() + " in " + targetVersion.toCode() + " built " + new SimpleDateFormat("EEE, MMM d, yyyy HH:mmZ", new Locale("en", "US")).format(Calendar.getInstance().getTime()) + timezone() + ")");
JsonObject dep = new JsonObject();

View File

@ -2,16 +2,20 @@ package org.hl7.fhir.convertors.analytics;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.parsers.ParserConfigurationException;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.utils.EOperationOutcome;
import org.hl7.fhir.utilities.SimpleHTTPClient;
import org.hl7.fhir.utilities.SimpleHTTPClient.HTTPResult;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.json.JsonTrackingParser;
import org.hl7.fhir.utilities.json.JsonUtilities;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
@ -24,18 +28,21 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
public class PackageVisitor {
public interface IPackageVisitorProcessor {
public void processResource(String pid, String version, String type, byte[] content) throws FHIRException;
public void processResource(String pid, NpmPackage npm, String version, String type, String id, byte[] content) throws FHIRException, IOException, EOperationOutcome;
}
private List<String> resourceTypes = new ArrayList<>();
private List<String> versions = new ArrayList<>();
private boolean corePackages;
private boolean oldVersions;
private boolean current;
private IPackageVisitorProcessor processor;
private FilesystemPackageCacheManager pcm;
private PackageClient pc;
@ -57,7 +64,13 @@ public class PackageVisitor {
}
public boolean isCurrent() {
return current;
}
public void setCurrent(boolean current) {
this.current = current;
}
public boolean isCorePackages() {
return corePackages;
@ -99,20 +112,97 @@ public class PackageVisitor {
System.out.println("Finding packages");
pc = new PackageClient(PackageClient.PRIMARY_SERVER);
pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
Map<String, String> cpidMap = getAllCIPackages();
Set<String> cpidSet = new HashSet<>();
System.out.println("Go: "+cpidMap.size()+" current packages");
int i = 0;
for (String s : cpidMap.keySet()) {
processCurrentPackage(s, cpidMap.get(s), cpidSet, i, cpidMap.size());
i++;
}
Set<String> pidList = getAllPackages();
System.out.println("Go: "+pidList.size()+" packages");
for (String pid : pidList) {
List<String> vList = listVersions(pid);
if (oldVersions) {
for (String v : vList) {
processPackage(pid, v);
System.out.println("Go: "+pidList.size()+" published packages");
i = 0;
for (String pid : pidList) {
if (!cpidSet.contains(pid)) {
cpidSet.add(pid);
List<String> vList = listVersions(pid);
if (oldVersions) {
for (String v : vList) {
processPackage(pid, v, i, pidList.size());
}
} else if (vList.isEmpty()) {
System.out.println("No Packages for "+pid);
} else {
processPackage(pid, vList.get(vList.size() - 1), i, pidList.size());
}
} else if (vList.isEmpty()) {
System.out.println("No Packages for "+pid);
} else {
processPackage(pid, vList.get(vList.size() - 1));
}
}
i++;
}
JsonObject json = JsonTrackingParser.fetchJson("https://raw.githubusercontent.com/FHIR/ig-registry/master/fhir-ig-list.json");
i = 0;
List<JsonObject> objects = JsonUtilities.objects(json, "guides");
for (JsonObject o : objects) {
String pid = JsonUtilities.str(o, "npm-name");
if (pid != null && !cpidSet.contains(pid)) {
cpidSet.add(pid);
List<String> vList = listVersions(pid);
if (oldVersions) {
for (String v : vList) {
processPackage(pid, v, i, objects.size());
}
} else if (vList.isEmpty()) {
System.out.println("No Packages for "+pid);
} else {
processPackage(pid, vList.get(vList.size() - 1), i, objects.size());
}
}
i++;
}
}
private void processCurrentPackage(String url, String pid, Set<String> cpidSet, int i, int t) {
try {
String[] p = url.split("\\/");
String repo = "https://build.fhir.org/ig/"+p[0]+"/"+p[1];
NpmPackage npm = NpmPackage.fromUrl(repo+"/package.tgz");
String fv = npm.fhirVersion();
cpidSet.add(pid);
if (corePackages || !corePackage(npm)) {
int c = 0;
if (fv != null && (versions.isEmpty() || versions.contains(fv))) {
for (String type : resourceTypes) {
for (String s : npm.listResources(type)) {
c++;
try {
processor.processResource(pid+"#current", npm, fv, type, s, TextFile.streamToBytes(npm.load("package", s)));
} catch (Exception e) {
System.out.println("####### Error loading "+pid+"#current["+fv+"]/"+type+" ####### "+e.getMessage());
e.printStackTrace();
}
}
}
}
System.out.println("Processed: "+pid+"#current: "+c+" resources ("+i+" of "+t+")");
}
} catch (Exception e) {
System.out.println("Unable to process: "+pid+"#current: "+e.getMessage());
}
}
private Map<String, String> getAllCIPackages() throws IOException {
Map<String, String> res = new HashMap<>();
if (current) {
JsonArray json = JsonTrackingParser.fetchJsonArray("https://build.fhir.org/ig/qas.json");
for (JsonElement j : json) {
JsonObject o = (JsonObject) j;
String url = JsonUtilities.str(o, "repo");
res.put(url, JsonUtilities.str(o, "package-id"));
}
}
return res;
}
private List<String> listVersions(String pid) throws IOException {
@ -163,7 +253,7 @@ public class PackageVisitor {
}
private void processPackage(String pid, String v) throws IOException {
private void processPackage(String pid, String v, int i, int t) throws IOException {
NpmPackage npm = null;
String fv = null;
try {
@ -172,16 +262,34 @@ public class PackageVisitor {
} catch (Throwable e) {
System.out.println("Unable to process: "+pid+"#"+v+": "+e.getMessage());
}
int c = 0;
if (fv != null && (versions.isEmpty() || versions.contains(fv))) {
for (String type : resourceTypes) {
for (String s : npm.listResources(type)) {
c++;
processor.processResource(pid+"#"+v, fv, type, TextFile.streamToBytes(npm.load("package", s)));
if (corePackages || !corePackage(npm)) {
int c = 0;
if (fv != null && (versions.isEmpty() || versions.contains(fv))) {
for (String type : resourceTypes) {
for (String s : npm.listResources(type)) {
c++;
try {
processor.processResource(pid+"#"+v, npm, fv, type, s, TextFile.streamToBytes(npm.load("package", s)));
} catch (Exception e) {
System.out.println("####### Error loading "+pid+"#"+v +"["+fv+"]/"+type+" ####### "+e.getMessage());
e.printStackTrace();
}
}
}
}
}
System.out.println("Processed: "+pid+"#"+v+": "+c+" resources");
}
System.out.println("Processed: "+pid+"#"+v+": "+c+" resources ("+i+" of "+t+")");
}
}
private boolean corePackage(NpmPackage npm) {
return npm != null && !Utilities.noString(npm.name()) && (
npm.name().startsWith("hl7.terminology") ||
npm.name().startsWith("hl7.fhir.r2.") ||
npm.name().startsWith("hl7.fhir.r2b.") ||
npm.name().startsWith("hl7.fhir.r3.") ||
npm.name().startsWith("hl7.fhir.r4.") ||
npm.name().startsWith("hl7.fhir.r4b.") ||
npm.name().startsWith("hl7.fhir.r5."));
}
}

View File

@ -16,6 +16,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.xml.sax.SAXException;
public class SearchParameterAnalysis implements IPackageVisitorProcessor {
@ -97,7 +98,7 @@ public class SearchParameterAnalysis implements IPackageVisitorProcessor {
private Map<String, SearchParameterVersionAnalysis> versions = new HashMap<String, SearchParameterAnalysis.SearchParameterVersionAnalysis>();
@Override
public void processResource(String pid, String version, String type, byte[] content) throws FHIRException {
public void processResource(String pid, NpmPackage npm, String version, String type, String id, byte[] content) throws FHIRException {
// System.out.println("v"+version+" "+type+" from "+pid);
boolean core = pid.startsWith("hl7.fhir.r") && (pid.contains(".core") || pid.contains(".examples"));
version = VersionUtilities.getMajMin(version);

View File

@ -224,7 +224,7 @@ public class OperationDefinition14_50 {
if (src.hasDocumentation())
tgt.setDocumentationElement(String14_50.convertStringToMarkdown(src.getDocumentationElement()));
if (src.hasType())
tgt.setType(Enumerations.FHIRTypes.fromCode(src.getType()));
tgt.setType(Enumerations.FHIRTypes.fromCode(fixTypeCode(src.getType())));
if (src.hasSearchType())
tgt.setSearchTypeElement(Enumerations14_50.convertSearchParamType(src.getSearchTypeElement()));
tgt.addTargetProfile(src.getProfile().getReference());
@ -235,6 +235,14 @@ public class OperationDefinition14_50 {
return tgt;
}
private static String fixTypeCode(String type) {
if ("Type".equals(type)) {
return "DataType";
} else {
return type;
}
}
static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationKind> convertOperationKind(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.OperationDefinition.OperationKind> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;

View File

@ -61,7 +61,7 @@ public class CapabilityStatement30_50 {
if (src.hasImplementation())
tgt.setImplementation(convertCapabilityStatementImplementationComponent(src.getImplementation()));
if (src.hasFhirVersion())
tgt.setFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
tgt.setFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(fixCode(src.getFhirVersion())));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(new org.hl7.fhir.r5.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
@ -78,6 +78,14 @@ public class CapabilityStatement30_50 {
return tgt;
}
private static String fixCode(String v) {
if ("STU3".equals(v)) {
return "3.0.2";
} else {
return v;
}
}
public static org.hl7.fhir.dstu3.model.CapabilityStatement convertCapabilityStatement(org.hl7.fhir.r5.model.CapabilityStatement src) throws FHIRException {
if (src == null)
return null;

View File

@ -230,6 +230,24 @@ public class Enumerations40_50 {
case _4_3_0:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0);
break;
case _4_3_0_CIBUILD:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_CIBUILD);
break;
case _4_3_0_SNAPSHOT1:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1);
break;
case _5_0_0:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0);
break;
case _5_0_0SNAPSHOT1:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT1);
break;
case _5_0_0SNAPSHOT2:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT2);
break;
case _5_0_0BALLOT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0BALLOT);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.NULL);
break;
@ -318,6 +336,25 @@ public class Enumerations40_50 {
case _4_3_0:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0);
break;
case _4_3_0_CIBUILD:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_CIBUILD);
break;
case _4_3_0_SNAPSHOT1:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1);
break;
case _5_0_0:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0);
break;
case _5_0_0SNAPSHOT1:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT1);
break;
case _5_0_0SNAPSHOT2:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT2);
break;
case _5_0_0BALLOT:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0BALLOT);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.NULL);
break;

View File

@ -17,6 +17,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.UrlType;
import org.hl7.fhir.r5.model.ImplementationGuide;
import org.hl7.fhir.utilities.Utilities;
@ -51,7 +52,10 @@ import org.hl7.fhir.utilities.Utilities;
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class ImplementationGuide40_50 {
static final String EXT_IG_DEFINITION_PAGE_NAME = "http://hl7.org/fhir/tools/StructureDefinition/ig-page-name";
static final String EXT_IG_DEFINITION_PARAMETER = "http://hl7.org/fhir/tools/StructureDefinition/ig-parameter";
static final String EXT_IG_DEFINITION_PARAM_URL_EXT = "http://hl7.org/fhir/tools/CodeSystem/ig-parameters";
static final String EXT_IG_DEFINITION_PARAM_URL_BASE = "http://hl7.org/fhir/guide-parameter-code";
public static org.hl7.fhir.r5.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.r4.model.ImplementationGuide src) throws FHIRException {
if (src == null)
@ -2321,6 +2325,7 @@ public class ImplementationGuide40_50 {
for (org.hl7.fhir.r4.model.Extension e : org.hl7.fhir.r4.utils.ToolingExtensions.getExtensions(src, EXT_IG_DEFINITION_PARAMETER)) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent p = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
p.getCode().setCode(org.hl7.fhir.r4.utils.ToolingExtensions.readStringExtension(e, "code"));
p.getCode().setSystem(EXT_IG_DEFINITION_PARAM_URL_EXT);
p.setValue(org.hl7.fhir.r4.utils.ToolingExtensions.readStringExtension(e, "value"));
tgt.addParameter(p);
}
@ -2428,11 +2433,22 @@ public class ImplementationGuide40_50 {
if (src == null)
return null;
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasNameReference())
tgt.setName(src.getNameReference().getReference());
if (src.hasNameUrlType())
tgt.setName(src.getNameUrlType().getValue());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt, EXT_IG_DEFINITION_PAGE_NAME);
if (src.hasExtension(EXT_IG_DEFINITION_PAGE_NAME)) {
tgt.setNameElement(Url40_50.convertUrl((UrlType) src.getExtensionByUrl(EXT_IG_DEFINITION_PAGE_NAME).getValue()));
}
if (src.hasNameReference()) {
tgt.setSource(new org.hl7.fhir.r5.model.UrlType(src.getNameReference().getReference()));
if (!tgt.hasName()) {
tgt.setName(tgt.getSourceUrlType().asStringValue());
}
}
if (src.hasNameUrlType()) {
tgt.setSource(Url40_50.convertUrl(src.getNameUrlType()));
if (!tgt.hasName()) {
tgt.setName(tgt.getSourceUrlType().asStringValue());
}
}
if (src.hasTitle())
tgt.setTitleElement(String40_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2447,8 +2463,12 @@ public class ImplementationGuide40_50 {
return null;
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasName())
tgt.setName(new org.hl7.fhir.r4.model.UrlType(src.getName()));
if (src.hasName()) {
tgt.addExtension().setUrl(EXT_IG_DEFINITION_PAGE_NAME).setValue(Url40_50.convertUrl(src.getNameElement()));
}
if (src.hasSourceUrlType()) {
tgt.setName(Url40_50.convertUrl(src.getSourceUrlType()));
}
if (src.hasTitle())
tgt.setTitleElement(String40_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2513,8 +2533,14 @@ public class ImplementationGuide40_50 {
return null;
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasCode())
if (src.hasCode()) {
tgt.getCode().setCode(src.getCode());
if (Utilities.existsInList(tgt.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) {
tgt.getCode().setSystem(EXT_IG_DEFINITION_PARAM_URL_BASE);
} else {
tgt.getCode().setSystem(EXT_IG_DEFINITION_PARAM_URL_EXT);
}
}
if (src.hasValue())
tgt.setValueElement(String40_50.convertString(src.getValueElement()));
return tgt;

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -38,6 +38,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -53,7 +54,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -63,7 +64,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
public Type parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public Type parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -72,7 +73,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource));
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -83,7 +84,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Type type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Type type, String typeName) throws IOException {

View File

@ -0,0 +1,62 @@
package org.hl7.fhir.dstu2.formats;
import org.hl7.fhir.dstu2.model.Resource;
import org.hl7.fhir.dstu2.model.Type;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public Type parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, Type type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Type.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -38,6 +38,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -53,7 +54,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -62,7 +63,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public Type parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public Type parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -71,7 +72,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource));
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -82,7 +83,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Type type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Type type, String typeName) throws IOException {

View File

@ -0,0 +1,62 @@
package org.hl7.fhir.dstu2016may.formats;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu2016may.model.Resource;
import org.hl7.fhir.dstu2016may.model.Type;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public Type parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, Type type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Type.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -38,6 +38,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -53,7 +54,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -62,7 +63,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public Type parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public Type parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -71,7 +72,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource));
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -82,7 +83,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Type type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Type type, String typeName) throws IOException {

View File

@ -0,0 +1,62 @@
package org.hl7.fhir.dstu3.formats;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public Type parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, Type type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Type.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -103,6 +103,7 @@ import org.hl7.fhir.r4.utils.formats.XLSXWriter;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.TerminologyServiceOptions;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
@ -776,7 +777,7 @@ public class ProfileUtilities extends TranslatingUtilities {
if (typeList.get(0).type != null) {
// this is the short cut method, we've just dived in and specified a type slice.
// in R3 (and unpatched R4, as a workaround right now...
if (!FHIRVersion.isR4Plus(context.getVersion()) || !newSlicingProcessing) { // newSlicingProcessing is a work around for editorial loop dependency
if (!VersionUtilities.isR4Plus(context.getVersion()) || !newSlicingProcessing) { // newSlicingProcessing is a work around for editorial loop dependency
// we insert a cloned element with the right types at the start of the diffMatches
ElementDefinition ed = new ElementDefinition();
ed.setPath(determineTypeSlicePath(diffMatches.get(0).getPath(), cpath));

View File

@ -38,6 +38,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -53,7 +54,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -62,11 +63,11 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public Type parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public Type parseAnyType(String input, String typeName) throws FHIRFormatError, IOException {
return parseAnyType(input.getBytes("UTF-8"), typeName);
return parseAnyType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public Type parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -80,7 +81,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource), "UTF-8");
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -91,7 +92,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Type type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Type type, String typeName) throws IOException {

View File

@ -9957,6 +9957,10 @@ The primary difference between a medication statement and a medication administr
*/
_0_11,
/**
* DSTU 1 version.
*/
_0_0,
/**
* DSTU 1 Official version.
*/
_0_0_80,
@ -9969,14 +9973,26 @@ The primary difference between a medication statement and a medication administr
*/
_0_0_82,
/**
* January 2015 Ballot.
*/
_0_4,
/**
* Draft For Comment (January 2015 Ballot).
*/
_0_4_0,
/**
* May 2015 Ballot.
*/
_0_5,
/**
* DSTU 2 Ballot version (May 2015 Ballot).
*/
_0_5_0,
/**
* DSTU 2 version.
*/
_1_0,
/**
* DSTU 2 QA Preview + CQIF Ballot (Sep 2015).
*/
_1_0_0,
@ -9989,22 +10005,42 @@ The primary difference between a medication statement and a medication administr
*/
_1_0_2,
/**
* GAO Ballot version.
*/
_1_1,
/**
* GAO Ballot + draft changes to main FHIR standard.
*/
_1_1_0,
/**
* Connectathon 12 (Montreal) version.
*/
_1_4,
/**
* CQF on FHIR Ballot + Connectathon 12 (Montreal).
*/
_1_4_0,
/**
* Connectathon 13 (Baltimore) version.
*/
_1_6,
/**
* FHIR STU3 Ballot + Connectathon 13 (Baltimore).
*/
_1_6_0,
/**
* Connectathon 14 (San Antonio) version.
*/
_1_8,
/**
* FHIR STU3 Candidate + Connectathon 14 (San Antonio).
*/
_1_8_0,
/**
* STU3 version.
*/
_3_0,
/**
* FHIR Release 3 (STU).
*/
_3_0_0,
@ -10017,28 +10053,110 @@ The primary difference between a medication statement and a medication administr
*/
_3_0_2,
/**
* R4 Ballot #1.
* R4 Ballot #1 version.
*/
_3_3,
/**
* R4 Ballot #1 + Connectaton 18 (Cologne).
*/
_3_3_0,
/**
* R4 Ballot #2.
* R4 Ballot #2 version.
*/
_3_5,
/**
* R4 Ballot #2 + Connectathon 19 (Baltimore).
*/
_3_5_0,
/**
* R4 version.
*/
_4_0,
/**
* FHIR Release 4 (Normative + STU).
*/
_4_0_0,
/**
* added to help the parsers
* FHIR Release 4 (Normative + STU) with 1 technical errata.
*/
_4_0_1,
/**
* R4B - manually added
* R4B Ballot #1 version.
*/
_4_1,
/**
* R4B Ballot #1 + Connectathon 27 (Virtual).
*/
_4_1_0,
_4_3_0_SNAPSHOT1,
_4_3_0_CIBUILD,
/**
* R5 Preview #1 version.
*/
_4_2,
/**
* R5 Preview #1 + Connectathon 23 (Sydney).
*/
_4_2_0,
/**
* R4B version.
*/
_4_3,
/**
* FHIR Release 4B (Normative + STU).
*/
_4_3_0,
/**
* R5 Preview #2 version.
*/
_4_4,
/**
* R5 Preview #2 + Connectathon 24 (Virtual).
*/
_4_4_0,
/**
* R5 Preview #3 version.
*/
_4_5,
/**
* R5 Preview #3 + Connectathon 25 (Virtual).
*/
_4_5_0,
/**
* R5 Draft Ballot version.
*/
_4_6,
/**
* R5 Draft Ballot + Connectathon 27 (Virtual).
*/
_4_6_0,
/**
* R5 Versions.
*/
_5_0,
/**
* R5 Final Version.
*/
_5_0_0,
/**
* R5 Rolling ci-build.
*/
_5_0_0CIBUILD,
/**
* R5 Preview #2.
*/
_5_0_0SNAPSHOT1,
/**
* R5 Interim tooling stage.
*/
_5_0_0SNAPSHOT2,
/**
* R5 Ballot.
*/
_5_0_0BALLOT,
/**
* added to help the parsers
*/
NULL;
public static FHIRVersion fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
@ -10051,57 +10169,220 @@ The primary difference between a medication statement and a medication administr
return _0_06;
if ("0.11".equals(codeString))
return _0_11;
if ("0.0".equals(codeString))
return _0_0;
if ("0.0.80".equals(codeString))
return _0_0_80;
if ("0.0.81".equals(codeString))
return _0_0_81;
if ("0.0.82".equals(codeString))
return _0_0_82;
if ("0.4".equals(codeString))
return _0_4;
if ("0.4.0".equals(codeString))
return _0_4_0;
if ("0.5".equals(codeString))
return _0_5;
if ("0.5.0".equals(codeString))
return _0_5_0;
if ("1.0".equals(codeString))
return _1_0;
if ("1.0.0".equals(codeString))
return _1_0_0;
if ("1.0.1".equals(codeString))
return _1_0_1;
if ("1.0.2".equals(codeString))
return _1_0_2;
if ("1.1".equals(codeString))
return _1_1;
if ("1.1.0".equals(codeString))
return _1_1_0;
if ("1.4".equals(codeString))
return _1_4;
if ("1.4.0".equals(codeString))
return _1_4_0;
if ("1.6".equals(codeString))
return _1_6;
if ("1.6.0".equals(codeString))
return _1_6_0;
if ("1.8".equals(codeString))
return _1_8;
if ("1.8.0".equals(codeString))
return _1_8_0;
if ("3.0".equals(codeString))
return _3_0;
if ("3.0.0".equals(codeString))
return _3_0_0;
if ("3.0.1".equals(codeString))
return _3_0_1;
if ("3.0.2".equals(codeString))
return _3_0_2;
if ("3.3".equals(codeString))
return _3_3;
if ("3.3.0".equals(codeString))
return _3_3_0;
if ("3.5".equals(codeString))
return _3_5;
if ("3.5.0".equals(codeString))
return _3_5_0;
if ("4.0".equals(codeString))
return _4_0;
if ("4.0.0".equals(codeString))
return _4_0_0;
if ("4.0.1".equals(codeString))
return _4_0_1;
if ("4.1".equals(codeString))
return _4_1;
if ("4.1.0".equals(codeString))
return _4_1_0;
if ("4.3.0-snapshot1".equals(codeString))
return _4_3_0_SNAPSHOT1;
if ("4.3.0-cibuild".equals(codeString))
return _4_3_0_CIBUILD;
if ("4.2".equals(codeString))
return _4_2;
if ("4.2.0".equals(codeString))
return _4_2_0;
if ("4.3".equals(codeString))
return _4_3;
if ("4.3.0".equals(codeString))
return _4_3_0;
if ("4.4".equals(codeString))
return _4_4;
if ("4.4.0".equals(codeString))
return _4_4_0;
if ("4.5".equals(codeString))
return _4_5;
if ("4.5.0".equals(codeString))
return _4_5_0;
if ("4.6".equals(codeString))
return _4_6;
if ("4.6.0".equals(codeString))
return _4_6_0;
if ("5.0".equals(codeString))
return _5_0;
if ("5.0.0".equals(codeString))
return _5_0_0;
if ("5.0.0-cibuild".equals(codeString))
return _5_0_0CIBUILD;
if ("5.0.0-snapshot1".equals(codeString))
return _5_0_0SNAPSHOT1;
if ("5.0.0-snapshot2".equals(codeString))
return _5_0_0SNAPSHOT2;
if ("5.0.0-ballot".equals(codeString))
return _5_0_0BALLOT;
throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
}
@Override
public String toString() {
return toCode();
public static boolean isValidCode(String codeString) {
if (codeString == null || "".equals(codeString))
return false;
if ("0.01".equals(codeString))
return true;
if ("0.05".equals(codeString))
return true;
if ("0.06".equals(codeString))
return true;
if ("0.11".equals(codeString))
return true;
if ("0.0".equals(codeString))
return true;
if ("0.0.80".equals(codeString))
return true;
if ("0.0.81".equals(codeString))
return true;
if ("0.0.82".equals(codeString))
return true;
if ("0.4".equals(codeString))
return true;
if ("0.4.0".equals(codeString))
return true;
if ("0.5".equals(codeString))
return true;
if ("0.5.0".equals(codeString))
return true;
if ("1.0".equals(codeString))
return true;
if ("1.0.0".equals(codeString))
return true;
if ("1.0.1".equals(codeString))
return true;
if ("1.0.2".equals(codeString))
return true;
if ("1.1".equals(codeString))
return true;
if ("1.1.0".equals(codeString))
return true;
if ("1.4".equals(codeString))
return true;
if ("1.4.0".equals(codeString))
return true;
if ("1.6".equals(codeString))
return true;
if ("1.6.0".equals(codeString))
return true;
if ("1.8".equals(codeString))
return true;
if ("1.8.0".equals(codeString))
return true;
if ("3.0".equals(codeString))
return true;
if ("3.0.0".equals(codeString))
return true;
if ("3.0.1".equals(codeString))
return true;
if ("3.0.2".equals(codeString))
return true;
if ("3.3".equals(codeString))
return true;
if ("3.3.0".equals(codeString))
return true;
if ("3.5".equals(codeString))
return true;
if ("3.5.0".equals(codeString))
return true;
if ("4.0".equals(codeString))
return true;
if ("4.0.0".equals(codeString))
return true;
if ("4.0.1".equals(codeString))
return true;
if ("4.1".equals(codeString))
return true;
if ("4.1.0".equals(codeString))
return true;
if ("4.2".equals(codeString))
return true;
if ("4.2.0".equals(codeString))
return true;
if ("4.3".equals(codeString))
return true;
if ("4.3.0".equals(codeString))
return true;
if ("4.4".equals(codeString))
return true;
if ("4.4.0".equals(codeString))
return true;
if ("4.5".equals(codeString))
return true;
if ("4.5.0".equals(codeString))
return true;
if ("4.6".equals(codeString))
return true;
if ("4.6.0".equals(codeString))
return true;
if ("5.0".equals(codeString))
return true;
if ("5.0.0".equals(codeString))
return true;
if ("5.0.0-cibuild".equals(codeString))
return true;
if ("5.0.0-snapshot1".equals(codeString))
return true;
if ("5.0.0-snapshot2".equals(codeString))
return true;
if ("5.0.0-ballot".equals(codeString))
return true;
return false;
}
public String toCode() {
switch (this) {
@ -10109,30 +10390,57 @@ The primary difference between a medication statement and a medication administr
case _0_05: return "0.05";
case _0_06: return "0.06";
case _0_11: return "0.11";
case _0_0: return "0.0";
case _0_0_80: return "0.0.80";
case _0_0_81: return "0.0.81";
case _0_0_82: return "0.0.82";
case _0_4: return "0.4";
case _0_4_0: return "0.4.0";
case _0_5: return "0.5";
case _0_5_0: return "0.5.0";
case _1_0: return "1.0";
case _1_0_0: return "1.0.0";
case _1_0_1: return "1.0.1";
case _1_0_2: return "1.0.2";
case _1_1: return "1.1";
case _1_1_0: return "1.1.0";
case _1_4: return "1.4";
case _1_4_0: return "1.4.0";
case _1_6: return "1.6";
case _1_6_0: return "1.6.0";
case _1_8: return "1.8";
case _1_8_0: return "1.8.0";
case _3_0: return "3.0";
case _3_0_0: return "3.0.0";
case _3_0_1: return "3.0.1";
case _3_0_2: return "3.0.2";
case _3_3: return "3.3";
case _3_3_0: return "3.3.0";
case _3_5: return "3.5";
case _3_5_0: return "3.5.0";
case _4_0: return "4.0";
case _4_0_0: return "4.0.0";
case _4_0_1: return "4.0.1";
case _4_1: return "4.1";
case _4_1_0: return "4.1.0";
case _4_3_0_SNAPSHOT1: return "4.3.0-snapshot1";
case _4_3_0_CIBUILD: return "4.3.0-cibuild";
case _4_2: return "4.2";
case _4_2_0: return "4.2.0";
case _4_3: return "4.3";
case _4_3_0: return "4.3.0";
case _4_4: return "4.4";
case _4_4_0: return "4.4.0";
case _4_5: return "4.5";
case _4_5_0: return "4.5.0";
case _4_6: return "4.6";
case _4_6_0: return "4.6.0";
case _5_0: return "5.0";
case _5_0_0: return "5.0.0";
case _5_0_0CIBUILD: return "5.0.0-cibuild";
case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
case _5_0_0BALLOT: return "5.0.0-ballot";
case NULL: return null;
default: return "?";
}
@ -10143,29 +10451,57 @@ The primary difference between a medication statement and a medication administr
case _0_05: return "http://hl7.org/fhir/FHIR-version";
case _0_06: return "http://hl7.org/fhir/FHIR-version";
case _0_11: return "http://hl7.org/fhir/FHIR-version";
case _0_0: return "http://hl7.org/fhir/FHIR-version";
case _0_0_80: return "http://hl7.org/fhir/FHIR-version";
case _0_0_81: return "http://hl7.org/fhir/FHIR-version";
case _0_0_82: return "http://hl7.org/fhir/FHIR-version";
case _0_4: return "http://hl7.org/fhir/FHIR-version";
case _0_4_0: return "http://hl7.org/fhir/FHIR-version";
case _0_5: return "http://hl7.org/fhir/FHIR-version";
case _0_5_0: return "http://hl7.org/fhir/FHIR-version";
case _1_0: return "http://hl7.org/fhir/FHIR-version";
case _1_0_0: return "http://hl7.org/fhir/FHIR-version";
case _1_0_1: return "http://hl7.org/fhir/FHIR-version";
case _1_0_2: return "http://hl7.org/fhir/FHIR-version";
case _1_1: return "http://hl7.org/fhir/FHIR-version";
case _1_1_0: return "http://hl7.org/fhir/FHIR-version";
case _1_4: return "http://hl7.org/fhir/FHIR-version";
case _1_4_0: return "http://hl7.org/fhir/FHIR-version";
case _1_6: return "http://hl7.org/fhir/FHIR-version";
case _1_6_0: return "http://hl7.org/fhir/FHIR-version";
case _1_8: return "http://hl7.org/fhir/FHIR-version";
case _1_8_0: return "http://hl7.org/fhir/FHIR-version";
case _3_0: return "http://hl7.org/fhir/FHIR-version";
case _3_0_0: return "http://hl7.org/fhir/FHIR-version";
case _3_0_1: return "http://hl7.org/fhir/FHIR-version";
case _3_0_2: return "http://hl7.org/fhir/FHIR-version";
case _3_3: return "http://hl7.org/fhir/FHIR-version";
case _3_3_0: return "http://hl7.org/fhir/FHIR-version";
case _3_5: return "http://hl7.org/fhir/FHIR-version";
case _3_5_0: return "http://hl7.org/fhir/FHIR-version";
case _4_0: return "http://hl7.org/fhir/FHIR-version";
case _4_0_0: return "http://hl7.org/fhir/FHIR-version";
case _4_0_1: return "http://hl7.org/fhir/FHIR-version";
case _4_1: return "http://hl7.org/fhir/FHIR-version";
case _4_1_0: return "http://hl7.org/fhir/FHIR-version";
case _4_3_0_SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
case _4_3_0_CIBUILD: return "http://hl7.org/fhir/FHIR-version";
case _4_2: return "http://hl7.org/fhir/FHIR-version";
case _4_2_0: return "http://hl7.org/fhir/FHIR-version";
case _4_3: return "http://hl7.org/fhir/FHIR-version";
case _4_3_0: return "http://hl7.org/fhir/FHIR-version";
case _4_4: return "http://hl7.org/fhir/FHIR-version";
case _4_4_0: return "http://hl7.org/fhir/FHIR-version";
case _4_5: return "http://hl7.org/fhir/FHIR-version";
case _4_5_0: return "http://hl7.org/fhir/FHIR-version";
case _4_6: return "http://hl7.org/fhir/FHIR-version";
case _4_6_0: return "http://hl7.org/fhir/FHIR-version";
case _5_0: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0SNAPSHOT2: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0BALLOT: return "http://hl7.org/fhir/FHIR-version";
case NULL: return null;
default: return "?";
}
@ -10176,29 +10512,57 @@ The primary difference between a medication statement and a medication administr
case _0_05: return "1st Draft for Comment (Sept 2012 Ballot).";
case _0_06: return "2nd Draft for Comment (January 2013 Ballot).";
case _0_11: return "DSTU 1 Ballot version.";
case _0_0: return "DSTU 1 version.";
case _0_0_80: return "DSTU 1 Official version.";
case _0_0_81: return "DSTU 1 Official version Technical Errata #1.";
case _0_0_82: return "DSTU 1 Official version Technical Errata #2.";
case _0_4: return "January 2015 Ballot.";
case _0_4_0: return "Draft For Comment (January 2015 Ballot).";
case _0_5: return "May 2015 Ballot.";
case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot).";
case _1_0: return "DSTU 2 version.";
case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015).";
case _1_0_1: return "DSTU 2 (Official version).";
case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata.";
case _1_1: return "GAO Ballot version.";
case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard.";
case _1_4: return "Connectathon 12 (Montreal) version.";
case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal).";
case _1_6: return "Connectathon 13 (Baltimore) version.";
case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore).";
case _1_8: return "Connectathon 14 (San Antonio) version.";
case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio).";
case _3_0: return "STU3 version.";
case _3_0_0: return "FHIR Release 3 (STU).";
case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata.";
case _3_0_2: return "FHIR Release 3 (STU) with 2 technical errata.";
case _3_3_0: return "R4 Ballot #1.";
case _3_5_0: return "R4 Ballot #2.";
case _3_3: return "R4 Ballot #1 version.";
case _3_3_0: return "R4 Ballot #1 + Connectaton 18 (Cologne).";
case _3_5: return "R4 Ballot #2 version.";
case _3_5_0: return "R4 Ballot #2 + Connectathon 19 (Baltimore).";
case _4_0: return "R4 version.";
case _4_0_0: return "FHIR Release 4 (Normative + STU).";
case _4_0_1: return "FHIR Release 4 Technical Correction #1.";
case _4_1_0: return "FHIR Release 4B Ballot #1";
case _4_0_1: return "FHIR Release 4 (Normative + STU) with 1 technical errata.";
case _4_1: return "R4B Ballot #1 version.";
case _4_1_0: return "R4B Ballot #1 + Connectathon 27 (Virtual).";
case _4_2: return "R5 Preview #1 version.";
case _4_2_0: return "R5 Preview #1 + Connectathon 23 (Sydney).";
case _4_3_0_SNAPSHOT1: return "FHIR Release 4B Snapshot #1";
case _4_3_0_CIBUILD: return "FHIR Release 4B CI-Builld";
case _4_3_0: return "FHIR Release 4B";
case _4_3: return "R4B version.";
case _4_3_0: return "FHIR Release 4B (Normative + STU).";
case _4_4: return "R5 Preview #2 version.";
case _4_4_0: return "R5 Preview #2 + Connectathon 24 (Virtual).";
case _4_5: return "R5 Preview #3 version.";
case _4_5_0: return "R5 Preview #3 + Connectathon 25 (Virtual).";
case _4_6: return "R5 Draft Ballot version.";
case _4_6_0: return "R5 Draft Ballot + Connectathon 27 (Virtual).";
case _5_0: return "R5 Versions.";
case _5_0_0: return "R5 Final Version.";
case _5_0_0CIBUILD: return "R5 Rolling ci-build.";
case _5_0_0SNAPSHOT1: return "R5 Preview #2.";
case _5_0_0SNAPSHOT2: return "R5 Interim tooling stage.";
case _5_0_0BALLOT: return "R5 Ballot.";
case NULL: return null;
default: return "?";
}
@ -10209,39 +10573,61 @@ The primary difference between a medication statement and a medication administr
case _0_05: return "0.05";
case _0_06: return "0.06";
case _0_11: return "0.11";
case _0_0: return "0.0";
case _0_0_80: return "0.0.80";
case _0_0_81: return "0.0.81";
case _0_0_82: return "0.0.82";
case _0_4: return "0.4";
case _0_4_0: return "0.4.0";
case _0_5: return "0.5";
case _0_5_0: return "0.5.0";
case _1_0: return "1.0";
case _1_0_0: return "1.0.0";
case _1_0_1: return "1.0.1";
case _1_0_2: return "1.0.2";
case _1_1: return "1.1";
case _1_1_0: return "1.1.0";
case _1_4: return "1.4";
case _1_4_0: return "1.4.0";
case _1_6: return "1.6";
case _1_6_0: return "1.6.0";
case _1_8: return "1.8";
case _1_8_0: return "1.8.0";
case _3_0: return "3.0";
case _3_0_0: return "3.0.0";
case _3_0_1: return "3.0.1";
case _3_0_2: return "3.0.2";
case _3_3: return "3.3";
case _3_3_0: return "3.3.0";
case _3_5: return "3.5";
case _3_5_0: return "3.5.0";
case _4_0: return "4.0";
case _4_0_0: return "4.0.0";
case _4_0_1: return "4.0.1";
case _4_1: return "4.1";
case _4_1_0: return "4.1.0";
case _4_2: return "4.2";
case _4_2_0: return "4.2.0";
case _4_3: return "4.3";
case _4_3_0_SNAPSHOT1: return "4.3.0-snapshot";
case _4_3_0_CIBUILD: return "4.3.0-cibuild";
case _4_3_0: return "4.3.0";
case _4_4: return "4.4";
case _4_4_0: return "4.4.0";
case _4_5: return "4.5";
case _4_5_0: return "4.5.0";
case _4_6: return "4.6";
case _4_6_0: return "4.6.0";
case _5_0: return "5.0";
case _5_0_0: return "5.0.0";
case _5_0_0CIBUILD: return "5.0.0-cibuild";
case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
case _5_0_0BALLOT: return "5.0.0-ballot";
case NULL: return null;
default: return "?";
}
}
public String toCode(int len) {
return toCode().substring(0, len);
}
public static boolean isR4Plus(String version) {
return false;
}
}
public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
@ -10265,44 +10651,96 @@ The primary difference between a medication statement and a medication administr
return FHIRVersion._0_0_82;
if ("0.4.0".equals(codeString))
return FHIRVersion._0_4_0;
if ("0.5".equals(codeString))
return FHIRVersion._0_5;
if ("0.5.0".equals(codeString))
return FHIRVersion._0_5_0;
if ("1.0".equals(codeString))
return FHIRVersion._1_0;
if ("1.0.0".equals(codeString))
return FHIRVersion._1_0_0;
if ("1.0.1".equals(codeString))
return FHIRVersion._1_0_1;
if ("1.0.2".equals(codeString))
return FHIRVersion._1_0_2;
if ("1.1".equals(codeString))
return FHIRVersion._1_1;
if ("1.1.0".equals(codeString))
return FHIRVersion._1_1_0;
if ("1.4".equals(codeString))
return FHIRVersion._1_4;
if ("1.4.0".equals(codeString))
return FHIRVersion._1_4_0;
if ("1.6".equals(codeString))
return FHIRVersion._1_6;
if ("1.6.0".equals(codeString))
return FHIRVersion._1_6_0;
if ("1.8".equals(codeString))
return FHIRVersion._1_8;
if ("1.8.0".equals(codeString))
return FHIRVersion._1_8_0;
if ("3.0".equals(codeString))
return FHIRVersion._3_0;
if ("3.0.0".equals(codeString))
return FHIRVersion._3_0_0;
if ("3.0.1".equals(codeString))
return FHIRVersion._3_0_1;
if ("3.0.2".equals(codeString))
return FHIRVersion._3_0_2;
if ("3.3".equals(codeString))
return FHIRVersion._3_3;
if ("3.3.0".equals(codeString))
return FHIRVersion._3_3_0;
if ("3.5".equals(codeString))
return FHIRVersion._3_5;
if ("3.5.0".equals(codeString))
return FHIRVersion._3_5_0;
if ("4.0".equals(codeString))
return FHIRVersion._4_0;
if ("4.0.0".equals(codeString))
return FHIRVersion._4_0_0;
if ("4.0.1".equals(codeString))
return FHIRVersion._4_0_1;
if ("4.1".equals(codeString))
return FHIRVersion._4_1;
if ("4.1.0".equals(codeString))
return FHIRVersion._4_1_0;
if ("4.2".equals(codeString))
return FHIRVersion._4_2;
if ("4.2.0".equals(codeString))
return FHIRVersion._4_2_0;
if ("4.3.0-snapshot1".equalsIgnoreCase(codeString))
return FHIRVersion._4_3_0_SNAPSHOT1;
if ("4.3.0-cibuild".equalsIgnoreCase(codeString))
return FHIRVersion._4_3_0_CIBUILD;
if ("4.3.0".equalsIgnoreCase(codeString))
if ("4.3".equals(codeString))
return FHIRVersion._4_3;
if ("4.3.0".equals(codeString))
return FHIRVersion._4_3_0;
if ("4.4".equals(codeString))
return FHIRVersion._4_4;
if ("4.4.0".equals(codeString))
return FHIRVersion._4_4_0;
if ("4.5".equals(codeString))
return FHIRVersion._4_5;
if ("4.5.0".equals(codeString))
return FHIRVersion._4_5_0;
if ("4.6".equals(codeString))
return FHIRVersion._4_6;
if ("4.6.0".equals(codeString))
return FHIRVersion._4_6_0;
if ("5.0".equals(codeString))
return FHIRVersion._5_0;
if ("5.0.0".equals(codeString))
return FHIRVersion._5_0_0;
if ("5.0.0-cibuild".equals(codeString))
return FHIRVersion._5_0_0CIBUILD;
if ("5.0.0-snapshot1".equals(codeString))
return FHIRVersion._5_0_0SNAPSHOT1;
if ("5.0.0-snapshot2".equals(codeString))
return FHIRVersion._5_0_0SNAPSHOT2;
if ("5.0.0-ballot".equals(codeString))
return FHIRVersion._5_0_0BALLOT;
throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
}
public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
@ -10321,52 +10759,108 @@ The primary difference between a medication statement and a medication administr
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_06);
if ("0.11".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_11);
if ("0.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0);
if ("0.0.80".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_80);
if ("0.0.81".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_81);
if ("0.0.82".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_82);
if ("0.4".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4);
if ("0.4.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4_0);
if ("0.5".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5);
if ("0.5.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5_0);
if ("1.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0);
if ("1.0.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_0);
if ("1.0.1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_1);
if ("1.0.2".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_2);
if ("1.1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1);
if ("1.1.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1_0);
if ("1.4".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4);
if ("1.4.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4_0);
if ("1.6".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6);
if ("1.6.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6_0);
if ("1.8".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8);
if ("1.8.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8_0);
if ("3.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0);
if ("3.0.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_0);
if ("3.0.1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_1);
if ("3.0.2".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_2);
if ("3.3".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3);
if ("3.3.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3_0);
if ("3.5".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5);
if ("3.5.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5_0);
if ("4.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0);
if ("4.0.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_0);
if ("4.0.1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_1);
if ("4.1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1);
if ("4.1.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1_0);
if ("4.2".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2);
if ("4.2.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2_0);
if ("4.3.0-snapshot1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0_SNAPSHOT1);
if ("4.3.0-cibuild".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0_CIBUILD);
if ("4.3".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3);
if ("4.3.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0);
if ("4.4".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_4);
if ("4.4.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_4_0);
if ("4.5".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_5);
if ("4.5.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_5_0);
if ("4.6".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_6);
if ("4.6.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_6_0);
if ("5.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0);
if ("5.0.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0);
if ("5.0.0-cibuild".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0CIBUILD);
if ("5.0.0-snapshot1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT1);
if ("5.0.0-snapshot2".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT2);
if ("5.0.0-ballot".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0BALLOT);
throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
}
public String toCode(FHIRVersion code) {
@ -10378,52 +10872,108 @@ The primary difference between a medication statement and a medication administr
return "0.06";
if (code == FHIRVersion._0_11)
return "0.11";
if (code == FHIRVersion._0_0)
return "0.0";
if (code == FHIRVersion._0_0_80)
return "0.0.80";
if (code == FHIRVersion._0_0_81)
return "0.0.81";
if (code == FHIRVersion._0_0_82)
return "0.0.82";
if (code == FHIRVersion._0_4)
return "0.4";
if (code == FHIRVersion._0_4_0)
return "0.4.0";
if (code == FHIRVersion._0_5)
return "0.5";
if (code == FHIRVersion._0_5_0)
return "0.5.0";
if (code == FHIRVersion._1_0)
return "1.0";
if (code == FHIRVersion._1_0_0)
return "1.0.0";
if (code == FHIRVersion._1_0_1)
return "1.0.1";
if (code == FHIRVersion._1_0_2)
return "1.0.2";
if (code == FHIRVersion._1_1)
return "1.1";
if (code == FHIRVersion._1_1_0)
return "1.1.0";
if (code == FHIRVersion._1_4)
return "1.4";
if (code == FHIRVersion._1_4_0)
return "1.4.0";
if (code == FHIRVersion._1_6)
return "1.6";
if (code == FHIRVersion._1_6_0)
return "1.6.0";
if (code == FHIRVersion._1_8)
return "1.8";
if (code == FHIRVersion._1_8_0)
return "1.8.0";
if (code == FHIRVersion._3_0)
return "3.0";
if (code == FHIRVersion._3_0_0)
return "3.0.0";
if (code == FHIRVersion._3_0_1)
return "3.0.1";
if (code == FHIRVersion._3_0_2)
return "3.0.2";
if (code == FHIRVersion._3_3)
return "3.3";
if (code == FHIRVersion._3_3_0)
return "3.3.0";
if (code == FHIRVersion._3_5)
return "3.5";
if (code == FHIRVersion._3_5_0)
return "3.5.0";
if (code == FHIRVersion._4_0)
return "4.0";
if (code == FHIRVersion._4_0_0)
return "4.0.0";
if (code == FHIRVersion._4_0_1)
return "4.0.1";
if (code == FHIRVersion._4_1)
return "4.1";
if (code == FHIRVersion._4_1_0)
return "4.1.0";
if (code == FHIRVersion._4_2)
return "4.2";
if (code == FHIRVersion._4_2_0)
return "4.2.0";
if (code == FHIRVersion._4_3)
return "4.3";
if (code == FHIRVersion._4_3_0_SNAPSHOT1)
return "4.3.0-snapshot1";
if (code == FHIRVersion._4_3_0_CIBUILD)
return "4.3.0-cibuild";
if (code == FHIRVersion._4_3_0)
return "4.3.0";
if (code == FHIRVersion._4_4)
return "4.4";
if (code == FHIRVersion._4_4_0)
return "4.4.0";
if (code == FHIRVersion._4_5)
return "4.5";
if (code == FHIRVersion._4_5_0)
return "4.5.0";
if (code == FHIRVersion._4_6)
return "4.6";
if (code == FHIRVersion._4_6_0)
return "4.6.0";
if (code == FHIRVersion._5_0)
return "5.0";
if (code == FHIRVersion._5_0_0)
return "5.0.0";
if (code == FHIRVersion._5_0_0CIBUILD)
return "5.0.0-cibuild";
if (code == FHIRVersion._5_0_0SNAPSHOT1)
return "5.0.0-snapshot1";
if (code == FHIRVersion._5_0_0SNAPSHOT2)
return "5.0.0-snapshot2";
if (code == FHIRVersion._5_0_0BALLOT)
return "5.0.0-ballot";
return "?";
}
public String toSystem(FHIRVersion code) {

View File

@ -0,0 +1,68 @@
package org.hl7.fhir.r4.formats;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r4.model.Type;
import org.hl7.fhir.r4.model.Resource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public Type parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public Type parseAnyType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, Type type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Type.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -19,7 +19,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -29,22 +29,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -4439,7 +4439,13 @@ public class ProfileUtilities extends TranslatingUtilities {
}
private boolean isBaseConstraint(ElementDefinitionConstraintComponent con) {
if (con == null) {
return false;
}
String key = con.getKey();
if (key == null) {
return false;
}
return key != null && key.startsWith("ele-") || key.startsWith("res-") || key.startsWith("ext-") || key.startsWith("dom-") || key.startsWith("dr-");
}

View File

@ -40,6 +40,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -56,7 +57,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -65,11 +66,11 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public DataType parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public DataType parseAnyType(String input, String typeName) throws FHIRFormatError, IOException {
return parseAnyType(input.getBytes("UTF-8"), typeName);
return parseAnyType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public DataType parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -83,7 +84,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource), "UTF-8");
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -94,7 +95,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(DataType type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(DataType type, String typeName) throws IOException {

View File

@ -242,7 +242,7 @@ public class RdfParser extends RdfParserBase {
}
protected void composeDataType(Complex t, String parentType, String name, DataType element, int index) {
composeDataType(t, parentType, name, element, index);
composeElement(t, parentType, name, element, index);
}

View File

@ -40,7 +40,7 @@ public class IGHelper {
public static final String EXT_MAPPING_CSV = ToolingExtensions.EXT_IGP_MAPPING_CSV;
public static final String EXT_BUNDLE = ToolingExtensions.EXT_IGP_BUNDLE;
public static final String EXT_RESOURCE_INFO = ToolingExtensions.EXT_IGP_RESOURCE_INFO;
public static final String EXT_CONTAINED_RESOURCE_INFO = ToolingExtensions.EXT_IGP_CONTAINED_RESOURCE_INFO;
// public static final String EXT_CONTAINED_RESOURCE_INFO = ToolingExtensions.EXT_IGP_CONTAINED_RESOURCE_INFO;
public static final String EXT_PRIVATE_BASE = ToolingExtensions.EXT_PRIVATE_BASE;
public static String readStringParameter(ImplementationGuideDefinitionComponent ig, String name) {

View File

@ -169,8 +169,8 @@ public class ToolingExtensions {
public static final String EXT_IGP_MAPPING_CSV = "http://hl7.org/fhir/StructureDefinition/igpublisher-mapping-csv";
public static final String EXT_IGP_BUNDLE = "http://hl7.org/fhir/StructureDefinition/igpublisher-bundle";
public static final String EXT_IGP_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/resource-information";
public static final String EXT_IGP_CONTAINED_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/contained-resource-information";
public static final String EXT_IGP_LOADVERSION = "http://hl7.org/fhir/StructureDefinition/igpublisher-loadversion";
// public static final String EXT_IGP_CONTAINED_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/contained-resource-information";
// public static final String EXT_IGP_LOADVERSION = "http://hl7.org/fhir/StructureDefinition/igpublisher-loadversion";
public static final String EXT_MAX_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet";
public static final String EXT_MIN_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet";
public static final String EXT_PROFILE_ELEMENT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element";

View File

@ -0,0 +1,67 @@
package org.hl7.fhir.r4b.formats;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r4b.model.DataType;
import org.hl7.fhir.r4b.model.Resource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public DataType parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public DataType parseAnyType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, DataType type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(DataType.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -35,6 +35,7 @@ import org.hl7.fhir.r5.model.Extension;
import org.hl7.fhir.r5.model.PrimitiveType;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
@ -263,8 +264,8 @@ public class CapabilityStatementComparer extends CanonicalResourceComparer {
}
private void compareExpectations(StructuralMatch<Element> combined, Element left, Element right, String path, CapabilityStatementComparison res, Element union, Element intersection) {
Extension l = left.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation");
Extension r = right.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation");
Extension l = left.getExtensionByUrl(ToolingExtensions.EXT_CAP_STMT_EXPECT);
Extension r = right.getExtensionByUrl(ToolingExtensions.EXT_CAP_STMT_EXPECT);
if (l != null || r != null) {
if (l == null) {
union.addExtension(r.copy());
@ -284,8 +285,8 @@ public class CapabilityStatementComparer extends CanonicalResourceComparer {
sm.getMessages().add(new ValidationMessage(Source.ProfileComparer, IssueType.INFORMATIONAL, path+".extension('http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation')", "Changed value for expectation: '"+ls+"' vs '"+rs+"'", IssueSeverity.WARNING));
String lowest = lower(ls, rs) ? ls : rs;
String highest = lower(ls, rs) ? rs : ls;
union.addExtension("http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation", new CodeType(lowest));
intersection.addExtension("http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation", new CodeType(highest));
union.addExtension(ToolingExtensions.EXT_CAP_STMT_EXPECT, new CodeType(lowest));
intersection.addExtension(ToolingExtensions.EXT_CAP_STMT_EXPECT, new CodeType(highest));
}
}
}

View File

@ -45,6 +45,7 @@ public class ComparisonRenderer implements IEvaluationContext {
private ComparisonSession session;
private Map<String, String> templates = new HashMap<>();
private String folder;
private String preamble;
public ComparisonRenderer(IWorkerContext contextLeft, IWorkerContext contextRight, String folder, ComparisonSession session) {
super();
@ -53,6 +54,14 @@ public class ComparisonRenderer implements IEvaluationContext {
this.folder = folder;
this.session = session;
}
public String getPreamble() {
return preamble;
}
public void setPreamble(String preamble) {
this.preamble = preamble;
}
public Map<String, String> getTemplates() {
return templates;
@ -61,6 +70,9 @@ public class ComparisonRenderer implements IEvaluationContext {
public File render(String leftName, String rightName) throws IOException {
dumpBinaries();
StringBuilder b = new StringBuilder();
if (preamble != null) {
b.append(preamble);
}
b.append("<table class=\"grid\">\r\n");
b.append(" <tr>\r\n");
b.append(" <td width=\"260\"><b>"+Utilities.escapeXml(leftName)+"</b></td>\r\n");

View File

@ -410,6 +410,13 @@ public class ProfileUtilities extends TranslatingUtilities {
public interface ProfileKnowledgeProvider {
class BindingResolution {
public BindingResolution(String display, String url) {
this.display = display;
this.url = url;
}
public BindingResolution() {
// TODO Auto-generated constructor stub
}
public String display;
public String url;
}
@ -750,14 +757,16 @@ public class ProfileUtilities extends TranslatingUtilities {
}
if (!Utilities.noString(b.toString())) {
String msg = "The profile "+derived.getUrl()+" has "+ce+" "+Utilities.pluralize("element", ce)+" in the differential ("+b.toString()+") that don't have a matching element in the snapshot: check that the path and definitions are legal in the differential (including order)";
System.out.println("Error in snapshot generation: "+msg);
if (!debug) {
System.out.println("Differential: ");
for (ElementDefinition ed : derived.getDifferential().getElement())
System.out.println(" "+ed.getId()+" = "+ed.getPath()+" : "+typeSummaryWithProfile(ed)+"["+ed.getMin()+".."+ed.getMax()+"]"+sliceSummary(ed)+" "+constraintSummary(ed));
System.out.println("Snapshot: ");
for (ElementDefinition ed : derived.getSnapshot().getElement())
System.out.println(" "+ed.getId()+" = "+ed.getPath()+" : "+typeSummaryWithProfile(ed)+"["+ed.getMin()+".."+ed.getMax()+"]"+sliceSummary(ed)+" "+constraintSummary(ed));
if (debug) {
System.out.println("Error in snapshot generation: "+msg);
if (!debug) {
System.out.println("Differential: ");
for (ElementDefinition ed : derived.getDifferential().getElement())
System.out.println(" "+ed.getId()+" = "+ed.getPath()+" : "+typeSummaryWithProfile(ed)+"["+ed.getMin()+".."+ed.getMax()+"]"+sliceSummary(ed)+" "+constraintSummary(ed));
System.out.println("Snapshot: ");
for (ElementDefinition ed : derived.getSnapshot().getElement())
System.out.println(" "+ed.getId()+" = "+ed.getPath()+" : "+typeSummaryWithProfile(ed)+"["+ed.getMin()+".."+ed.getMax()+"]"+sliceSummary(ed)+" "+constraintSummary(ed));
}
}
if (exception)
throw new DefinitionException(msg);
@ -2528,8 +2537,12 @@ public class ProfileUtilities extends TranslatingUtilities {
generateSnapshot(context.fetchTypeDefinition("Extension"), sd, sd.getUrl(), webUrl, sd.getName());
}
}
if (sd == null)
System.out.println("Failed to find referenced profile: " + type.getProfile());
if (sd == null) {
if (debug) {
System.out.println("Failed to find referenced profile: " + type.getProfile());
}
}
}
if (sd == null)
sd = context.fetchTypeDefinition(type.getWorkingCode());
@ -5244,8 +5257,8 @@ public class ProfileUtilities extends TranslatingUtilities {
for (ElementDefinitionConstraintComponent inv : definition.getConstraint()) {
if (!c.getPieces().isEmpty()) { c.addPiece(gen.new Piece("br")); }
c.getPieces().add(checkForNoChange(inv, gen.new Piece(null, inv.getKey()+": ", null).addStyle("font-weight:bold")));
if (inv.getHumanElement().hasExtension("http://hl7.org/fhir/StructureDefinition/rendering-markdown")) {
c.addMarkdown(inv.getHumanElement().getExtensionString("http://hl7.org/fhir/StructureDefinition/rendering-markdown"));
if (inv.getHumanElement().hasExtension(ToolingExtensions.EXT_REND_MD)) {
c.addMarkdown(inv.getHumanElement().getExtensionString(ToolingExtensions.EXT_REND_MD));
} else {
c.getPieces().add(checkForNoChange(inv, gen.new Piece(null, inv.getHuman(), null)));
}
@ -6720,8 +6733,9 @@ public class ProfileUtilities extends TranslatingUtilities {
}
public void setNewSlicingProcessing(boolean newSlicingProcessing) {
public ProfileUtilities setNewSlicingProcessing(boolean newSlicingProcessing) {
this.newSlicingProcessing = newSlicingProcessing;
return this;
}

View File

@ -238,8 +238,8 @@ public class XmlSchemaGenerator {
private String getNs(StructureDefinition sd) {
String ns = "http://hl7.org/fhir";
if (sd.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
ns = ToolingExtensions.readStringExtension(sd, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
if (sd.hasExtension(ToolingExtensions.EXT_XML_NAMESPACE))
ns = ToolingExtensions.readStringExtension(sd, ToolingExtensions.EXT_XML_NAMESPACE);
return ns;
}

View File

@ -29,8 +29,6 @@ package org.hl7.fhir.r5.context;
*/
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
@ -146,6 +144,8 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
private final List<String> loadedPackages = new ArrayList<>();
private boolean canNoTS;
private XVerExtensionManager xverManager;
private boolean allowLazyLoading = true;
private boolean suppressDebugMessages;
private SimpleWorkerContext() throws IOException, FHIRException {
super();
@ -476,7 +476,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
if ((types == null || types.length == 0) && loader != null) {
types = loader.getTypes();
}
if (VersionUtilities.isR2Ver(pi.fhirVersion()) || !pi.canLazyLoad()) {
if (VersionUtilities.isR2Ver(pi.fhirVersion()) || !pi.canLazyLoad() || !allowLazyLoading) {
// can't lazy load R2 because of valueset/codesystem implementation
if (types.length == 0) {
types = new String[] { "StructureDefinition", "ValueSet", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem" };
@ -680,9 +680,11 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
generateSnapshot(sd);
// new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path("[tmp]", "snapshot", tail(sd.getUrl())+".xml")), sd);
} catch (Exception e) {
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
if (true) {
e.printStackTrace();
if (!suppressDebugMessages) {
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
if (true) {
e.printStackTrace();
}
}
}
result.add(sd);
@ -780,7 +782,9 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
generateSnapshot(p);
} catch (Exception e) {
// not sure what to do in this case?
System.out.println("Unable to generate snapshot for "+uri+": "+e.getMessage());
if (!suppressDebugMessages) {
System.out.println("Unable to generate snapshot for "+uri+": "+e.getMessage());
}
}
}
return r;
@ -911,5 +915,22 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
return null;
}
public boolean isAllowLazyLoading() {
return allowLazyLoading;
}
public void setAllowLazyLoading(boolean allowLazyLoading) {
this.allowLazyLoading = allowLazyLoading;
}
public boolean isSuppressDebugMessages() {
return suppressDebugMessages;
}
public void setSuppressDebugMessages(boolean suppressDebugMessages) {
this.suppressDebugMessages = suppressDebugMessages;
}
}

View File

@ -74,8 +74,8 @@ public class Property {
}
public String getXmlName() {
if (definition.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-xml-name")) {
return ToolingExtensions.readStringExtension(definition, "http://hl7.org/fhir/StructureDefinition/elementdefinition-xml-name");
if (definition.hasExtension(ToolingExtensions.EXT_XML_NAME)) {
return ToolingExtensions.readStringExtension(definition, ToolingExtensions.EXT_XML_NAME);
} else {
return getName();
}

View File

@ -40,6 +40,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@ -56,7 +57,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
// -- implementation of variant type methods from the interface --------------------------------
public Resource parse(String input) throws FHIRFormatError, IOException {
return parse(input.getBytes("UTF-8"));
return parse(input.getBytes(StandardCharsets.UTF_8));
}
public Resource parse(byte[] bytes) throws FHIRFormatError, IOException {
@ -65,11 +66,11 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public DataType parseType(String input, String typeName) throws FHIRFormatError, IOException {
return parseType(input.getBytes("UTF-8"), typeName);
return parseType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public DataType parseAnyType(String input, String typeName) throws FHIRFormatError, IOException {
return parseAnyType(input.getBytes("UTF-8"), typeName);
return parseAnyType(input.getBytes(StandardCharsets.UTF_8), typeName);
}
public DataType parseType(byte[] bytes, String typeName) throws FHIRFormatError, IOException {
@ -83,7 +84,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(Resource resource) throws IOException {
return new String(composeBytes(resource), "UTF-8");
return new String(composeBytes(resource), StandardCharsets.UTF_8);
}
public byte[] composeBytes(Resource resource) throws IOException {
@ -94,7 +95,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
}
public String composeString(DataType type, String typeName) throws IOException {
return new String(composeBytes(type, typeName));
return new String(composeBytes(type, typeName), StandardCharsets.UTF_8);
}
public byte[] composeBytes(DataType type, String typeName) throws IOException {

View File

@ -61,7 +61,7 @@ private Map<String, Object> userData;
if (userData == null)
return false;
else
return userData.containsKey(name);
return userData.containsKey(name) && (userData.get(name) != null);
}
public String getUserString(String name) {

View File

@ -12628,6 +12628,8 @@ The primary difference between a medicationusage and a medicationadministration
* R4B Ballot #1 + Connectathon 27 (Virtual).
*/
_4_1_0,
_4_3_0_SNAPSHOT1,
_4_3_0_CIBUILD,
/**
* R5 Preview #1 version.
*/
@ -12773,6 +12775,10 @@ The primary difference between a medicationusage and a medicationadministration
return _4_1;
if ("4.1.0".equals(codeString))
return _4_1_0;
if ("4.3.0-snapshot1".equals(codeString))
return _4_3_0_SNAPSHOT1;
if ("4.3.0-cibuild".equals(codeString))
return _4_3_0_CIBUILD;
if ("4.2".equals(codeString))
return _4_2;
if ("4.2.0".equals(codeString))
@ -12958,6 +12964,8 @@ The primary difference between a medicationusage and a medicationadministration
case _4_0_1: return "4.0.1";
case _4_1: return "4.1";
case _4_1_0: return "4.1.0";
case _4_3_0_SNAPSHOT1: return "4.3.0-snapshot1";
case _4_3_0_CIBUILD: return "4.3.0-cibuild";
case _4_2: return "4.2";
case _4_2_0: return "4.2.0";
case _4_3: return "4.3";
@ -13017,6 +13025,8 @@ The primary difference between a medicationusage and a medicationadministration
case _4_0_1: return "http://hl7.org/fhir/FHIR-version";
case _4_1: return "http://hl7.org/fhir/FHIR-version";
case _4_1_0: return "http://hl7.org/fhir/FHIR-version";
case _4_3_0_SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
case _4_3_0_CIBUILD: return "http://hl7.org/fhir/FHIR-version";
case _4_2: return "http://hl7.org/fhir/FHIR-version";
case _4_2_0: return "http://hl7.org/fhir/FHIR-version";
case _4_3: return "http://hl7.org/fhir/FHIR-version";
@ -13078,6 +13088,8 @@ The primary difference between a medicationusage and a medicationadministration
case _4_1_0: return "R4B Ballot #1 + Connectathon 27 (Virtual).";
case _4_2: return "R5 Preview #1 version.";
case _4_2_0: return "R5 Preview #1 + Connectathon 23 (Sydney).";
case _4_3_0_SNAPSHOT1: return "FHIR Release 4B Snapshot #1";
case _4_3_0_CIBUILD: return "FHIR Release 4B CI-Builld";
case _4_3: return "R4B version.";
case _4_3_0: return "FHIR Release 4B (Normative + STU).";
case _4_4: return "R5 Preview #2 version.";
@ -13138,6 +13150,8 @@ The primary difference between a medicationusage and a medicationadministration
case _4_2: return "4.2";
case _4_2_0: return "4.2.0";
case _4_3: return "4.3";
case _4_3_0_SNAPSHOT1: return "4.3.0-snapshot";
case _4_3_0_CIBUILD: return "4.3.0-cibuild";
case _4_3_0: return "4.3.0";
case _4_4: return "4.4";
case _4_4_0: return "4.4.0";
@ -13155,23 +13169,6 @@ The primary difference between a medicationusage and a medicationadministration
default: return "?";
}
}
// manual code from configuration.txt:
//public String toCode(int len) {
// return toCode().substring(0, len);
// }
//
//
// @Override
// public String toString() {
// return toCode();
// }
//
//
// public boolean isR4B() {
// return toCode().startsWith("4.1");
// }
//
// end addition
}
public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
@ -13257,6 +13254,10 @@ The primary difference between a medicationusage and a medicationadministration
return FHIRVersion._4_2;
if ("4.2.0".equals(codeString))
return FHIRVersion._4_2_0;
if ("4.3.0-snapshot1".equalsIgnoreCase(codeString))
return FHIRVersion._4_3_0_SNAPSHOT1;
if ("4.3.0-cibuild".equalsIgnoreCase(codeString))
return FHIRVersion._4_3_0_CIBUILD;
if ("4.3".equals(codeString))
return FHIRVersion._4_3;
if ("4.3.0".equals(codeString))
@ -13373,6 +13374,10 @@ The primary difference between a medicationusage and a medicationadministration
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2);
if ("4.2.0".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2_0);
if ("4.3.0-snapshot1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0_SNAPSHOT1);
if ("4.3.0-cibuild".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0_CIBUILD);
if ("4.3".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3);
if ("4.3.0".equals(codeString))
@ -13484,6 +13489,10 @@ The primary difference between a medicationusage and a medicationadministration
return "4.2.0";
if (code == FHIRVersion._4_3)
return "4.3";
if (code == FHIRVersion._4_3_0_SNAPSHOT1)
return "4.3.0-snapshot1";
if (code == FHIRVersion._4_3_0_CIBUILD)
return "4.3.0-cibuild";
if (code == FHIRVersion._4_3_0)
return "4.3.0";
if (code == FHIRVersion._4_4)

View File

@ -41,7 +41,9 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
if (conf.getRest().size() > 0) {
CapabilityStatementRestComponent rest = conf.getRest().get(0);
XhtmlNode t = x.table(null);
addTableRow(t, "Mode", rest.getMode().toString());
if (rest.hasMode()) {
addTableRow(t, "Mode", rest.getMode().toString());
}
addMarkdown(addTableRow(t, "Description"), rest.getDocumentation());
addTableRow(t, "Transaction", showOp(rest, SystemRestfulInteraction.TRANSACTION));

View File

@ -284,7 +284,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
}
private boolean conceptsHaveDisplay(ConceptDefinitionComponent c) {
if (c.hasDisplay())
if (c.hasDisplay() && !c.getDisplay().equals(c.getCode()))
return true;
for (ConceptDefinitionComponent g : c.getConcept())
if (conceptsHaveDisplay(g))

View File

@ -87,6 +87,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
addMarkdown(x, cm.getDescription());
x.br();
int gc = 0;
CodeSystem cs = getContext().getWorker().fetchCodeSystem("http://hl7.org/fhir/concept-map-relationship");
if (cs == null)
@ -106,7 +107,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
sources.get("code").add(grp.getSource());
targets.get("code").add(grp.getTarget());
for (SourceElementComponent ccl : grp.getElement()) {
ok = ok && ccl.getTarget().size() == 1 && ccl.getTarget().get(0).getDependsOn().isEmpty() && ccl.getTarget().get(0).getProduct().isEmpty();
ok = ok && (ccl.getNoMap() || (ccl.getTarget().size() == 1 && ccl.getTarget().get(0).getDependsOn().isEmpty() && ccl.getTarget().get(0).getProduct().isEmpty()));
for (TargetElementComponent ccm : ccl.getTarget()) {
comment = comment || !Utilities.noString(ccm.getComment());
for (OtherElementComponent d : ccm.getDependsOn()) {
@ -122,6 +123,25 @@ public class ConceptMapRenderer extends TerminologyRenderer {
}
}
gc++;
if (gc > 1) {
x.hr();
}
XhtmlNode pp = x.para();
pp.b().tx("Group "+gc);
pp.tx("Mapping from ");
if (grp.hasSource()) {
renderCanonical(cm, pp, grp.getSource());
} else {
pp.code("unspecified code system");
}
pp.tx(" to ");
if (grp.hasTarget()) {
renderCanonical(cm, pp, grp.getTarget());
} else {
pp.code("unspecified code system");
}
String display;
if (ok) {
// simple
@ -132,45 +152,35 @@ public class ConceptMapRenderer extends TerminologyRenderer {
tr.td().b().tx("Target Code");
if (comment)
tr.td().b().tx("Comment");
tr = tbl.tr();
XhtmlNode td = tr.td().colspan(comment ? "4" : "3");
td.tx("Mapping from ");
if (grp.hasSource()) {
renderCanonical(cm, td, grp.getSource());
} else {
td.code("unspecified code system");
}
td.tx(" to ");
if (grp.hasTarget()) {
renderCanonical(cm, td, grp.getTarget());
} else {
td.code("unspecified code system");
}
for (SourceElementComponent ccl : grp.getElement()) {
tr = tbl.tr();
td = tr.td();
XhtmlNode td = tr.td();
td.addText(ccl.getCode());
display = ccl.hasDisplay() ? ccl.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getSource()), versionFromCanonical(grp.getSource()), ccl.getCode());
if (display != null && !isSameCodeAndDisplay(ccl.getCode(), display))
td.tx(" ("+display+")");
TargetElementComponent ccm = ccl.getTarget().get(0);
if (!ccm.hasRelationship())
tr.td().tx(":"+"("+ConceptMapRelationship.EQUIVALENT.toCode()+")");
else {
if (ccm.getRelationshipElement().hasExtension(ToolingExtensions.EXT_OLD_CONCEPTMAP_EQUIVALENCE)) {
String code = ToolingExtensions.readStringExtension(ccm.getRelationshipElement(), ToolingExtensions.EXT_OLD_CONCEPTMAP_EQUIVALENCE);
tr.td().ah(eqpath+"#"+code, code).tx(presentEquivalenceCode(code));
} else {
tr.td().ah(eqpath+"#"+ccm.getRelationship().toCode(), ccm.getRelationship().toCode()).tx(presentRelationshipCode(ccm.getRelationship().toCode()));
if (ccl.getNoMap()) {
tr.td().colspan(comment ? "3" : "2").style("background-color: #efefef").tx("(not mapped)");
} else {
TargetElementComponent ccm = ccl.getTarget().get(0);
if (!ccm.hasRelationship())
tr.td().tx(":"+"("+ConceptMapRelationship.EQUIVALENT.toCode()+")");
else {
if (ccm.getRelationshipElement().hasExtension(ToolingExtensions.EXT_OLD_CONCEPTMAP_EQUIVALENCE)) {
String code = ToolingExtensions.readStringExtension(ccm.getRelationshipElement(), ToolingExtensions.EXT_OLD_CONCEPTMAP_EQUIVALENCE);
tr.td().ah(eqpath+"#"+code, code).tx(presentEquivalenceCode(code));
} else {
tr.td().ah(eqpath+"#"+ccm.getRelationship().toCode(), ccm.getRelationship().toCode()).tx(presentRelationshipCode(ccm.getRelationship().toCode()));
}
}
td = tr.td();
td.addText(ccm.getCode());
display = ccm.hasDisplay() ? ccm.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getTarget()), versionFromCanonical(grp.getTarget()), ccm.getCode());
if (display != null && !isSameCodeAndDisplay(ccm.getCode(), display))
td.tx(" ("+display+")");
if (comment)
tr.td().addText(ccm.getComment());
}
td = tr.td();
td.addText(ccm.getCode());
display = ccm.hasDisplay() ? ccm.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getTarget()), versionFromCanonical(grp.getTarget()), ccm.getCode());
if (display != null && !isSameCodeAndDisplay(ccm.getCode(), display))
td.tx(" ("+display+")");
if (comment)
tr.td().addText(ccm.getComment());
addUnmapped(tbl, grp);
}
} else {
@ -246,7 +256,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
td.addText(ccl.getCode());
else
td.addText(grp.getSource()+" / "+ccl.getCode());
display = getDisplayForConcept(systemFromCanonical(grp.getSource()), versionFromCanonical(grp.getSource()), ccl.getCode());
display = ccl.hasDisplay() ? ccl.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getSource()), versionFromCanonical(grp.getSource()), ccl.getCode());
tr.td().style("border-left-width: 0px").tx(display == null ? "" : display);
tr.td().colspan("4").style("background-color: #efefef").tx("(not mapped)");
@ -398,7 +408,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
if (span2) {
td.colspan("2");
}
td.b().tx("Code");
td.b().tx("Codes");
td.tx(" from ");
if (cs == null)
td.tx(url);

View File

@ -134,7 +134,7 @@ public class DataRenderer extends Renderer {
}
// 2. markdown
String s = getContext().getMarkdown().process(Utilities.escapeXml(text), "narrative generator");
String s = getContext().getMarkdown().process(text, "narrative generator");
XhtmlParser p = new XhtmlParser();
XhtmlNode m;
try {
@ -346,7 +346,7 @@ public class DataRenderer extends Renderer {
"ExampleScenario", "GraphDefinition", "ImplementationGuide", "Library", "Measure", "MessageDefinition", "NamingSystem", "PlanDefinition"
))
return true;
return sd.getBaseDefinitionElement().hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super");
return false;
}
// -- 4. Language support ------------------------------------------------------

View File

@ -149,6 +149,9 @@ public class PatientRenderer extends ResourceRenderer {
if (newUse == null) {
return true;
}
if (oldUse == null) {
return existsInList(newUse, NameUse.OFFICIAL, NameUse.USUAL);
}
switch (oldUse) {
case ANONYMOUS: return existsInList(newUse, NameUse.OFFICIAL, NameUse.USUAL);
case MAIDEN: return existsInList(newUse, NameUse.OFFICIAL, NameUse.USUAL);

View File

@ -175,26 +175,28 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
if (i.getReadOnly()) {
return true;
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_IS_SUBJ)) {
return true;
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_HIDDEN)) {
return true;
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_OTP_DISP)) {
return true;
}
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod")) {
if (i.hasExtension(ToolingExtensions.EXT_O_LINK_PERIOD)) {
return true;
}
if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation")) {
if (i.hasExtension(ToolingExtensions.EXT_Q_CHOICE_ORIENT)) {
return true;
}
if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory")) {
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
return true;
}
return checkForFlags(i.getItem());
}
private Row addTreeRoot(HierarchicalTableGenerator gen, List<Row> rows, Questionnaire q, boolean hasFlags) throws IOException {
Row r = gen.new Row();
@ -249,21 +251,21 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
flags.addPiece(gen.new Piece(getSDCLink("StructureDefinition-sdc-questionnaire-isSubject.html"), null, "Can change the subject of the questionnaire").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-subject.png"))));
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_HIDDEN)) {
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-hidden.html"), null, "Is a hidden item").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-hidden.png"))));
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_OTP_DISP)) {
flags.addPiece(gen.new Piece(getSDCLink("StructureDefinition-sdc-questionnaire-optionalDisplay.html"), null, "Is optional to display").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-optional.png"))));
}
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod")) {
flags.addPiece(gen.new Piece(getSDCLink("StructureDefinition-sdc-questionnaire-observationLinkPeriod"), null, "Is linked to an observation").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-observation.png"))));
}
if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation")) {
String code = ToolingExtensions.readStringExtension(i, "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation");
if (i.hasExtension(ToolingExtensions.EXT_Q_CHOICE_ORIENT)) {
String code = ToolingExtensions.readStringExtension(i, ToolingExtensions.EXT_Q_CHOICE_ORIENT);
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-choiceorientation.html"), null, "Orientation: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"))));
}
if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory")) {
CodeableConcept cc = i.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory").getValueCodeableConcept();
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
flags.addPiece(gen.new Piece(getSDCLink("StructureDefinition-sdc-questionnaire-displayCategory"), null, "Category: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"))));
}
@ -666,8 +668,8 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
}
}
// if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation")) {
// String code = ToolingExtensions.readStringExtension(i, "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation");
// if (i.hasExtension(ToolingExtensions.EXT_Q_CHOICE_ORIENT)) {
// String code = ToolingExtensions.readStringExtension(i, ToolingExtensions.EXT_Q_CHOICE_ORIENT);
// flags.addPiece(gen.new Piece("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", null, "Orientation: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"))));
//}
@ -681,21 +683,21 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
hasFlag = true;
flags.ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "Can change the subject of the questionnaire").img(Utilities.path(context.getLocalPrefix(), "icon-qi-subject.png"), "icon");
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_HIDDEN)) {
hasFlag = true;
flags.ah(Utilities.pathURL(context.getSpecificationLink(), "extension-questionnaire-hidden.html"), "Is a hidden item").img(Utilities.path(context.getLocalPrefix(), "icon-qi-hidden.png"), "icon");
d.style("background-color: #eeeeee");
}
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay")) {
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_OTP_DISP)) {
hasFlag = true;
flags.ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "Is optional to display").img(Utilities.path(context.getLocalPrefix(), "icon-qi-optional.png"), "icon");
flags.ah(ToolingExtensions.EXT_Q_OTP_DISP, "Is optional to display").img(Utilities.path(context.getLocalPrefix(), "icon-qi-optional.png"), "icon");
}
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod")) {
hasFlag = true;
flags.ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", "Is linked to an observation").img(Utilities.path(context.getLocalPrefix(), "icon-qi-observation.png"), "icon");
}
if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory")) {
CodeableConcept cc = i.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory").getValueCodeableConcept();
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
hasFlag = true;
flags.ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-displayCategory", "Category: "+code).img(Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"), "icon");
@ -958,16 +960,16 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
}
// appearance
if (qi.hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory")) {
if (qi.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
XhtmlNode tr = tbl.tr();
tr.td().ah("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory").tx("Display Category");
render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory").getValue());
tr.td().ah(ToolingExtensions.EXT_Q_DISPLAY_CAT).tx("Display Category");
render(tr.td(), qi.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValue());
}
if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden")) {
defn(tbl, "Hidden Item", "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory", "This item is a hidden question", null);
if (ToolingExtensions.readBoolExtension(qi, ToolingExtensions.EXT_Q_HIDDEN)) {
defn(tbl, "Hidden Item", ToolingExtensions.EXT_Q_DISPLAY_CAT, "This item is a hidden question", null);
}
if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay")) {
defn(tbl, "Hidden Item", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "This item is optional to display", null);
if (ToolingExtensions.readBoolExtension(qi, ToolingExtensions.EXT_Q_OTP_DISP)) {
defn(tbl, "Hidden Item", ToolingExtensions.EXT_Q_OTP_DISP, "This item is optional to display", null);
}
// formal definitions

View File

@ -429,7 +429,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
// }
// }
//
//// if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-choiceOrientation")) {
//// if (i.hasExtension(" http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-choiceOrientation")) {
//// String code = ToolingExtensions.readStringExtension(i, "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-choiceOrientation");
//// flags.addPiece(gen.new Piece("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod", null, "Orientation: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"))));
////}
@ -457,7 +457,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
// hasFlag = true;
// flags.ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod", "Is linked to an observation").img(Utilities.path(context.getLocalPrefix(), "icon-qi-observation.png"));
// }
// if (i.hasExtension("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory")) {
// if (i.hasExtension(" http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory")) {
// CodeableConcept cc = i.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").getValueCodeableConcept();
// String code = cc.getCode("http://hl7.org/fhir/QuestionnaireResponse-display-category");
// hasFlag = true;
@ -727,7 +727,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
// }
//
// // appearance
// if (qi.hasExtension("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory")) {
// if (qi.hasExtension(" http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory")) {
// XhtmlNode tr = tbl.tr();
// tr.td().ah("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").tx("Display Category");
// render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").getValue());

View File

@ -118,7 +118,8 @@ public class SearchParameterRenderer extends TerminologyRenderer {
if (spd.hasModifier()) {
tr = tbl.tr();
tr.td().tx("Modifiers");
td = tr.td().tx("Allowed: ");
td = tr.td();
td.tx("Allowed: ");
for (Enumeration<SearchModifierCode> t : spd.getModifier()) {
td.sep(", ");
td.tx(t.asStringValue());
@ -127,7 +128,8 @@ public class SearchParameterRenderer extends TerminologyRenderer {
if (spd.hasChain()) {
tr = tbl.tr();
tr.td().tx("Chains");
td = tr.td().tx("Allowed: ");
td = tr.td();
td.tx("Allowed: ");
for (StringType t : spd.getChain()) {
td.sep(", ");
td.tx(t.asStringValue());

View File

@ -34,6 +34,9 @@ import org.hl7.fhir.utilities.xhtml.XhtmlNode;
public abstract class TerminologyRenderer extends ResourceRenderer {
private static final boolean DEBUG = false;
public TerminologyRenderer(RenderingContext context) {
super(context);
}
@ -309,8 +312,11 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
a.tx("SNOMED-CT");
}
else {
if (value.startsWith("http://hl7.org") && !Utilities.existsInList(value, "http://hl7.org/fhir/sid/icd-10-us"))
System.out.println("Unable to resolve value set "+value);
if (value.startsWith("http://hl7.org") && !Utilities.existsInList(value, "http://hl7.org/fhir/sid/icd-10-us")) {
if (DEBUG) {
System.out.println("Unable to resolve value set "+value);
}
}
li.addText(value);
}
}

View File

@ -666,6 +666,9 @@ public class ValueSetRenderer extends TerminologyRenderer {
}
private <T extends Resource> String getCsRef(T cs) {
if (cs == null) {
return "?cs-n?";
}
String ref = (String) cs.getUserData("filename");
if (ref == null)
ref = (String) cs.getUserData("path");
@ -1289,7 +1292,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
for (ConceptReferenceComponent cc : inc.getConcept()) {
String code = cc.getCode();
ConceptDefinitionComponent v = null;
if (e != null) {
if (e != null && code != null) {
v = getConceptForCode(e.getConcept(), code);
}
if (v == null && vse != null) {

View File

@ -134,6 +134,7 @@ public class RenderingContext {
private DateTimeFormatter dateYearFormat;
private DateTimeFormatter dateYearMonthFormat;
private boolean copyButton;
private ProfileKnowledgeProvider pkp;
/**
*
@ -194,6 +195,7 @@ public class RenderingContext {
res.locale = locale;
res.showComments = showComments;
res.copyButton = copyButton;
res.pkp = pkp;
res.terminologyServiceOptions = terminologyServiceOptions.copy();
return res;
@ -210,7 +212,7 @@ public class RenderingContext {
public ProfileUtilities getProfileUtilities() {
if (profileUtilitiesR == null) {
profileUtilitiesR = new ProfileUtilities(worker, null, null);
profileUtilitiesR = new ProfileUtilities(worker, null, pkp);
}
return profileUtilitiesR;
}
@ -608,5 +610,12 @@ public class RenderingContext {
return this;
}
public void setPkp(ProfileKnowledgeProvider pkp) {
this.pkp = pkp;
}
public ProfileKnowledgeProvider getPkp() {
return pkp;
}
}

View File

@ -41,6 +41,7 @@ import java.util.Set;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.model.BooleanType;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CanonicalType;
@ -67,6 +68,35 @@ import org.hl7.fhir.utilities.Utilities;
public class CodeSystemUtilities {
public static class SystemReference {
private String link;
private String text;
private boolean local;
public SystemReference(String text, String link) {
super();
this.link = link;
this.text = text;
}
public SystemReference(String text, String link, boolean local) {
super();
this.link = link;
this.text = text;
this.local = local;
}
public String getLink() {
return link;
}
public String getText() {
return text;
}
public boolean isLocal() {
return local;
}
}
public static class ConceptDefinitionComponentSorter implements Comparator<ConceptDefinitionComponent> {
@Override
@ -619,5 +649,26 @@ public class CodeSystemUtilities {
return jurisdiction == null || !jurisdiction.contains("#") ? null : new Coding().setCode(jurisdiction.substring(jurisdiction.indexOf("#")+1)).setSystem(jurisdiction.substring(0, jurisdiction.indexOf("#")));
}
public static SystemReference getSystemReference(String system, IWorkerContext ctxt) {
if (system == null) {
return null;
} if ("http://snomed.info/sct".equals(system)) {
return new SystemReference("SNOMED CT", "https://browser.ihtsdotools.org/");
} else if ("http://loinc.org".equals(system)) {
return new SystemReference("LOINC", "https://loinc.org/");
} else if ("http://unitsofmeasure.org".equals(system)) {
return new SystemReference("UCUM", "http://ucum.org");
} else if (system.equals("http://www.nlm.nih.gov/research/umls/rxnorm")) {
return new SystemReference("RxNorm", "http://www.nlm.nih.gov/research/umls/rxnorm");
} else if (ctxt != null) {
CodeSystem cs = ctxt.fetchCodeSystem(system);
if (cs != null && cs.hasUserData("path")) {
return new SystemReference(cs.present(), cs.getUserString("path"), Utilities.isAbsoluteUrl(cs.getUserString("path")));
} else if (cs != null) {
return new SystemReference(cs.present(), null);
}
}
return null;
}
}
}

View File

@ -51,6 +51,7 @@ import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent;
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionPropertyComponent;
import org.hl7.fhir.r5.terminologies.CodeSystemUtilities.ConceptDefinitionComponentSorter;
@ -272,5 +273,18 @@ public class ValueSetUtilities {
Collections.sort(inc.getConcept(), new ConceptReferenceComponentSorter());
}
public static String getAllCodesSystem(ValueSet vs) {
if (vs.hasCompose()) {
ValueSetComposeComponent c = vs.getCompose();
if (c.getExclude().isEmpty() && c.getInclude().size() == 1) {
ConceptSetComponent i = c.getIncludeFirstRep();
if (i.hasSystem() && !i.hasValueSet() && !i.hasConcept() && !i.hasFilter()) {
return i.getSystem();
}
}
}
return null;
}
}

View File

@ -112,8 +112,8 @@ public class TestingUtilities extends BaseTestingUtilities {
IWorkerContext fcontext = getWorkerContext(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
fcontext.setUcumService(new UcumEssenceService(TestingUtilities.loadTestResourceStream("ucum", "ucum-essence.xml")));
fcontext.setExpansionProfile(new Parameters());
if (!fcontext.hasPackage("hl7.terminology", null)) {
NpmPackage utg = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION).loadPackage("hl7.terminology");
if (!fcontext.hasPackage("hl7.terminology.r5", null)) {
NpmPackage utg = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION).loadPackage("hl7.terminology.r5");
System.out.println("Loading THO: "+utg.name()+"#"+utg.version());
fcontext.loadFromPackage(utg, new TestPackageLoader(new String[]{"CodeSystem", "ValueSet"}));
}

View File

@ -492,7 +492,7 @@ public class GraphQLSchemaGenerator {
private String getJsonFormat(StructureDefinition sd) throws FHIRException {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (!ed.getType().isEmpty() && ed.getType().get(0).getCodeElement().hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type"))
return ed.getType().get(0).getCodeElement().getExtensionString("http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type");
return ed.getType().get(0).getCodeElement().getExtensionString(" http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type");
}
// all primitives but JSON_NUMBER_TYPES are represented as JSON strings
if (JSON_NUMBER_TYPES.contains(sd.getName())) {

View File

@ -36,12 +36,12 @@ import org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPa
public class IGHelper {
public static final String EXT_SPREADSHEET = ToolingExtensions.EXT_IGP_SPREADSHEET;
public static final String EXT_MAPPING_CSV = ToolingExtensions.EXT_IGP_MAPPING_CSV;
public static final String EXT_BUNDLE = ToolingExtensions.EXT_IGP_BUNDLE;
public static final String EXT_RESOURCE_INFO = ToolingExtensions.EXT_IGP_RESOURCE_INFO;
public static final String EXT_CONTAINED_RESOURCE_INFO = ToolingExtensions.EXT_IGP_CONTAINED_RESOURCE_INFO;
public static final String EXT_PRIVATE_BASE = ToolingExtensions.EXT_PRIVATE_BASE;
// public static final String EXT_SPREADSHEET = ToolingExtensions.EXT_IGP_SPREADSHEET;
// public static final String EXT_MAPPING_CSV = ToolingExtensions.EXT_IGP_MAPPING_CSV;
// public static final String EXT_BUNDLE = ToolingExtensions.EXT_IGP_BUNDLE;
// public static final String EXT_RESOURCE_INFO = ToolingExtensions.EXT_IGP_RESOURCE_INFO;
// public static final String EXT_CONTAINED_RESOURCE_INFO = ToolingExtensions.EXT_IGP_CONTAINED_RESOURCE_INFO;
// public static final String EXT_PRIVATE_BASE = ToolingExtensions.EXT_PRIVATE_BASE;
public static String readStringParameter(ImplementationGuideDefinitionComponent ig, String name) {
for (ImplementationGuideDefinitionParameterComponent p : ig.getParameter()) {

View File

@ -6,19 +6,19 @@ import java.lang.reflect.Modifier;
/*
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
* 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,
* 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
* 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.
@ -29,7 +29,7 @@ import java.lang.reflect.Modifier;
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.
*/
@ -112,105 +112,114 @@ import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
public class ToolingExtensions {
// validated
// private static final String EXT_OID = "http://hl7.org/fhir/StructureDefinition/valueset-oid";
// public static final String EXT_DEPRECATED = "http://hl7.org/fhir/StructureDefinition/codesystem-deprecated";
public static final String EXT_DEFINITION = "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition";
public static final String EXT_CS_COMMENT = "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments";
public static final String EXT_VS_COMMENT = "http://hl7.org/fhir/StructureDefinition/valueset-concept-comments";
public static final String EXT_CS_KEYWORD = "http://hl7.org/fhir/StructureDefinition/codesystem-keyWord";
public static final String EXT_VS_KEYWORD = "http://hl7.org/fhir/StructureDefinition/valueset-keyWord";
private static final String EXT_IDENTIFIER = "http://hl7.org/fhir/StructureDefinition/identifier";
public static final String EXT_TRANSLATION = "http://hl7.org/fhir/StructureDefinition/translation";
public static final String EXT_ISSUE_SOURCE = "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source";
public static final String EXT_ISSUE_MSG_ID = "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id";
public static final String EXT_ISSUE_LINE = "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line";
public static final String EXT_ISSUE_COL = "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col";
public static final String EXT_DISPLAY_HINT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint";
public static final String EXT_REPLACED_BY = "http://hl7.org/fhir/StructureDefinition/valueset-replacedby";
public static final String EXT_REGEX = "http://hl7.org/fhir/StructureDefinition/regex";
public static final String EXT_CONTROL = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";
public static final String EXT_MINOCCURS = "http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs";
public static final String EXT_MAXOCCURS = "http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs";
public static final String EXT_ALLOWEDRESOURCE = "http://hl7.org/fhir/StructureDefinition/questionnaire-allowedResource";
public static final String EXT_REFERENCEFILTER = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter";
public static final String EXT_CODE_GENERATION_PARENT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super";
public static final String EXT_HIERARCHY = "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy";
public static final String EXT_BEST_PRACTICE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice";
public static final String EXT_BEST_PRACTICE_EXPLANATION = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation";
// unregistered?
public static final String EXT_MAPPING_PREFIX = "http://hl7.org/fhir/tools/StructureDefinition/logical-mapping-prefix";
public static final String EXT_MAPPING_SUFFIX = "http://hl7.org/fhir/tools/StructureDefinition/logical-mapping-suffix";
// public static final String EXT_FLYOVER = "http://hl7.org/fhir/Profile/questionnaire-extensions#flyover";
public static final String EXT_QTYPE = "http://hl7.org/fhir/StructureDefinition/questionnnaire-baseType";
// private static final String EXT_QREF = "http://www.healthintersections.com.au/fhir/Profile/metadata#reference";
// private static final String EXTENSION_FILTER_ONLY = "http://www.healthintersections.com.au/fhir/Profile/metadata#expandNeedsFilter";
// private static final String EXT_TYPE = "http://www.healthintersections.com.au/fhir/Profile/metadata#type";
// private static final String EXT_REFERENCE = "http://www.healthintersections.com.au/fhir/Profile/metadata#reference";
private static final String EXT_FHIRTYPE = "http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType";
private static final String EXT_ALLOWABLE_UNITS = "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits";
public static final String EXT_CIMI_REFERENCE = "http://hl7.org/fhir/StructureDefinition/cimi-reference";
public static final String EXT_UNCLOSED = "http://hl7.org/fhir/StructureDefinition/valueset-unclosed";
public static final String EXT_FMM_LEVEL = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm";
public static final String EXT_FMM_SUPPORT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-support";
public static final String EXT_FMM_DERIVED = "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom";
public static final String EXT_SEC_CAT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category";
public static final String EXT_RESOURCE_CATEGORY = "http://hl7.org/fhir/StructureDefinition/structuredefinition-category";
public static final String EXT_RESOURCE_INTERFACE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-interface";
public static final String EXT_OO_FILE = "http://hl7.org/fhir/StructureDefinition/operationoutcome-file";
public static final String EXT_RESOURCE_IMPLEMENTS = "http://hl7.org/fhir/StructureDefinition/structuredefinition-implements";
public static final String EXT_TABLE_NAME = "http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name";
public static final String EXT_OO_FILE = "http://hl7.org/fhir/StructureDefinition/operationoutcome-file";
public static final String EXT_WORKGROUP = "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg";
public static final String EXT_STANDARDS_STATUS = "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status";
public static final String EXT_NORMATIVE_VERSION = "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version";
public static final String EXT_XML_TYPE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type";
public static final String EXT_XML_NAME = "http://hl7.org/fhir/StructureDefinition/elementdefinition-xml-name";
public static final String EXT_BINDING_STYLE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-binding-style";
public static final String EXT_EXPLICIT_TYPE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name";
public static final String EXT_TIME_FORMAT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-timeformat";
public static final String EXT_IGP_RESOURCES = "http://hl7.org/fhir/StructureDefinition/igpublisher-folder-resource";
public static final String EXT_IGP_PAGES = "http://hl7.org/fhir/StructureDefinition/igpublisher-folder-pages";
public static final String EXT_IGP_SPREADSHEET = "http://hl7.org/fhir/StructureDefinition/igpublisher-spreadsheet";
public static final String EXT_IGP_MAPPING_CSV = "http://hl7.org/fhir/StructureDefinition/igpublisher-mapping-csv";
public static final String EXT_IGP_BUNDLE = "http://hl7.org/fhir/StructureDefinition/igpublisher-bundle";
public static final String EXT_IGP_BASE = "http://hl7.org/fhir/StructureDefinition/igpublisher-res-base";
public static final String EXT_IGP_DEFNS = "http://hl7.org/fhir/StructureDefinition/igpublisher-res-defns";
public static final String EXT_IGP_FORMAT = "http://hl7.org/fhir/StructureDefinition/igpublisher-res-format";
public static final String EXT_IGP_SOURCE = "http://hl7.org/fhir/StructureDefinition/igpublisher-res-source";
public static final String EXT_IGP_VERSION = "http://hl7.org/fhir/StructureDefinition/igpublisher-res-version";
public static final String EXT_IGP_RESOURCES = "http://hl7.org/fhir/StructureDefinition/igpublisher-folder-resource";
public static final String EXT_IGP_PAGES = "http://hl7.org/fhir/StructureDefinition/igpublisher-folder-pages";
public static final String EXT_IGP_SPREADSHEET = "http://hl7.org/fhir/StructureDefinition/igpublisher-spreadsheet";
public static final String EXT_IGP_MAPPING_CSV = "http://hl7.org/fhir/StructureDefinition/igpublisher-mapping-csv";
public static final String EXT_IGP_BUNDLE = "http://hl7.org/fhir/StructureDefinition/igpublisher-bundle";
public static final String EXT_IGP_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/resource-information";
public static final String EXT_IGP_CONTAINED_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/contained-resource-information";
public static final String EXT_PRIVATE_BASE = "http://hl7.org/fhir/tools/";
public static final String EXT_BINARY_FORMAT = "http://hl7.org/fhir/StructureDefinition/implementationguide-resource-format";
public static final String EXT_IGP_RESOURCE_INFO = "http://hl7.org/fhir/tools/StructureDefinition/resource-information";
public static final String EXT_IGP_LOADVERSION = "http://hl7.org/fhir/StructureDefinition/igpublisher-loadversion";
public static final String EXT_MAX_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet";
public static final String EXT_MIN_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet";
public static final String EXT_PROFILE_ELEMENT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element";
public static final String EXT_LIST_PACKAGE = "http://hl7.org/fhir/StructureDefinition/list-packageId";
// validated
// private static final String EXT_OID = "http://hl7.org/fhir/StructureDefinition/valueset-oid";
// public static final String EXT_DEPRECATED = "http://hl7.org/fhir/StructureDefinition/codesystem-deprecated";
public static final String EXT_PATTERN = "http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern";
public static final String EXT_ALLOWEDRESOURCE = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource";
private static final String EXT_ALLOWABLE_UNITS = "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits";
private static final String EXT_FHIRTYPE = "http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType";
public static final String EXT_ALLOWED_TYPE = "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type";
public static final String EXT_BEST_PRACTICE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"; // Y
public static final String EXT_BEST_PRACTICE_EXPLANATION = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"; // Y
public static final String EXT_BINDING_NAME = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName";
public static final String EXT_CONTROL = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"; // Y
public static final String EXT_CS_COMMENT = "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments"; // Y
public static final String EXT_CS_KEYWORD = "http://hl7.org/fhir/StructureDefinition/codesystem-keyWord"; // Y
public static final String EXT_DEFINITION = "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition"; // Y
public static final String EXT_DISPLAY_HINT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"; // Y
public static final String EXT_EXPAND_GROUP = "http://hl7.org/fhir/StructureDefinition/valueset-expand-group";
public static final String EXT_EXPAND_RULES = "http://hl7.org/fhir/StructureDefinition/valueset-expand-rules";
public static final String EXT_EXP_TOOCOSTLY = "http://hl7.org/fhir/StructureDefinition/valueset-toocostly";
public static final String EXT_FHIR_TYPE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type";
public static final String EXT_FMM_DERIVED = "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom";
public static final String EXT_FMM_LEVEL = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm";
public static final String EXT_FMM_SUPPORT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-support";
public static final String EXT_HIERARCHY = "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"; // Y
public static final String EXT_ISSUE_SOURCE = "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source"; // Y
public static final String EXT_MAXOCCURS = "http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs"; // Y
public static final String EXT_MAX_DECIMALS = "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces";
public static final String EXT_MAX_SIZE = "http://hl7.org/fhir/StructureDefinition/maxSize";
public static final String EXT_MAX_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet";
public static final String EXT_MINOCCURS = "http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs"; // Y
public static final String EXT_MIN_LENGTH = "http://hl7.org/fhir/StructureDefinition/minLength";
public static final String EXT_MIN_VALUESET = "http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet";
public static final String EXT_MUST_SUPPORT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support";
public static final String EXT_NORMATIVE_VERSION = "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version";
public static final String EXT_PROFILE_ELEMENT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element";
public static final String EXT_QTYPE = "http://hl7.org/fhir/StructureDefinition/questionnnaire-baseType";
public static final String EXT_Q_UNIT = "http://hl7.org/fhir/StructureDefinition/questionnaire-unit";
public static final String EXT_REFERENCEFILTER = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter"; // Y
public static final String EXT_REGEX = "http://hl7.org/fhir/StructureDefinition/regex"; // Y
public static final String EXT_RENDERED_VALUE = "http://hl7.org/fhir/StructureDefinition/rendered-value";
public static final String EXT_REPLACED_BY = "http://hl7.org/fhir/StructureDefinition/codesystem-replacedby";
public static final String EXT_RESOURCE_CATEGORY = "http://hl7.org/fhir/StructureDefinition/structuredefinition-category";
public static final String EXT_RESOURCE_INTERFACE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-interface";
public static final String EXT_SEC_CAT = "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category";
public static final String EXT_STANDARDS_STATUS = "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status";
public static final String EXT_TABLE_NAME = "http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name";
public static final String EXT_TARGET_ID = "http://hl7.org/fhir/StructureDefinition/targetElement";
public static final String EXT_TARGET_PATH = "http://hl7.org/fhir/StructureDefinition/targetPath";
public static final String EXT_TRANSLATABLE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable";
public static final String EXT_TRANSLATION = "http://hl7.org/fhir/StructureDefinition/translation"; // Y
public static final String EXT_UNCLOSED = "http://hl7.org/fhir/StructureDefinition/valueset-unclosed";
public static final String EXT_VALUESET_SYSTEM = "http://hl7.org/fhir/StructureDefinition/valueset-system";
public static final String EXT_VS_COMMENT = "http://hl7.org/fhir/StructureDefinition/valueset-concept-comments"; // Y
public static final String EXT_VS_KEYWORD = "http://hl7.org/fhir/StructureDefinition/valueset-keyWord"; // Y
public static final String EXT_WORKGROUP = "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg";
public static final String EXT_XML_NAMESPACE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace";
public static final String EXT_OLD_CONCEPTMAP_EQUIVALENCE = "http://hl7.org/fhir/1.0/StructureDefinition/extension-ConceptMap.element.target.equivalence";
public static final String EXT_Q_IS_SUBJ = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject";
public static final String EXT_Q_HIDDEN = "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden";
public static final String EXT_Q_OTP_DISP = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay";
public static final String EXT_O_LINK_PERIOD = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod";
public static final String EXT_Q_CHOICE_ORIENT = "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation";
public static final String EXT_Q_DISPLAY_CAT = "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory";
public static final String EXT_REND_MD = "http://hl7.org/fhir/StructureDefinition/rendering-markdown";
public static final String EXT_CAP_STMT_EXPECT = "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation";
public static final String EXT_ED_HEIRARCHY = "http://hl7.org/fhir/StructureDefinition/elementdefinition-heirarchy";
// in the tooling IG
public static final String EXT_BINDING_ADDITIONAL = "http://hl7.org/fhir/tools/StructureDefinition/additional-binding";
// unregistered? - don't know what these are used for
public static final String EXT_MAPPING_PREFIX = "http://hl7.org/fhir/tools/StructureDefinition/logical-mapping-prefix";
public static final String EXT_MAPPING_SUFFIX = "http://hl7.org/fhir/tools/StructureDefinition/logical-mapping-suffix";
// for the v2 mapping project
public static final String EXT_MAPPING_NAME = "http://hl7.org/fhir/tools/StructureDefinition/conceptmap-source-name";
public static final String EXT_MAPPING_TYPE = "http://hl7.org/fhir/tools/StructureDefinition/conceptmap-source-type";
public static final String EXT_MAPPING_CARD = "http://hl7.org/fhir/tools/StructureDefinition/conceptmap-source-cardinality";
public static final String EXT_MAPPING_TGTTYPE = "http://hl7.org/fhir/tools/StructureDefinition/conceptmap-target-type";
public static final String EXT_MAPPING_TGTCARD = "http://hl7.org/fhir/tools/StructureDefinition/conceptmap-target-cardinality";
public static final String EXT_PRIVATE_BASE = "http://hl7.org/fhir/tools/";
public static final String EXT_ALLOWED_TYPE = "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type";
public static final String EXT_FHIR_TYPE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type";
public static final String EXT_XML_TYPE = "http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type";
public static final String EXT_RENDERED_VALUE = "http://hl7.org/fhir/StructureDefinition/rendered-value";
public static final String EXT_OLD_CONCEPTMAP_EQUIVALENCE = "http://hl7.org/fhir/1.0/StructureDefinition/extension-ConceptMap.element.target.equivalence";
public static final String EXT_EXP_TOOCOSTLY = "http://hl7.org/fhir/StructureDefinition/valueset-toocostly";
public static final String EXT_MUST_SUPPORT = "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support";
public static final String EXT_TRANSLATABLE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable";
public static final String EXT_PATTERN = "http://hl7.org/fhir/StructureDefinition/elementdefinition-pattern";
public static final String EXT_BINDING_METHOD = "http://hl7.org/fhir/StructureDefinition/elementdefinition-binding-method";
public static final String EXT_XML_NAMESPACE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace";
public static final String EXT_XML_NAME = "http://hl7.org/fhir/StructureDefinition/elementdefinition-xml-name";
public static final String EXT_BINDING_STYLE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-binding-style";
public static final String EXT_BINARY_FORMAT = "http://hl7.org/fhir/StructureDefinition/implementationguide-resource-format";
public static final String EXT_TARGET_ID = "http://hl7.org/fhir/StructureDefinition/targetElement";
public static final String EXT_TARGET_PATH = "http://hl7.org/fhir/StructureDefinition/targetPath";
public static final String EXT_VALUESET_SYSTEM = "http://hl7.org/fhir/StructureDefinition/valueset-system";
public static final String EXT_EXPAND_RULES = "http://hl7.org/fhir/StructureDefinition/valueset-expand-rules";
public static final String EXT_EXPAND_GROUP = "http://hl7.org/fhir/StructureDefinition/valueset-expand-group";
public static final String EXT_BINDING_ADDITIONAL = "http://hl7.org/fhir/tools/StructureDefinition/additional-binding";
public static final String EXT_MIN_LENGTH = "http://hl7.org/fhir/StructureDefinition/minLength";
public static final String EXT_MAX_DECIMALS = "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces";
public static final String EXT_MAX_SIZE = "http://hl7.org/fhir/StructureDefinition/maxSize";
// specific extension helpers
public static Extension makeIssueSource(Source source) {
@ -241,15 +250,15 @@ public class ToolingExtensions {
return getExtension(e, url) != null;
}
// public static void addStringExtension(DomainResource dr, String url, String content) {
// if (!StringUtils.isBlank(content)) {
// Extension ex = getExtension(dr, url);
// if (ex != null)
// ex.setValue(new StringType(content));
// else
// dr.getExtension().add(Factory.newExtension(url, new StringType(content), true));
// }
// }
// public static void addStringExtension(DomainResource dr, String url, String content) {
// if (!StringUtils.isBlank(content)) {
// Extension ex = getExtension(dr, url);
// if (ex != null)
// ex.setValue(new StringType(content));
// else
// dr.getExtension().add(Factory.newExtension(url, new StringType(content), true));
// }
// }
public static void addMarkdownExtension(DomainResource dr, String url, String content) {
if (!StringUtils.isBlank(content)) {
@ -338,10 +347,10 @@ public class ToolingExtensions {
nc.getExtension().add(Factory.newExtension(EXT_CS_COMMENT, Factory.newString_(comment), true));
}
// public static void markDeprecated(Element nc) {
// setDeprecated(nc);
// }
//
// public static void markDeprecated(Element nc) {
// setDeprecated(nc);
// }
//
public static void addDefinition(Element nc, String definition) {
if (!StringUtils.isBlank(definition))
@ -477,37 +486,37 @@ public class ToolingExtensions {
public static String getCSComment(ConceptDefinitionComponent c) {
return readStringExtension(c, EXT_CS_COMMENT);
}
//
// public static Boolean getDeprecated(Element c) {
// return readBooleanExtension(c, EXT_DEPRECATED);
// }
//
// public static Boolean getDeprecated(Element c) {
// return readBooleanExtension(c, EXT_DEPRECATED);
// }
public static boolean hasCSComment(ConceptDefinitionComponent c) {
return findStringExtension(c, EXT_CS_COMMENT);
}
// public static boolean hasDeprecated(Element c) {
// return findBooleanExtension(c, EXT_DEPRECATED);
// }
// public static boolean hasDeprecated(Element c) {
// return findBooleanExtension(c, EXT_DEPRECATED);
// }
public static void addFlyOver(QuestionnaireItemComponent item, String text, String linkId){
if (!StringUtils.isBlank(text)) {
QuestionnaireItemComponent display = item.addItem();
display.setType(QuestionnaireItemType.DISPLAY);
display.setText(text);
display.setLinkId(linkId);
display.getExtension().add(Factory.newExtension(EXT_CONTROL, Factory.newCodeableConcept("flyover", "http://hl7.org/fhir/questionnaire-item-control", "Fly-over"), true));
QuestionnaireItemComponent display = item.addItem();
display.setType(QuestionnaireItemType.DISPLAY);
display.setText(text);
display.setLinkId(linkId);
display.getExtension().add(Factory.newExtension(EXT_CONTROL, Factory.newCodeableConcept("flyover", "http://hl7.org/fhir/questionnaire-item-control", "Fly-over"), true));
}
}
public static void addMin(QuestionnaireItemComponent item, int min) {
item.getExtension().add(Factory.newExtension(EXT_MINOCCURS, Factory.newInteger(min), true));
}
public static void addMax(QuestionnaireItemComponent item, int max) {
item.getExtension().add(Factory.newExtension(EXT_MAXOCCURS, Factory.newInteger(max), true));
}
public static void addFhirType(QuestionnaireItemComponent group, String value) {
group.getExtension().add(Factory.newExtension(EXT_FHIRTYPE, Factory.newString_(value), true));
}
@ -524,9 +533,9 @@ public class ToolingExtensions {
group.getExtension().add(Factory.newExtension(EXT_REFERENCEFILTER, Factory.newString_(value), true));
}
public static void addIdentifier(Element element, Identifier value) {
element.getExtension().add(Factory.newExtension(EXT_IDENTIFIER, value, true));
}
// public static void addIdentifier(Element element, Identifier value) {
// element.getExtension().add(Factory.newExtension(EXT_IDENTIFIER, value, true));
// }
/**
* @param name the identity of the extension of interest
@ -559,7 +568,7 @@ public class ToolingExtensions {
public static void setStringExtension(DomainResource resource, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(resource, uri);
Extension ext = getExtension(resource, uri);
if (ext != null)
ext.setValue(new StringType(value));
else
@ -569,7 +578,7 @@ public class ToolingExtensions {
public static void setStringExtension(Element resource, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(resource, uri);
Extension ext = getExtension(resource, uri);
if (ext != null)
ext.setValue(new StringType(value));
else
@ -579,7 +588,7 @@ public class ToolingExtensions {
public static void setCodeExtension(DomainResource resource, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(resource, uri);
if (ext != null)
ext.setValue(new CodeType(value));
@ -590,7 +599,7 @@ public class ToolingExtensions {
public static void setCodeExtension(Element element, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(element, uri);
if (ext != null)
ext.setValue(new CodeType(value));
@ -606,34 +615,34 @@ public class ToolingExtensions {
resource.getExtension().add(new Extension(uri).setValue(new IntegerType(value)));
}
// public static String getOID(CodeSystem define) {
// return readStringExtension(define, EXT_OID);
// }
//
// public static String getOID(ValueSet vs) {
// return readStringExtension(vs, EXT_OID);
// }
//
// public static void setOID(CodeSystem define, String oid) throws FHIRFormatError, URISyntaxException {
// if (!oid.startsWith("urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (oid.startsWith("urn:oid:urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (!hasExtension(define, EXT_OID))
// define.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
// else if (!oid.equals(readStringExtension(define, EXT_OID)))
// throw new Error("Attempt to assign multiple OIDs to a code system");
// }
// public static void setOID(ValueSet vs, String oid) throws FHIRFormatError, URISyntaxException {
// if (!oid.startsWith("urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (oid.startsWith("urn:oid:urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (!hasExtension(vs, EXT_OID))
// vs.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
// else if (!oid.equals(readStringExtension(vs, EXT_OID)))
// throw new Error("Attempt to assign multiple OIDs to value set "+vs.getName()+" ("+vs.getUrl()+"). Has "+readStringExtension(vs, EXT_OID)+", trying to add "+oid);
// }
// public static String getOID(CodeSystem define) {
// return readStringExtension(define, EXT_OID);
// }
//
// public static String getOID(ValueSet vs) {
// return readStringExtension(vs, EXT_OID);
// }
//
// public static void setOID(CodeSystem define, String oid) throws FHIRFormatError, URISyntaxException {
// if (!oid.startsWith("urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (oid.startsWith("urn:oid:urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (!hasExtension(define, EXT_OID))
// define.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
// else if (!oid.equals(readStringExtension(define, EXT_OID)))
// throw new Error("Attempt to assign multiple OIDs to a code system");
// }
// public static void setOID(ValueSet vs, String oid) throws FHIRFormatError, URISyntaxException {
// if (!oid.startsWith("urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (oid.startsWith("urn:oid:urn:oid:"))
// throw new FHIRFormatError("Error in OID format");
// if (!hasExtension(vs, EXT_OID))
// vs.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
// else if (!oid.equals(readStringExtension(vs, EXT_OID)))
// throw new Error("Attempt to assign multiple OIDs to value set "+vs.getName()+" ("+vs.getUrl()+"). Has "+readStringExtension(vs, EXT_OID)+", trying to add "+oid);
// }
public static boolean hasLanguageTranslation(Element element, String lang) {
for (Extension e : element.getExtension()) {
@ -664,7 +673,7 @@ public class ToolingExtensions {
public static void addLanguageTranslation(Element element, String lang, String value) {
if (Utilities.noString(lang) || Utilities.noString(value))
return;
Extension extension = new Extension().setUrl(EXT_TRANSLATION);
extension.addExtension().setUrl("lang").setValue(new CodeType(lang));
extension.addExtension().setUrl("content").setValue(new StringType(value));
@ -703,23 +712,23 @@ public class ToolingExtensions {
return results;
}
// public static void addDEReference(DataElement de, String value) {
// for (Extension e : de.getExtension())
// if (e.getUrl().equals(EXT_CIMI_REFERENCE)) {
// e.setValue(new UriType(value));
// return;
// }
// de.getExtension().add(new Extension().setUrl(EXT_CIMI_REFERENCE).setValue(new UriType(value)));
// }
// public static void addDEReference(DataElement de, String value) {
// for (Extension e : de.getExtension())
// if (e.getUrl().equals(EXT_CIMI_REFERENCE)) {
// e.setValue(new UriType(value));
// return;
// }
// de.getExtension().add(new Extension().setUrl(EXT_CIMI_REFERENCE).setValue(new UriType(value)));
// }
// public static void setDeprecated(Element nc) {
// for (Extension e : nc.getExtension())
// if (e.getUrl().equals(EXT_DEPRECATED)) {
// e.setValue(new BooleanType(true));
// return;
// }
// nc.getExtension().add(new Extension().setUrl(EXT_DEPRECATED).setValue(new BooleanType(true)));
// }
// public static void setDeprecated(Element nc) {
// for (Extension e : nc.getExtension())
// if (e.getUrl().equals(EXT_DEPRECATED)) {
// e.setValue(new BooleanType(true));
// return;
// }
// nc.getExtension().add(new Extension().setUrl(EXT_DEPRECATED).setValue(new BooleanType(true)));
// }
public static void setExtension(Element focus, String url, Coding c) {
for (Extension e : focus.getExtension())
@ -739,7 +748,7 @@ public class ToolingExtensions {
}
}
}
public static void removeExtension(Element focus, String url) {
Iterator<Extension> i = focus.getExtension().iterator();
while (i.hasNext()) {
@ -876,7 +885,7 @@ public class ToolingExtensions {
return readStringExtension(type, EXT_RENDERED_VALUE);
return type.primitiveValue();
}
public static String getPresentation(Element holder, PrimitiveType<?> type) {
if (holder.hasExtension(EXT_RENDERED_VALUE))
return readStringExtension(holder, EXT_RENDERED_VALUE);
@ -884,15 +893,15 @@ public class ToolingExtensions {
return readStringExtension(type, EXT_RENDERED_VALUE);
return type.primitiveValue();
}
// public static boolean hasOID(ValueSet vs) {
// return hasExtension(vs, EXT_OID);
// }
//
// public static boolean hasOID(CodeSystem cs) {
// return hasExtension(cs, EXT_OID);
// }
//
// public static boolean hasOID(ValueSet vs) {
// return hasExtension(vs, EXT_OID);
// }
//
// public static boolean hasOID(CodeSystem cs) {
// return hasExtension(cs, EXT_OID);
// }
//
public static void addUrlExtension(Element e, String url, String content) {
if (!StringUtils.isBlank(content)) {
Extension ex = getExtension(e, url);
@ -938,7 +947,7 @@ public class ToolingExtensions {
}
}
}
for (Property p : base.children() ) {
for (Base v : p.getValues()) {
if (usesExtension(url, v)) {
@ -965,5 +974,5 @@ public class ToolingExtensions {
}
}

View File

@ -99,6 +99,9 @@ public interface IResourceValidator {
boolean isNoUnicodeBiDiControlChars();
void setNoUnicodeBiDiControlChars(boolean noUnicodeBiDiControlChars);
boolean isForPublication();
void setForPublication(boolean forPublication);
/**
* Whether being unable to resolve a profile in found in Resource.meta.profile or ElementDefinition.type.profile or targetProfile is an error or just a warning
*/

View File

@ -0,0 +1,70 @@
package org.hl7.fhir.r5.formats;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r5.model.DataType;
import org.hl7.fhir.r5.model.HumanName;
import org.hl7.fhir.r5.model.Patient;
import org.hl7.fhir.r5.model.Resource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
public class ParserBaseTest {
public static final String SLASHED_O = "ø";
private ParserBase parserBase;
@BeforeEach
public void beforeEach() {
parserBase = new ParserBase() {
@Override
public ParserType getType() {
return null;
}
@Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
return null;
}
@Override
public DataType parseType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public DataType parseAnyType(InputStream input, String knownType) throws IOException, FHIRFormatError {
return null;
}
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
@Override
public void compose(OutputStream stream, DataType type, String rootName) throws IOException {
stream.write(SLASHED_O.getBytes("UTF-8"));
}
};
}
@Test
public void composeString_forResource_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(Resource.class));
assertEquals(SLASHED_O, actualString);
}
@Test
public void composeString_forDataType_worksForCurrentEncoding() throws IOException {
String actualString = parserBase.composeString(mock(DataType.class), "dummyName");
assertEquals(SLASHED_O, actualString);
}
}

View File

@ -9,16 +9,11 @@
}
}}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.0.1"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.6.0"}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------

View File

@ -41,7 +41,7 @@
}
}}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
@ -85,6 +85,6 @@ e: {
}
}}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------

View File

@ -9,16 +9,11 @@
}
}}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.0.1"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.6.0"}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------

View File

@ -1,106 +1,4 @@
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"inactive" : true,
"include" : [{
"system" : "http://unitsofmeasure.org",
"concept" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "second"
}],
"code" : "s",
"display" : "second",
"designation" : [{
"language" : "zh",
"value" : "秒"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "minute"
}],
"code" : "min",
"display" : "minute",
"designation" : [{
"language" : "zh",
"value" : "分钟"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "hour"
}],
"code" : "h",
"display" : "hour",
"designation" : [{
"language" : "zh",
"value" : "小时"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "day"
}],
"code" : "d",
"display" : "day",
"designation" : [{
"language" : "zh",
"value" : "天"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "week"
}],
"code" : "wk",
"display" : "week",
"designation" : [{
"language" : "zh",
"value" : "星期"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "month"
}],
"code" : "mo",
"display" : "month",
"designation" : [{
"language" : "zh",
"value" : "月"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "year"
}],
"code" : "a",
"display" : "year",
"designation" : [{
"language" : "zh",
"value" : "年"
}]
}]
}]
}
}}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
@ -195,11 +93,29 @@ e: {
}
}}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.6.0"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"inactive" : true,
"include" : [{
"system" : "http://unitsofmeasure.org"
}]
}
}}####
e: {
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/ucum-units", "version": "5.0.0-ballot"}####
e: {
"error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null"
}
-------------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -73,7 +73,7 @@ public class MarkDownProcessor {
Set<Extension> extensions = Collections.singleton(TablesExtension.create());
Parser parser = Parser.builder().extensions(extensions).build();
Node document = parser.parse(source);
HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build();
HtmlRenderer renderer = HtmlRenderer.builder().escapeHtml(true).extensions(extensions).build();
String html = renderer.render(document);
html = html.replace("<table>", "<table class=\"grid\">");
return html;

View File

@ -252,6 +252,10 @@ public class Utilities {
return new Inflector().camelCase(value.trim().replace(" ", "_"), false);
}
public static String upperCamelCase(String value) {
return new Inflector().upperCamelCase(value.trim().replace(" ", "_"));
}
public static String escapeXml(String doco) {
if (doco == null)
return "";

View File

@ -627,6 +627,14 @@ public class I18nConstants {
public static final String VALUESET_NO_SYSTEM_WARNING = "VALUESET_NO_SYSTEM_WARNING";
public static final String VALUESET_REFERENCE_INVALID_TYPE = "VALUESET_REFERENCE_INVALID_TYPE";
public static final String VALUESET_REFERENCE_UNKNOWN = "VALUESET_REFERENCE_UNKNOWN";
public static final String VALUESET_SHAREABLE_MISSING = "VALUESET_SHAREABLE_MISSING";
public static final String VALUESET_SHAREABLE_MISSING_HL7 = "VALUESET_SHAREABLE_MISSING_HL7";
public static final String VALUESET_SHAREABLE_EXTRA_MISSING_HL7 = "VALUESET_SHAREABLE_EXTRA_MISSING_HL7";
public static final String VALUESET_SHAREABLE_EXTRA_MISSING = "VALUESET_SHAREABLE_EXTRA_MISSING";
public static final String CODESYSTEM_SHAREABLE_MISSING = "CODESYSTEM_SHAREABLE_MISSING";
public static final String CODESYSTEM_SHAREABLE_MISSING_HL7 = "CODESYSTEM_SHAREABLE_MISSING_HL7";
public static final String CODESYSTEM_SHAREABLE_EXTRA_MISSING_HL7 = "CODESYSTEM_SHAREABLE_EXTRA_MISSING_HL7";
public static final String CODESYSTEM_SHAREABLE_EXTRA_MISSING = "CODESYSTEM_SHAREABLE_EXTRA_MISSING";
public static final String VALUESET_UNC_SYSTEM_WARNING = "VALUESET_UNC_SYSTEM_WARNING";
public static final String VALUESET_UNC_SYSTEM_WARNING_VER = "VALUESET_UNC_SYSTEM_WARNING_VER";
public static final String VALUESET_IMPORT_UNION_INTERSECTION = "VALUESET_IMPORT_UNION_INTERSECTION";

View File

@ -1,5 +1,7 @@
package org.hl7.fhir.utilities.json;
import static org.junit.jupiter.api.DynamicContainer.dynamicContainer;
import java.io.File;
/*
@ -375,6 +377,10 @@ public class JsonTrackingParser {
return parse(TextFile.bytesToString(stream), null);
}
public static JsonArray parseJsonArray(byte[] stream) throws IOException {
return parseArray(TextFile.bytesToString(stream), null);
}
public static JsonObject parseJson(byte[] stream, boolean allowDuplicates) throws IOException {
return parse(TextFile.bytesToString(stream), null, allowDuplicates);
}
@ -391,17 +397,34 @@ public class JsonTrackingParser {
return parse(source, map, false);
}
public static JsonArray parseArray(String source, Map<JsonElement, LocationData> map) throws IOException {
return parseArray(source, map, false);
}
public static JsonObject parse(String source, Map<JsonElement, LocationData> map, boolean allowDuplicates) throws IOException {
return parse(source, map, allowDuplicates, false);
}
public static JsonArray parseArray(String source, Map<JsonElement, LocationData> map, boolean allowDuplicates) throws IOException {
return parseArray(source, map, allowDuplicates, false);
}
public static JsonObject parse(String source, Map<JsonElement, LocationData> map, boolean allowDuplicates, boolean allowComments) throws IOException {
JsonTrackingParser self = new JsonTrackingParser();
self.map = map;
self.setErrorOnDuplicates(!allowDuplicates);
self.setAllowComments(allowComments);
JsonTrackingParser self = new JsonTrackingParser();
self.map = map;
self.setErrorOnDuplicates(!allowDuplicates);
self.setAllowComments(allowComments);
return self.parse(Utilities.stripBOM(source));
}
}
public static JsonArray parseArray(String source, Map<JsonElement, LocationData> map, boolean allowDuplicates, boolean allowComments) throws IOException {
JsonTrackingParser self = new JsonTrackingParser();
self.map = map;
self.setErrorOnDuplicates(!allowDuplicates);
self.setAllowComments(allowComments);
return self.parseArray(Utilities.stripBOM(source));
}
private JsonObject parse(String source) throws IOException {
lexer = new Lexer(source);
@ -421,6 +444,10 @@ public class JsonTrackingParser {
return result;
}
private JsonArray parseArray(String source) throws IOException {
return new Gson().fromJson(source, JsonArray.class);
}
private void readObject(JsonObject obj, boolean root) throws IOException {
if (map != null)
map.put(obj, lexer.location.copy());
@ -703,5 +730,11 @@ public class JsonTrackingParser {
return parseJson(res.getContent());
}
public static JsonArray fetchJsonArray(String source) throws IOException {
SimpleHTTPClient fetcher = new SimpleHTTPClient();
HTTPResult res = fetcher.get(source+"?nocache=" + System.currentTimeMillis());
res.checkThrowException();
return parseJsonArray(res.getContent());
}
}

View File

@ -165,5 +165,4 @@ public class JsonUtilities {
}
return res;
}
}

View File

@ -227,7 +227,7 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
public String getLatestVersion(String id) throws IOException {
for (String nextPackageServer : getPackageServers()) {
// special case:
if (!(CommonPackages.ID_PUBPACK.equals(id) && PackageClient.PRIMARY_SERVER.equals(nextPackageServer))) {
if (!(Utilities.existsInList(id,CommonPackages.ID_PUBPACK, "hl7.terminology.r5") && PackageClient.PRIMARY_SERVER.equals(nextPackageServer))) {
CachingPackageClient pc = new CachingPackageClient(nextPackageServer);
try {
return pc.getLatestVersion(id);

View File

@ -71,8 +71,8 @@ public class PackageHacker {
}
private void change(JsonObject npm) throws FileNotFoundException, IOException {
fixVersions(npm);
// npm.remove("notForPublication");
// fixVersions(npm);
npm.remove("notForPublication");
// npm.addProperty("url", "http://hl7.org/fhir/us/carin-rtpbc/STU1");
// npm.remove("name");
// npm.addProperty("name", "hl7.fhir.uv.smart-app-launch");
@ -80,10 +80,10 @@ public class PackageHacker {
// npm.addProperty("canonical", "http://hl7.org/fhir/us/davinci-drug-formulary");
//// npm.remove("description");
//// npm.addProperty("description", "Group Wrapper that includes all the R4 packages");
npm.remove("url");
npm.addProperty("url", "http://hl7.org/fhir/R4B");
npm.remove("homepage");
npm.addProperty("homepage", "http://hl7.org/fhir/R4B");
// npm.remove("url");
// npm.addProperty("url", "http://hl7.org/fhir/R4B");
// npm.remove("homepage");
// npm.addProperty("homepage", "http://hl7.org/fhir/R4B");
// npm.remove("dependencies");
// JsonObject dep = new JsonObject();
// npm.add("dependencies", dep);

View File

@ -803,8 +803,10 @@ public class XhtmlParser {
readChar();
if (peekChar() == '>') {
done = true;
} else
s.append("--");
} else {
pushChar('-');
s.append("-");
}
} else
s.append('-');
} else if (doctypeEntities && c == ']') {

View File

@ -522,11 +522,11 @@ SEARCHPARAMETER_NOTFOUND = Unable to find the base Search Parameter {0} so can''
SEARCHPARAMETER_BASE_WRONG = The resource type {1} is not listed as a base in the SearchParameter this is derived from ({0})
SEARCHPARAMETER_TYPE_WRONG = The type {1} is different to the type {0} in the derivedFrom SearchParameter
SEARCHPARAMETER_EXP_WRONG = The expression ''{2}'' is not compatible with the expression ''{1}'' in the derivedFrom SearchParameter {0}, and this likely indicates that the derivation relationship is not valid
VALUESET_NO_SYSTEM_WARNING = No System specified, so Concepts and Filters can''t be checked
VALUESET_NO_SYSTEM_WARNING = No System specified, so Concepts and Filters can't be checked
VALUESET_INCLUDE_INVALID_CONCEPT_CODE = The code {1} is not valid in the system {0}
VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER = The code {2} is not valid in the system {0} version {1}
VALUESET_UNC_SYSTEM_WARNING = Unknown System specified, so Concepts and Filters can''t be checked
VALUESET_UNC_SYSTEM_WARNING_VER = Unknown System/Version specified, so Concepts and Filters can''t be checked
VALUESET_UNC_SYSTEM_WARNING = Unknown System ''{0}'' specified, so Concepts and Filters can't be checked
VALUESET_UNC_SYSTEM_WARNING_VER = Unknown System/Version ''{0}'' specified, so Concepts and Filters can't be checked
Extension_PROF_Type = The Profile ''{0}'' definition allows for the type {1} but found type {2}
TYPE_CHECKS_PATTERN_CC = The pattern [system {0}, code {1}, and display ''{2}''] defined in the profile {3} not found. Issues: {4}
TYPE_CHECKS_PATTERN_CC_US = The pattern [system {0}, code {1}, display ''{2}'' and userSelected {5}] defined in the profile {3} not found. Issues: {4}
@ -722,3 +722,11 @@ BUNDLE_BUNDLE_POSSIBLE_MATCH_NO_FU = Entry {0} matches the reference {1} by type
BUNDLE_BUNDLE_POSSIBLE_MATCH_WRONG_FU = Entry {0} matches the reference {1} by type and id but it''s fullUrl {2} does not match the full target URL {3} by Bundle resolution rules
SD_ILLEGAL_CHARACTERISTICS = This element has a {0} but the types {1} to do not make this kind of constraint relevant
SD_VALUE_COMPLEX_FIXED = For the complex type {0}, consider using a pattern rather than a fixed value to avoid over-constraining the instance
VALUESET_SHAREABLE_MISSING = The ShareableValueSet profile says that the {0} element is mandatory, but it is not present. Published value sets SHOULD conform to the ShareableValueSet profile
VALUESET_SHAREABLE_EXTRA_MISSING = The ShareableValueSet profile recommends that the {0} element is populated, but it is not present. Published value sets SHOULD conform to the ShareableValueSet profile
VALUESET_SHAREABLE_MISSING_HL7 = The ShareableValueSet profile says that the {0} element is mandatory, but it is not found. HL7 Published value sets SHALL conform to the ShareableValueSet profile
VALUESET_SHAREABLE_EXTRA_MISSING_HL7 = The ShareableValueSet profile recommends that the {0} element is populated, but it is not found. HL7 Published value sets SHALL conform to the ShareableValueSet profile
CODESYSTEM_SHAREABLE_MISSING = The ShareableCodeSystem profile says that the {0} element is mandatory, but it is not present. Published value sets SHOULD conform to the ShareableCodeSystem profile
CODESYSTEM_SHAREABLE_EXTRA_MISSING = The ShareableCodeSystem profile recommends that the {0} element is populated, but it is not present. Published value sets SHOULD conform to the ShareableCodeSystem profile
CODESYSTEM_SHAREABLE_MISSING_HL7 = The ShareableCodeSystem profile says that the {0} element is mandatory, but it is not found. HL7 Published value sets SHALL conform to the ShareableCodeSystem profile
CODESYSTEM_SHAREABLE_EXTRA_MISSING_HL7 = The ShareableCodeSystem profile recommends that the {0} element is populated, but it is not found. HL7 Published value sets SHALL conform to the ShareableCodeSystem profile

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.63-SNAPSHOT</version>
<version>5.6.67-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -731,6 +731,9 @@ public class BaseValidator implements IValidationContextResourceLoader {
protected ValueSet resolveBindingReference(DomainResource ctxt, String reference, String uri) {
if (reference != null) {
if (reference.equals("http://www.rfc-editor.org/bcp/bcp13.txt")) {
reference = "http://hl7.org/fhir/ValueSet/mimetypes";
}
if (reference.startsWith("#")) {
for (Resource c : ctxt.getContained()) {
if (c.getId().equals(reference.substring(1)) && (c instanceof ValueSet))
@ -1152,5 +1155,8 @@ public class BaseValidator implements IValidationContextResourceLoader {
return level;
}
protected boolean isHL7(Element cr) {
String url = cr.getChildValue("url");
return url != null && url.contains("hl7");
}
}

View File

@ -156,6 +156,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
@Getter @Setter private boolean noUnicodeBiDiControlChars;
@Getter @Setter private boolean securityChecks;
@Getter @Setter private boolean crumbTrails;
@Getter @Setter private boolean forPublication;
@Getter @Setter private boolean allowExampleUrls;
@Getter @Setter private boolean showMessagesFromReferences;
@Getter @Setter private boolean doImplicitFHIRPathStringConversion;
@ -614,6 +615,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
validator.setNoExtensibleWarnings(noExtensibleBindingMessages);
validator.setSecurityChecks(securityChecks);
validator.setCrumbTrails(crumbTrails);
validator.setForPublication(forPublication);
validator.setAllowExamples(allowExampleUrls);
validator.setShowMessagesFromReferences(showMessagesFromReferences);
validator.getContext().setLocale(locale);

View File

@ -97,6 +97,9 @@ public class CliContext {
@JsonProperty("crumbTrails")
private boolean crumbTrails = false;
@JsonProperty("forPublication")
private boolean forPublication = false;
@JsonProperty("allowExampleUrls")
private boolean allowExampleUrls = false;
@ -548,6 +551,14 @@ public class CliContext {
this.crumbTrails = crumbTrails;
}
public boolean isForPublication() {
return forPublication;
}
public void setForPublication(boolean forPublication) {
this.forPublication = forPublication;
}
public boolean isAllowExampleUrls() {
return allowExampleUrls;
}
@ -623,6 +634,7 @@ public class CliContext {
Objects.equals(profiles, that.profiles) &&
Objects.equals(sources, that.sources) &&
Objects.equals(crumbTrails, that.crumbTrails) &&
Objects.equals(forPublication, that.forPublication) &&
Objects.equals(allowExampleUrls, that.allowExampleUrls) &&
Objects.equals(showTimes, that.showTimes) &&
mode == that.mode &&
@ -636,7 +648,7 @@ public class CliContext {
public int hashCode() {
return Objects.hash(doNative, extensions, hintAboutNonMustSupport, recursive, doDebug, assumeValidRestReferences, canDoNative, noInternalCaching,
noExtensibleBindingMessages, noInvariants, wantInvariantsInMessages, map, output, htmlOutput, txServer, sv, txLog, txCache, mapLog, lang, fhirpath, snomedCT,
targetVer, igs, questionnaireMode, level, profiles, sources, mode, locale, locations, crumbTrails, showTimes, allowExampleUrls, outputStyle, jurisdiction, noUnicodeBiDiControlChars);
targetVer, igs, questionnaireMode, level, profiles, sources, mode, locale, locations, crumbTrails, forPublication, showTimes, allowExampleUrls, outputStyle, jurisdiction, noUnicodeBiDiControlChars);
}
@Override
@ -674,6 +686,7 @@ public class CliContext {
", mode=" + mode +
", securityChecks=" + securityChecks +
", crumbTrails=" + crumbTrails +
", forPublication=" + forPublication +
", outputStyle=" + outputStyle +
", jurisdiction=" + jurisdiction +
", allowExampleUrls=" + allowExampleUrls +

View File

@ -378,6 +378,7 @@ public class ValidationService {
validator.setWantInvariantInMessage(cliContext.isWantInvariantsInMessages());
validator.setSecurityChecks(cliContext.isSecurityChecks());
validator.setCrumbTrails(cliContext.isCrumbTrails());
validator.setForPublication(cliContext.isForPublication());
validator.setShowTimes(cliContext.isShowTimes());
validator.setAllowExampleUrls(cliContext.isAllowExampleUrls());
StandAloneValidatorFetcher fetcher = new StandAloneValidatorFetcher(validator.getPcm(), validator.getContext(), validator);

View File

@ -63,6 +63,7 @@ public class Params {
public static final String WANT_INVARIANTS_IN_MESSAGES = "-want-invariants-in-messages";
public static final String SECURITY_CHECKS = "-security-checks";
public static final String CRUMB_TRAIL = "-crumb-trails";
public static final String FOR_PUBLICATION = "-forPublication";
public static final String VERBOSE = "-verbose";
public static final String SHOW_TIMES = "-show-times";
public static final String ALLOW_EXAMPLE_URLS = "-allow-example-urls";
@ -221,6 +222,8 @@ public class Params {
cliContext.setSecurityChecks(true);
} else if (args[i].equals(CRUMB_TRAIL)) {
cliContext.setCrumbTrails(true);
} else if (args[i].equals(FOR_PUBLICATION)) {
cliContext.setForPublication(true);
} else if (args[i].equals(VERBOSE)) {
cliContext.setCrumbTrails(true);
} else if (args[i].equals(ALLOW_EXAMPLE_URLS)) {

View File

@ -426,6 +426,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
private ValidationOptions baseOptions = new ValidationOptions();
private Map<String, CanonicalResourceLookupResult> crLookups = new HashMap<>();
private boolean logProgress;
private boolean forPublication;
public InstanceValidator(IWorkerContext theContext, IEvaluationContext hostServices, XVerExtensionManager xverManager) {
super(theContext, xverManager);
@ -1111,8 +1112,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESET, describeValueSet(binding.getValueSet()));
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESETMAX, describeReference(ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet")), valueset.getUrl());
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESETMAX, describeReference(ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET)), valueset.getUrl());
else
warning(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESET_EXT, describeValueSet(binding.getValueSet()));
}
@ -1141,7 +1142,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (!vr.isOk()) {
bindingsOk = false;
if (vr.getErrorClass() != null && vr.getErrorClass() == TerminologyServiceErrorClass.NOSERVICE) {
if (binding.getStrength() == BindingStrength.REQUIRED || (binding.getStrength() == BindingStrength.EXTENSIBLE && binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))) {
if (binding.getStrength() == BindingStrength.REQUIRED || (binding.getStrength() == BindingStrength.EXTENSIBLE && binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))) {
hint(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOSVC_BOUND_REQ, describeReference(binding.getValueSet()));
} else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
hint(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOSVC_BOUND_EXT, describeReference(binding.getValueSet()));
@ -1150,8 +1151,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
txWarning(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_1_CC, describeReference(binding.getValueSet()), vr.getErrorClass().toString());
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), cc, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), cc, stack);
else if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_2_CC, describeReference(binding.getValueSet()), vr.getErrorClass().toString());
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1163,8 +1164,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED) {
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_1_CC, describeValueSet(binding.getValueSet()), ccSummary(cc));
} else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), cc, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), cc, stack);
if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_2_CC, describeValueSet(binding.getValueSet()), ccSummary(cc));
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1243,8 +1244,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "No code provided, and a code is required from the value set " + describeReference(binding.getValueSet()) + " (" + valueset.getUrl());
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESETMAX, describeReference(ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet")), valueset.getUrl());
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESETMAX, describeReference(ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET)), valueset.getUrl());
else
warning(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CODE_VALUESET_EXT, describeValueSet(binding.getValueSet()));
}
@ -1277,8 +1278,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
txWarning(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_1_CC, describeReference(binding.getValueSet()), vr.getErrorClass().toString());
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), cc, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), cc, stack);
else if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_2_CC, describeReference(binding.getValueSet()), vr.getErrorClass().toString());
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1290,8 +1291,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_1_CC, describeValueSet(binding.getValueSet()), ccSummary(cc));
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), cc, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), cc, stack);
if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_2_CC, describeValueSet(binding.getValueSet()), ccSummary(cc));
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1385,8 +1386,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
txWarning(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_4a, describeReference(binding.getValueSet(), valueset), vr.getMessage(), system+"#"+code);
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), c, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), c, stack);
else if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_5, describeReference(binding.getValueSet(), valueset));
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1397,8 +1398,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
} else if (binding.getStrength() == BindingStrength.REQUIRED)
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_4, describeReference(binding.getValueSet(), valueset), (vr.getMessage() != null ? " (error message = " + vr.getMessage() + ")" : ""), system+"#"+code);
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), c, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), c, stack);
else
txWarning(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_5, describeReference(binding.getValueSet(), valueset), (vr.getMessage() != null ? " (error message = " + vr.getMessage() + ")" : ""), system+"#"+code);
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1643,8 +1644,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (binding.getStrength() == BindingStrength.REQUIRED)
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_4a, describeReference(binding.getValueSet(), valueset), vr.getMessage(), theSystem+"#"+theCode);
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), c, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), c, stack);
else if (!noExtensibleWarnings)
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_CONFIRM_5, describeReference(binding.getValueSet(), valueset));
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -1655,8 +1656,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
} else if (binding.getStrength() == BindingStrength.REQUIRED)
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_12, describeReference(binding.getValueSet(), valueset), getErrorMessage(vr.getMessage()), theSystem+"#"+theCode);
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), c, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), c, stack);
else if (!noExtensibleWarnings) {
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_13, describeReference(binding.getValueSet(), valueset), getErrorMessage(vr.getMessage()), c.getSystem()+"#"+c.getCode());
}
@ -2243,9 +2244,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
warning(errors, IssueType.INVALID, e.line(), e.col(), path, wsok, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_BASE64_NO_WS_WARNING);
}
}
if (ok && context.hasExtension("http://hl7.org/fhir/StructureDefinition/maxSize")) {
if (ok && context.hasExtension(ToolingExtensions.EXT_MAX_SIZE)) {
int size = countBase64DecodedBytes(encoded);
long def = Long.parseLong(ToolingExtensions.readStringExtension(context, "http://hl7.org/fhir/StructureDefinition/maxSize"));
long def = Long.parseLong(ToolingExtensions.readStringExtension(context, ToolingExtensions.EXT_MAX_SIZE));
rule(errors, IssueType.STRUCTURE, e.line(), e.col(), path, size <= def, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_BASE64_TOO_LONG, size, def);
}
@ -2289,9 +2290,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
}
}
if (context.hasExtension("http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces")) {
if (context.hasExtension(ToolingExtensions.EXT_MAX_DECIMALS)) {
int dp = e.primitiveValue().contains(".") ? e.primitiveValue().substring(e.primitiveValue().indexOf(".")+1).length() : 0;
int def = Integer.parseInt(ToolingExtensions.readStringExtension(context, "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"));
int def = Integer.parseInt(ToolingExtensions.readStringExtension(context, ToolingExtensions.EXT_MAX_DECIMALS));
rule(errors, IssueType.STRUCTURE, e.line(), e.col(), path, dp <= def, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DECIMAL_CHARS, dp, def);
}
}
@ -2658,7 +2659,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
} else {
Set<Character> invalidChars = new HashSet<>();
for (char ch : value.toCharArray()) {
if (!(Character.isDigit(ch) || Character.isAlphabetic(ch) || Utilities.existsInList(ch, ';', '?', ':', '@', '&', '=', '+', '$', '.', ',', '/', '%', '-', '_', '~', '#', '[', ']', '!', '\'', '(', ')', '*' ))) {
if (!(Character.isDigit(ch) || Character.isAlphabetic(ch) || Utilities.existsInList(ch, ';', '?', ':', '@', '&', '=', '+', '$', '.', ',', '/', '%', '-', '_', '~', '#', '[', ']', '!', '\'', '(', ')', '*', '|' ))) {
invalidChars.add(ch);
}
}
@ -2731,8 +2732,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
else if (binding.getStrength() == BindingStrength.REQUIRED)
txRule(errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_16, value, describeValueSet(binding.getValueSet()), getErrorMessage(vr.getMessage()));
else if (binding.getStrength() == BindingStrength.EXTENSIBLE) {
if (binding.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"), value, stack);
if (binding.hasExtension(ToolingExtensions.EXT_MAX_VALUESET))
checkMaxValueSet(errors, path, element, profile, ToolingExtensions.readStringExtension(binding, ToolingExtensions.EXT_MAX_VALUESET), value, stack);
else if (!noExtensibleWarnings && !isOkExtension(value, vs))
txWarningForLaterRemoval(element, errors, vr.getTxLink(), IssueType.CODEINVALID, element.line(), element.col(), path, false, I18nConstants.TERMINOLOGY_TX_NOVALID_17, value, describeValueSet(binding.getValueSet()), getErrorMessage(vr.getMessage()));
} else if (binding.getStrength() == BindingStrength.PREFERRED) {
@ -2771,9 +2772,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
// todo: allowedUnits http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits - codeableConcept, or canonical(ValueSet)
// todo: http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation
if (!Utilities.noString(value) && definition.hasExtension("http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces")) {
if (!Utilities.noString(value) && definition.hasExtension(ToolingExtensions.EXT_MAX_DECIMALS)) {
int dp = value.contains(".") ? value.substring(value.indexOf(".")+1).length() : 0;
int def = Integer.parseInt(ToolingExtensions.readStringExtension(definition, "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces"));
int def = Integer.parseInt(ToolingExtensions.readStringExtension(definition, ToolingExtensions.EXT_MAX_DECIMALS));
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, dp <= def, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DECIMAL_CHARS, dp, def);
}
@ -2911,7 +2912,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
} else if (element.hasChild("url")) {
String url = element.getChildValue("url");
if (definition.hasExtension("http://hl7.org/fhir/StructureDefinition/maxSize")) {
if (definition.hasExtension(ToolingExtensions.EXT_MAX_SIZE)) {
try {
if (url.startsWith("http://") || url.startsWith("https://")) {
if (fetcher == null) {
@ -2930,9 +2931,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
}
}
if (definition.hasExtension("http://hl7.org/fhir/StructureDefinition/maxSize")) {
if (definition.hasExtension(ToolingExtensions.EXT_MAX_SIZE)) {
if (warning(errors, IssueType.STRUCTURE, element.line(), element.col(), path, size >= 0, fetchError)) {
long def = Long.parseLong(ToolingExtensions.readStringExtension(definition, "http://hl7.org/fhir/StructureDefinition/maxSize"));
long def = Long.parseLong(ToolingExtensions.readStringExtension(definition, ToolingExtensions.EXT_MAX_SIZE));
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, size <= def, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_ATT_TOO_LONG, size, def);
}
}
@ -4643,7 +4644,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
} else if (element.getType().equals("CapabilityStatement")) {
validateCapabilityStatement(errors, element, stack);
} else if (element.getType().equals("CodeSystem")) {
new CodeSystemValidator(context, timeTracker, xverManager, jurisdiction).validateCodeSystem(errors, element, stack, baseOptions.setLanguage(stack.getWorkingLang()));
new CodeSystemValidator(context, timeTracker, this, xverManager, jurisdiction).validateCodeSystem(errors, element, stack, baseOptions.setLanguage(stack.getWorkingLang()));
} else if (element.getType().equals("SearchParameter")) {
new SearchParameterValidator(context, timeTracker, fpe, xverManager, jurisdiction).validateSearchParameter(errors, element, stack);
} else if (element.getType().equals("StructureDefinition")) {
@ -5693,8 +5694,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
msg = context.formatMessage(I18nConstants.INV_FAILED, inv.getKey() + ": '" + inv.getHuman()+"'")+msg;
if (inv.hasExtension("http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice") &&
ToolingExtensions.readBooleanExtension(inv, "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice")) {
if (inv.hasExtension(ToolingExtensions.EXT_BEST_PRACTICE) &&
ToolingExtensions.readBooleanExtension(inv, ToolingExtensions.EXT_BEST_PRACTICE)) {
if (bpWarnings == BestPracticeWarningLevel.Hint)
hint(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, msg);
else if (bpWarnings == BestPracticeWarningLevel.Warning)
@ -6041,4 +6042,13 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
this.logProgress = logProgress;
}
public boolean isForPublication() {
return forPublication;
}
public void setForPublication(boolean forPublication) {
this.forPublication = forPublication;
}
}

View File

@ -17,17 +17,21 @@ import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import org.hl7.fhir.validation.BaseValidator;
import org.hl7.fhir.validation.TimeTracker;
import org.hl7.fhir.validation.instance.InstanceValidator;
import org.hl7.fhir.validation.instance.utils.NodeStack;
import ca.uhn.fhir.validation.ValidationResult;
public class CodeSystemValidator extends BaseValidator {
public CodeSystemValidator(IWorkerContext context, TimeTracker timeTracker, XVerExtensionManager xverManager, Coding jurisdiction) {
private InstanceValidator parent;
public CodeSystemValidator(IWorkerContext context, TimeTracker timeTracker, InstanceValidator parent, XVerExtensionManager xverManager, Coding jurisdiction) {
super(context, xverManager);
source = Source.InstanceValidator;
this.timeTracker = timeTracker;
this.jurisdiction = jurisdiction;
this.parent = parent;
}
@ -79,8 +83,41 @@ public class CodeSystemValidator extends BaseValidator {
}
}
}
checkShareableCodeSystem(errors, cs, stack);
}
private void checkShareableCodeSystem(List<ValidationMessage> errors, Element cs, NodeStack stack) {
if (parent.isForPublication()) {
if (isHL7(cs)) {
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("url"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "url");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("version"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "version");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("title"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "title");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("name"), I18nConstants.CODESYSTEM_SHAREABLE_EXTRA_MISSING_HL7, "name");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("status"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "status");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("experimental"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "experimental");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("description"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "description");
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("content"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "content");
if (!"supplement".equals(cs.getChildValue("content"))) {
rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING_HL7, "caseSensitive");
}
} else {
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("url"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "url");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("version"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "version");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("title"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "title");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("name"), I18nConstants.CODESYSTEM_SHAREABLE_EXTRA_MISSING, "name");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("status"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "status");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("experimental"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "experimental");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("description"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "description");
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("content"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "content");
if (!"supplement".equals(cs.getChildValue("content"))) {
warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.CODESYSTEM_SHAREABLE_MISSING, "caseSensitive");
}
}
}
}
private void metaChecks(List<ValidationMessage> errors, Element cs, NodeStack stack, String url, String content, String caseSensitive, String hierarchyMeaning, boolean isSupplement) {
if (isSupplement) {
if (!"supplement".equals(content)) {

View File

@ -26,6 +26,7 @@ import org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent;
import org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.renderers.DataRenderer;
import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.r5.utils.XVerExtensionManager;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.Utilities;
@ -338,7 +339,7 @@ public class MeasureValidator extends BaseValidator {
// ratio - score is a number with no value constraints, and maybe with a unit (perhaps constrained by extension)
if (rule(errors, IssueType.REQUIRED, ms.line(), ms.col(), ns.getLiteralPath(), v != null, I18nConstants.MEASURE_MR_SCORE_VALUE_REQUIRED, "ratio")) {
Element unit = ms.getNamedChild("code");
Coding c = m.measure().hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-unit") ? (Coding) m.measure().getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/questionnaire-unit").getValue() : null;
Coding c = m.measure().hasExtension(ToolingExtensions.EXT_Q_UNIT) ? (Coding) m.measure().getExtensionByUrl(ToolingExtensions.EXT_Q_UNIT).getValue() : null;
if (unit != null) {
if (c != null) {
NodeStack nsc = ns.push(unit, -1, unit.getProperty().getDefinition(), unit.getProperty().getDefinition());
@ -361,7 +362,7 @@ public class MeasureValidator extends BaseValidator {
// continuous-variable - score is a quantity with a unit per the extension
if (rule(errors, IssueType.REQUIRED, ms.line(), ms.col(), ns.getLiteralPath(), v != null, I18nConstants.MEASURE_MR_SCORE_VALUE_REQUIRED, "continuous-variable")) {
Element unit = ms.getNamedChild("code");
Coding c = m.measure().hasExtension("http://hl7.org/fhir/StructureDefinition/questionnaire-unit") ? (Coding) m.measure().getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/questionnaire-unit").getValue() : null;
Coding c = m.measure().hasExtension(ToolingExtensions.EXT_Q_UNIT) ? (Coding) m.measure().getExtensionByUrl(ToolingExtensions.EXT_Q_UNIT).getValue() : null;
if (unit != null) {
if (c != null) {
NodeStack nsc = ns.push(unit, -1, unit.getProperty().getDefinition(), unit.getProperty().getDefinition());

View File

@ -78,6 +78,7 @@ public class StructureDefinitionValidator extends BaseValidator {
List<ValidationMessage> msgs = new ArrayList<>();
ProfileUtilities pu = new ProfileUtilities(context, msgs, null);
pu.setXver(xverManager);
pu.setNewSlicingProcessing(!sd.hasFhirVersion() || VersionUtilities.isR4Plus(sd.getFhirVersion().toCode()));
pu.generateSnapshot(base, sd, sd.getUrl(), "http://hl7.org/fhir/R4/", sd.getName());
if (msgs.size() > 0) {
for (ValidationMessage msg : msgs) {
@ -140,9 +141,10 @@ public class StructureDefinitionValidator extends BaseValidator {
tc = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE).primitiveValue();
}
if (Utilities.noString(tc) && type.hasChild("code")) {
if (type.getNamedChild("code").hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type")) {
tc = "*";
}
throw new Error("WTF?");
// if (type.getNamedChild("code").hasExtension(" http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type")) {
// tc = "*";
// }
}
typeCodes.add(tc);
Set<String> tcharacteristics = new HashSet<>();
@ -224,7 +226,6 @@ public class StructureDefinitionValidator extends BaseValidator {
}
}
// if we see fixed[x] or pattern[x] applied to a repeating element, we'll give the user a hint
}
}
@ -236,7 +237,7 @@ public class StructureDefinitionValidator extends BaseValidator {
case "decimal" :return addCharacteristicsForType(set, "has-range", "is-continuous", "has-length");
case "base64Binary" : return addCharacteristicsForType(set, "has-size");
case "instant" : return addCharacteristicsForType(set, "has-range", "is-continuous", "has-length");
case "string" : return addCharacteristicsForType(set, "has-length", "do-translations");
case "string" : return addCharacteristicsForType(set, "has-length", "do-translations", "can-bind");
case "uri" : return addCharacteristicsForType(set, "has-length", "can-bind");
case "date" :return addCharacteristicsForType(set, "has-range", "has-length");
case "dateTime" : return addCharacteristicsForType(set, "has-range", "is-continuous", "has-length");
@ -244,7 +245,7 @@ public class StructureDefinitionValidator extends BaseValidator {
case "canonical" :return addCharacteristicsForType(set, "has-target", "has-length");
case "code" :return addCharacteristicsForType(set, "has-length", "can-bind");
case "id" :return addCharacteristicsForType(set, "has-length");
case "markdown" :return addCharacteristicsForType(set, "do-translations");
case "markdown" :return addCharacteristicsForType(set, "do-translations", "has-length");
case "oid" :return addCharacteristicsForType(set, "has-length", "can-bind");
case "positiveInt" :return addCharacteristicsForType(set, "has-range", "has-length");
case "unsignedInt" :return addCharacteristicsForType(set, "has-range", "has-length");
@ -299,10 +300,10 @@ public class StructureDefinitionValidator extends BaseValidator {
case "BackboneElement" :return addCharacteristicsForType(set);
default:
if (context.getResourceNames().contains(tc))
return addCharacteristicsForType(set);
else
throw new Error("Unhandled data type in addCharacterstics: "+tc);
if (!context.getResourceNames().contains(tc)) {
System.out.println("Unhandled data type in addCharacteristics: "+tc);
}
return addCharacteristicsForType(set);
}
}
@ -339,7 +340,7 @@ public class StructureDefinitionValidator extends BaseValidator {
}
StructureDefinition sd = context.fetchTypeDefinition(tc);
if (sd != null) {
if (sd.hasExtension(ToolingExtensions.EXT_BINDING_METHOD)) {
if (sd.hasExtension(ToolingExtensions.EXT_BINDING_STYLE)) {
return tc;
}
}

View File

@ -61,8 +61,32 @@ public class ValueSetValidator extends BaseValidator {
cc++;
}
}
checkShareableValueSet(errors, vs, stack);
}
private void checkShareableValueSet(List<ValidationMessage> errors, Element vs, NodeStack stack) {
if (parent.isForPublication()) {
if (isHL7(vs)) {
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("url"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "url");
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("version"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "version");
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("title"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "title");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("name"), I18nConstants.VALUESET_SHAREABLE_EXTRA_MISSING_HL7, "name");
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("status"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "status");
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("experimental"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "experimental");
rule(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("description"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "description");
} else {
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("url"), I18nConstants.VALUESET_SHAREABLE_MISSING, "url");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("version"), I18nConstants.VALUESET_SHAREABLE_MISSING, "version");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("title"), I18nConstants.VALUESET_SHAREABLE_MISSING, "title");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("name"), I18nConstants.VALUESET_SHAREABLE_EXTRA_MISSING, "name");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("status"), I18nConstants.VALUESET_SHAREABLE_MISSING, "status");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("experimental"), I18nConstants.VALUESET_SHAREABLE_MISSING, "experimental");
warning(errors, IssueType.REQUIRED, vs.line(), vs.col(), stack.getLiteralPath(), vs.hasChild("description"), I18nConstants.VALUESET_SHAREABLE_MISSING, "description");
}
}
}
private void validateValueSetCompose(List<ValidationMessage> errors, Element compose, NodeStack stack, String vsid, boolean retired) {
List<Element> includes = compose.getChildrenByName("include");
int ci = 0;
@ -145,7 +169,7 @@ public class ValueSetValidator extends BaseValidator {
}
cf++;
}
warning(errors, IssueType.BUSINESSRULE, stack.getLiteralPath(), systemOk, version == null ? I18nConstants.VALUESET_UNC_SYSTEM_WARNING : I18nConstants.VALUESET_UNC_SYSTEM_WARNING_VER);
warning(errors, IssueType.BUSINESSRULE, stack.getLiteralPath(), systemOk, version == null ? I18nConstants.VALUESET_UNC_SYSTEM_WARNING : I18nConstants.VALUESET_UNC_SYSTEM_WARNING_VER, system);
} else {
warning(errors, IssueType.BUSINESSRULE, stack.getLiteralPath(), filters.size() == 0 && concepts.size() == 0, I18nConstants.VALUESET_NO_SYSTEM_WARNING);
}

View File

@ -19,7 +19,9 @@ public class FHIRPathExpressionFixer {
if ("txt-2".equals(key)) {
return "htmlChecks2()";
}
if ("generated='generated' implies source.empty()".equals(expr)) {
return "generation='generated' implies source.empty()";
}
// fixes to string functions in FHIRPath
// ref-1
if (expr.equals("reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource)")) { // R5

View File

@ -12,12 +12,7 @@ e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.6.0"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}

View File

@ -12,12 +12,7 @@ e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.6.0"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}

View File

@ -4,91 +4,7 @@
"compose" : {
"inactive" : true,
"include" : [{
"system" : "http://unitsofmeasure.org",
"concept" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "second"
}],
"code" : "s",
"display" : "second",
"designation" : [{
"language" : "zh",
"value" : "秒"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "minute"
}],
"code" : "min",
"display" : "minute",
"designation" : [{
"language" : "zh",
"value" : "分钟"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "hour"
}],
"code" : "h",
"display" : "hour",
"designation" : [{
"language" : "zh",
"value" : "小时"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "day"
}],
"code" : "d",
"display" : "day",
"designation" : [{
"language" : "zh",
"value" : "天"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "week"
}],
"code" : "wk",
"display" : "week",
"designation" : [{
"language" : "zh",
"value" : "星期"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "month"
}],
"code" : "mo",
"display" : "month",
"designation" : [{
"language" : "zh",
"value" : "月"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "year"
}],
"code" : "a",
"display" : "year",
"designation" : [{
"language" : "zh",
"value" : "年"
}]
}]
"system" : "http://unitsofmeasure.org"
}]
}
}}####
@ -96,7 +12,7 @@ e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.0.1"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/ucum-units", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}
@ -198,7 +114,7 @@ e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.6.0"}####
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "5.0.0-ballot"}####
e: {
"error" : "java.lang.NullPointerException"
}

View File

@ -16,7 +16,7 @@
"version" : "1.0.2-2.0.14",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-06-17T22:07:09.897Z",
"date" : "2022-09-22T20:21:24.315Z",
"contact" : [{
"telecom" : [{
"system" : "other",

View File

@ -16,7 +16,7 @@
"version" : "3.0.2-2.0.14",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-06-15T16:31:15.631Z",
"date" : "2022-09-16T12:12:41.427Z",
"contact" : [{
"telecom" : [{
"system" : "other",

View File

@ -2838,6 +2838,9 @@
{
"uri" : "http://nucc.org/provider-taxonomy"
},
{
"uri" : "http://radlex.org"
},
{
"uri" : "http://snomed.info/sct"
},
@ -3225,6 +3228,9 @@
{
"uri" : "http://terminology.hl7.org/CodeSystem/hl7-work-group"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/icd-o-3"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/immunization-evaluation-dose-status"
},

View File

@ -16,7 +16,7 @@
"version" : "3.0.2-2.0.14",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-06-15T16:31:15.631Z",
"date" : "2022-09-16T12:12:41.427Z",
"contact" : [{
"telecom" : [{
"system" : "other",

View File

@ -2838,6 +2838,9 @@
{
"uri" : "http://nucc.org/provider-taxonomy"
},
{
"uri" : "http://radlex.org"
},
{
"uri" : "http://snomed.info/sct"
},
@ -3225,6 +3228,9 @@
{
"uri" : "http://terminology.hl7.org/CodeSystem/hl7-work-group"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/icd-o-3"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/immunization-evaluation-dose-status"
},

View File

@ -130,7 +130,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 823681000000100 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"823681000000100\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#823681000000100) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 823681000000100 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"823681000000100\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#823681000000100) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -140,7 +140,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 886921000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"886921000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886921000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 886921000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"886921000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886921000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -150,7 +150,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1077881000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"1077881000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1077881000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 1077881000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"1077881000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1077881000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -160,7 +160,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887181000000106 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"887181000000106\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887181000000106) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 887181000000106 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"887181000000106\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887181000000106) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -170,7 +170,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887161000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"887161000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887161000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 887161000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"887161000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887161000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -180,7 +180,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1052891000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"1052891000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052891000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 1052891000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"1052891000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052891000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -190,7 +190,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 715851000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"715851000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#715851000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 715851000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"715851000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#715851000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -200,7 +200,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 717121000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"717121000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#717121000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 717121000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"717121000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#717121000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -210,7 +210,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 933361000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"933361000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#933361000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 933361000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"933361000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#933361000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -220,7 +220,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887171000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"887171000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887171000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 887171000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"887171000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887171000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -230,7 +230,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887201000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"887201000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887201000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 887201000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"887201000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887201000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -240,7 +240,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1052951000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"1052951000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052951000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 1052951000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"1052951000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052951000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -250,7 +250,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 886731000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"886731000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886731000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 886731000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"886731000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886731000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -260,7 +260,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887231000000104 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"887231000000104\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887231000000104) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 887231000000104 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"887231000000104\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887231000000104) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -270,7 +270,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 9290701000001101 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"9290701000001101\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#9290701000001101) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 9290701000001101 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"9290701000001101\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#9290701000001101) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -338,7 +338,7 @@ v: {
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 11181000146103 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220331); The code \"11181000146103\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#11181000146103) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
"error" : "Unable to find code 11181000146103 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20220731); The code \"11181000146103\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#11181000146103) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
@ -352,24 +352,3 @@ v: {
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "17621005",
"display" : "Normal (qualifier value)"
}, "url": "http://hl7.org/fhir/ValueSet/security-labels", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Normal",
"code" : "17621005",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "17621005"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Normal",
"code" : "17621005",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@
"version" : "4.0.1-2.0.14",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-06-17T22:02:53.771Z",
"date" : "2022-09-15T13:27:05.487Z",
"contact" : [{
"telecom" : [{
"system" : "other",

View File

@ -5,7 +5,7 @@
"version" : "1.0.0",
"name" : "FHIR Reference Server Teminology Capability Statement",
"status" : "active",
"date" : "2022-06-17T22:02:55.131Z",
"date" : "2022-09-12T07:14:02.176Z",
"contact" : [{
"telecom" : [{
"system" : "other",
@ -865,6 +865,9 @@
{
"uri" : "http://nucc.org/provider-taxonomy"
},
{
"uri" : "http://radlex.org"
},
{
"uri" : "http://snomed.info/sct"
},
@ -1267,6 +1270,9 @@
{
"uri" : "http://terminology.hl7.org/CodeSystem/hl7-work-group"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/icd-o-3"
},
{
"uri" : "http://terminology.hl7.org/CodeSystem/immunization-evaluation-dose-status"
},

Some files were not shown because too many files have changed in this diff Show More