diff --git a/org.hl7.fhir.r5/src/main/resources/gen/gen.xml b/org.hl7.fhir.r5/src/main/resources/gen/gen.xml index 8dc4230b9..58092715c 100644 --- a/org.hl7.fhir.r5/src/main/resources/gen/gen.xml +++ b/org.hl7.fhir.r5/src/main/resources/gen/gen.xml @@ -111,7 +111,7 @@ Roel

- authored: Jun. 17, 2013, 7:00:00 p.m. + authored: 17-Jun-2013 7:00:00 PM

author: diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java index 61cae3f67..dc38f363d 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java @@ -1098,7 +1098,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat } } } catch (Exception e) { - rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "Error "+e.getMessage()+" validating Coding"); + rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "Error "+e.getMessage()+" validating Coding: " + e.toString()); } } } @@ -2371,13 +2371,17 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat return null; } else { long t = System.nanoTime(); - if (!Utilities.isAbsoluteUrl(reference)) - reference = resolve(uri, reference); - ValueSet fr = context.fetchResource(ValueSet.class, reference); - txTime = txTime + (System.nanoTime() - t); + ValueSet fr = context.fetchResource(ValueSet.class, reference); + if (fr == null) { + if (!Utilities.isAbsoluteUrl(reference)) { + reference = resolve(uri, reference); + fr = context.fetchResource(ValueSet.class, reference); + } + } + txTime = txTime + (System.nanoTime() - t); return fr; } - } else + } else return null; } @@ -2942,11 +2946,11 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L } } - // ok, now we have a list of known items, grouped by linkId. We"ve made an error for anything out of order + // ok, now we have a list of known items, grouped by linkId. We've made an error for anything out of order for (QuestionnaireItemComponent qItem : qItems) { List mapItem = map.get(qItem.getLinkId()); if (mapItem != null){ - rule(errors, IssueType.INVALID, element.line(), element.col(), stack.getLiteralPath(), myEnableWhenEvaluator.isQuestionEnabled(qItem, questionnaireResponseRoot), "Item has answer, even though it is not enabled "+qItem.getLinkId()); + rule(errors, IssueType.INVALID, element.line(), element.col(), stack.getLiteralPath(), myEnableWhenEvaluator.isQuestionEnabled(qItem, questionnaireResponseRoot), "Item with linkId [{0}] has answer, even though it is not enabled", qItem.getLinkId()); validateQuestionannaireResponseItem(qsrc, qItem, errors, mapItem, stack, inProgress, questionnaireResponseRoot); } else { //item is missing, is the question enabled? @@ -3984,11 +3988,11 @@ private String misplacedItemError(QuestionnaireItemComponent qItem) { warning(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); else if (bpWarnings == BestPracticeWarningLevel.Error) rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); + } else if (inv.getSeverity() == ConstraintSeverity.ERROR) { + rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman() + msg + " [" + n.toString() + "]"); + } else if (inv.getSeverity() == ConstraintSeverity.WARNING) { + warning(errors, IssueType.INVARIANT, element.line(), element.line(), path, ok, inv.getHuman() + msg + " [" + n.toString() + "]"); } - if (inv.getSeverity() == ConstraintSeverity.ERROR) - rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); - else if (inv.getSeverity() == ConstraintSeverity.WARNING) - warning(errors, IssueType.INVARIANT, element.line(), element.line(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); } } diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java index fcd1ca15e..9d1c9dbba 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java @@ -1106,7 +1106,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat } } } catch (Exception e) { - rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "Error "+e.getMessage()+" validating Coding"); + rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "Error "+e.getMessage()+" validating Coding: " + e.toString()); } } } @@ -2381,13 +2381,17 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat return null; } else { long t = System.nanoTime(); - if (!Utilities.isAbsoluteUrl(reference)) - reference = resolve(uri, reference); - ValueSet fr = context.fetchResource(ValueSet.class, reference); - txTime = txTime + (System.nanoTime() - t); + ValueSet fr = context.fetchResource(ValueSet.class, reference); + if (fr == null) { + if (!Utilities.isAbsoluteUrl(reference)) { + reference = resolve(uri, reference); + fr = context.fetchResource(ValueSet.class, reference); + } + } + txTime = txTime + (System.nanoTime() - t); return fr; } - } else + } else return null; } @@ -4057,11 +4061,11 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L warning(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); else if (bpWarnings == BestPracticeWarningLevel.Error) rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); + } else if (inv.getSeverity() == ConstraintSeverity.ERROR) { + rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman() + msg + " [" + n.toString() + "]"); + } else if (inv.getSeverity() == ConstraintSeverity.WARNING) { + warning(errors, IssueType.INVARIANT, element.line(), element.line(), path, ok, inv.getHuman() + msg + " [" + n.toString() + "]"); } - if (inv.getSeverity() == ConstraintSeverity.ERROR) - rule(errors, IssueType.INVARIANT, element.line(), element.col(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); - else if (inv.getSeverity() == ConstraintSeverity.WARNING) - warning(errors, IssueType.INVARIANT, element.line(), element.line(), path, ok, inv.getHuman()+msg+" ["+n.toString()+"]"); } }