Merge pull request #1667 from hapifhir/do-20240625-fix-debugutilities-refs

Remove DebugUtilities references
This commit is contained in:
Grahame Grieve 2024-06-26 06:52:05 +10:00 committed by GitHub
commit e692665790
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 39 deletions

View File

@ -11,7 +11,6 @@ import org.hl7.fhir.r4.model.Narrative;
import org.hl7.fhir.r4.model.Property;
import org.hl7.fhir.r4.model.Resource;
import org.hl7.fhir.r5.renderers.utils.ResourceWrapper;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.xhtml.NodeType;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -81,9 +80,6 @@ public class ResourceWrapperR4 extends ResourceWrapper {
}
private ElementKind determineModelKind(Property p, Base v) {
if ("DataRequirement".equals(v.fhirType())) {
DebugUtilities.breakpoint();
}
if (v.isPrimitive()) {
return ElementKind.PrimitiveType;
} else if (contextUtils.isDatatype(v.fhirType())) {

View File

@ -63,7 +63,6 @@ import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.StringPair;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;

View File

@ -2749,8 +2749,12 @@ public class FHIRPathEngine {
} else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) {
result.add(new DecimalType(new BigDecimal(l.primitiveValue()).add(new BigDecimal(r.primitiveValue()))));
} else if ((l.isDateTime() || l.hasType("Date")) && r.hasType("Quantity")) {
if (l.hasType("Date")) {
result.add(dateAdd((BaseDateTimeType) l, (Quantity) r, false, expr));
} else {
DateTimeType dl = l instanceof DateTimeType ? (DateTimeType) l : new DateTimeType(l.primitiveValue());
result.add(dateAdd(dl, (Quantity) r, false, expr));
}
} else {
throw makeException(expr, I18nConstants.FHIRPATH_OP_INCOMPATIBLE, "+", left.get(0).fhirType(), right.get(0).fhirType());
}
@ -3014,8 +3018,12 @@ public class FHIRPathEngine {
result.add(qty.copy().setValue(qty.getValue().abs()));
}
} else if ((l.isDateTime() || l.hasType("Date")) && r.hasType("Quantity")) {
if (l.hasType("Date")) {
result.add(dateAdd((BaseDateTimeType) l, (Quantity) r, true, expr));
} else {
DateTimeType dl = l instanceof DateTimeType ? (DateTimeType) l : new DateTimeType(l.primitiveValue());
result.add(dateAdd(dl, (Quantity) r, true, expr));
}
} else {
throw makeException(expr, I18nConstants.FHIRPATH_OP_INCOMPATIBLE, "-", left.get(0).fhirType(), right.get(0).fhirType());
}

View File

@ -13,7 +13,6 @@ import org.hl7.fhir.r5.model.Provenance;
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
import org.hl7.fhir.r5.renderers.utils.ResourceWrapper;
import org.hl7.fhir.r5.utils.EOperationOutcome;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.xhtml.NodeType;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -36,9 +35,7 @@ public class BundleRenderer extends ResourceRenderer {
@Override
public void buildNarrative(RenderingStatus status, XhtmlNode x, ResourceWrapper b) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
if ("ex-fhir-document-bundle".equals(b.getId())) {
DebugUtilities.breakpoint();
}
List<ResourceWrapper> entries = b.children("entry");
if ("collection".equals(b.primitiveValue("type")) && allEntriesAreHistoryProvenance(entries)) {
// nothing

View File

@ -49,7 +49,6 @@ import org.hl7.fhir.r5.terminologies.JurisdictionUtilities;
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
@ -983,10 +982,6 @@ public class DataRenderer extends Renderer implements CodeResolver {
protected void renderUri(RenderingStatus status, XhtmlNode x, ResourceWrapper uri) throws FHIRFormatError, DefinitionException, IOException {
if (!renderPrimitiveWithNoValue(status, x, uri)) {
String v = uri.primitiveValue();
if ("/Binary/1-note".equals(v)) {
DebugUtilities.breakpoint();
}
if (context.getContextUtilities().isResource(v)) {
v = "http://hl7.org/fhir/"+v;

View File

@ -27,7 +27,6 @@ import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.r5.utils.XVerExtensionManager;
import org.hl7.fhir.r5.utils.XVerExtensionManager.XVerExtensionStatus;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.NodeType;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -329,9 +328,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
if (name.endsWith("[x]"))
name = name.substring(0, name.length() - 3);
if (showCodeDetails || !isDefaultValue(displayHints, p.getValues())) {
if ("library".equals(name)) {
DebugUtilities.breakpoint();
}
para.b().addText(name);
para.tx(": ");
if (renderAsList(child) && p.getValues().size() > 1) {

View File

@ -36,7 +36,7 @@ import org.hl7.fhir.r5.utils.EOperationOutcome;
import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.r5.utils.XVerExtensionManager;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece;
@ -532,9 +532,7 @@ public abstract class ResourceRenderer extends DataRenderer {
protected void renderUri(RenderingStatus status, ResourceWrapper resource, XhtmlNode x, UriType uri) throws FHIRFormatError, DefinitionException, IOException {
if (!renderPrimitiveWithNoValue(status, x, uri)) {
String v = uri.primitiveValue();
if ("/Binary/1-note".equals(v)) {
DebugUtilities.breakpoint();
}
if (v.startsWith("mailto:")) {
x.ah(context.prefixLocalHref(v)).addText(v.substring(7));
} else {
@ -564,9 +562,6 @@ public abstract class ResourceRenderer extends DataRenderer {
protected void renderUri(RenderingStatus status, XhtmlNode x, ResourceWrapper uri) throws FHIRFormatError, DefinitionException, IOException {
if (!renderPrimitiveWithNoValue(status, x, uri)) {
String v = uri.primitiveValue();
if ("/Binary/1-note".equals(v)) {
DebugUtilities.breakpoint();
}
if (context.getContextUtilities().isResource(v)) {
v = "http://hl7.org/fhir/StructureDefinition/"+v;
@ -701,9 +696,7 @@ public abstract class ResourceRenderer extends DataRenderer {
if (url == null) {
return null;
}
if ("http://example.org/fhir/Encounter/doc-example".equals(url)) {
DebugUtilities.breakpoint();
}
if (url.startsWith("#")) {
return resolveContained(resource, url);
} else {

View File

@ -10,7 +10,6 @@ import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Narrative;
import org.hl7.fhir.r5.model.Property;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.utilities.DebugUtilities;
import org.hl7.fhir.utilities.xhtml.NodeType;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -33,9 +32,6 @@ public class ResourceWrapperNative extends ResourceWrapper {
self.name = name;
self.index = index;
self.kind = kind;
if (element == null) {
DebugUtilities.breakpoint();
}
self.element = element;
return self;
}
@ -65,9 +61,7 @@ public class ResourceWrapperNative extends ResourceWrapper {
}
protected void loadTheChildren() {
if (element == null) {
DebugUtilities.breakpoint();
}
for (Property p : element.children()) {
String name = p.getName();
int i = 0;