diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/Type10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/Type10_30.java index 9b6b69a54..d3a4ef29f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/Type10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/Type10_30.java @@ -137,7 +137,7 @@ public class Type10_30 { if (src instanceof org.hl7.fhir.dstu2.model.Timing) return Timing10_30.convertTiming((org.hl7.fhir.dstu2.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2 to R3"); } else { return null; } @@ -229,7 +229,7 @@ public class Type10_30 { if (src instanceof org.hl7.fhir.dstu3.model.Timing) return Timing10_30.convertTiming((org.hl7.fhir.dstu3.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R3 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/resources10_30/Resource10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/resources10_30/Resource10_30.java index 592b78050..829fd6281 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/resources10_30/Resource10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/resources10_30/Resource10_30.java @@ -199,7 +199,7 @@ public class Resource10_30 { if (src instanceof org.hl7.fhir.dstu2.model.ValueSet) return ValueSet10_30.convertValueSet((org.hl7.fhir.dstu2.model.ValueSet) src, advisor); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2 to R3"); } else { return null; } @@ -350,7 +350,7 @@ public class Resource10_30 { if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) return ValueSet10_30.convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src, advisor); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R3 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/Type10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/Type10_40.java index c6d1c739c..6460df55a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/Type10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/Type10_40.java @@ -133,7 +133,7 @@ public class Type10_40 { if (src instanceof org.hl7.fhir.dstu2.model.SimpleQuantity) return SimpleQuantity10_40.convertSimpleQuantity((org.hl7.fhir.dstu2.model.SimpleQuantity) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2 to R4"); } else { return null; } @@ -217,7 +217,7 @@ public class Type10_40 { if (src instanceof org.hl7.fhir.r4.model.SimpleQuantity) return SimpleQuantity10_40.convertSimpleQuantity((org.hl7.fhir.r4.model.SimpleQuantity) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R4 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/Resource10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/Resource10_40.java index 9b9f1480c..d6e6dfeb2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/Resource10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/Resource10_40.java @@ -151,7 +151,7 @@ public class Resource10_40 { if (src instanceof org.hl7.fhir.dstu2.model.Medication) return Medication10_40.convertMedication((org.hl7.fhir.dstu2.model.Medication) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2 to R4"); } else { return null; } @@ -266,7 +266,7 @@ public class Resource10_40 { if (src instanceof org.hl7.fhir.r4.model.ValueSet) return ValueSet10_40.convertValueSet((org.hl7.fhir.r4.model.ValueSet) src, advisor); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R4 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/Type10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/Type10_50.java index befbb68fa..008550bf8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/Type10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/Type10_50.java @@ -133,7 +133,7 @@ public class Type10_50 { if (src instanceof org.hl7.fhir.dstu2.model.SimpleQuantity) return SimpleQuantity10_50.convertSimpleQuantity((org.hl7.fhir.dstu2.model.SimpleQuantity) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2 to R5"); } else { return null; } @@ -217,7 +217,7 @@ public class Type10_50 { if (src instanceof org.hl7.fhir.r5.model.SimpleQuantity) return SimpleQuantity10_50.convertSimpleQuantity((org.hl7.fhir.r5.model.SimpleQuantity) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R5 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java index cf75c332d..1be52c7cf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java @@ -143,7 +143,7 @@ public class Resource10_50 { if (src instanceof org.hl7.fhir.dstu2.model.ValueSet) return ValueSet10_50.convertValueSet((org.hl7.fhir.dstu2.model.ValueSet) src, advisor); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2 to R5"); } else { return null; } @@ -258,7 +258,7 @@ public class Resource10_50 { if (src instanceof org.hl7.fhir.r5.model.ValueSet) return ValueSet10_50.convertValueSet((org.hl7.fhir.r5.model.ValueSet) src, advisor); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R5 to R2"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/Type14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/Type14_30.java index 3912f22a3..f36b125f8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/Type14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/Type14_30.java @@ -134,7 +134,7 @@ public class Type14_30 { if (src instanceof org.hl7.fhir.dstu2016may.model.Timing) return Timing14_30.convertTiming((org.hl7.fhir.dstu2016may.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2B to R3"); } else { return null; } @@ -224,7 +224,7 @@ public class Type14_30 { if (src instanceof org.hl7.fhir.dstu3.model.Timing) return Timing14_30.convertTiming((org.hl7.fhir.dstu3.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R3 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/resources14_30/Resource14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/resources14_30/Resource14_30.java index 96e14f2b1..2b00484cb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/resources14_30/Resource14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/resources14_30/Resource14_30.java @@ -66,7 +66,7 @@ public class Resource14_30 { if (src instanceof org.hl7.fhir.dstu2016may.model.ValueSet) return ValueSet14_30.convertValueSet((org.hl7.fhir.dstu2016may.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2B to R3"); } else { return null; } @@ -109,7 +109,7 @@ public class Resource14_30 { if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) return ValueSet14_30.convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R3 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/Type14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/Type14_40.java index bdf0f3101..cf32a94e5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/Type14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/Type14_40.java @@ -133,7 +133,7 @@ public class Type14_40 { if (src instanceof org.hl7.fhir.dstu2016may.model.Timing) return Timing14_40.convertTiming((org.hl7.fhir.dstu2016may.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2B to R4"); } else { return null; } @@ -215,7 +215,7 @@ public class Type14_40 { if (src instanceof org.hl7.fhir.r4.model.Timing) return Timing14_40.convertTiming((org.hl7.fhir.r4.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R4 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/resources14_40/Resource14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/resources14_40/Resource14_40.java index 44ab91f89..08477d722 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/resources14_40/Resource14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/resources14_40/Resource14_40.java @@ -66,7 +66,7 @@ public class Resource14_40 { if (src instanceof org.hl7.fhir.dstu2016may.model.ValueSet) return ValueSet14_40.convertValueSet((org.hl7.fhir.dstu2016may.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2B to R4"); } else { return null; } @@ -107,7 +107,7 @@ public class Resource14_40 { if (src instanceof org.hl7.fhir.r4.model.ValueSet) return ValueSet14_40.convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R4 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/Type14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/Type14_50.java index a79fafba6..47060b423 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/Type14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/Type14_50.java @@ -133,7 +133,7 @@ public class Type14_50 { if (src instanceof org.hl7.fhir.dstu2016may.model.Timing) return Timing14_50.convertTiming((org.hl7.fhir.dstu2016may.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R2B to R5"); } else { return null; } @@ -217,7 +217,7 @@ public class Type14_50 { if (src instanceof org.hl7.fhir.r5.model.Timing) return Timing14_50.convertTiming((org.hl7.fhir.r5.model.Timing) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R5 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Resource14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Resource14_50.java index 214f51ea2..c84d0d33b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Resource14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Resource14_50.java @@ -66,7 +66,7 @@ public class Resource14_50 { if (src instanceof org.hl7.fhir.dstu2016may.model.ValueSet) return ValueSet14_50.convertValueSet((org.hl7.fhir.dstu2016may.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R2B to R5"); } else { return null; } @@ -107,7 +107,7 @@ public class Resource14_50 { if (src instanceof org.hl7.fhir.r5.model.ValueSet) return ValueSet14_50.convertValueSet((org.hl7.fhir.r5.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R5 to R2B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/Type30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/Type30_40.java index 17f2955b7..ba6fe4ab1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/Type30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/Type30_40.java @@ -151,7 +151,7 @@ public class Type30_40 { if (src instanceof org.hl7.fhir.dstu3.model.TriggerDefinition) return TriggerDefinition30_40.convertTriggerDefinition((org.hl7.fhir.dstu3.model.TriggerDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R3 to R4"); } else { return null; } @@ -253,7 +253,7 @@ public class Type30_40 { if (src instanceof org.hl7.fhir.r4.model.TriggerDefinition) return TriggerDefinition30_40.convertTriggerDefinition((org.hl7.fhir.r4.model.TriggerDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R4 to R3"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/resources30_40/Resource30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/resources30_40/Resource30_40.java index f9e5e0cf2..8eab2452e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/resources30_40/Resource30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/resources30_40/Resource30_40.java @@ -201,7 +201,7 @@ public class Resource30_40 { if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) return ValueSet30_40.convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R3 to R4"); } else { return null; } @@ -377,7 +377,7 @@ public class Resource30_40 { if (src instanceof org.hl7.fhir.r4.model.ValueSet) return ValueSet30_40.convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R4 to R3"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java index b64e7b715..2135adfa8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java @@ -278,7 +278,9 @@ public class Resource30_50 { return TestScript30_50.convertTestScript((org.hl7.fhir.dstu3.model.TestScript) src); if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) return ValueSet30_50.convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src); - if (advisor.failFastOnNullOrUnknownEntry()) throw new FHIRException("Unknown resource " + src.fhirType()); + if (advisor.failFastOnNullOrUnknownEntry()) { + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R3 to R5"); + } else return null; } @@ -442,7 +444,7 @@ public class Resource30_50 { if (src instanceof org.hl7.fhir.r5.model.ValueSet) return ValueSet30_50.convertValueSet((org.hl7.fhir.r5.model.ValueSet) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R5 to R3"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/Type30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/Type30_50.java index 27ebde866..2ac7e5df8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/Type30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/Type30_50.java @@ -148,7 +148,7 @@ public class Type30_50 { if (src instanceof org.hl7.fhir.dstu3.model.TriggerDefinition) return TriggerDefinition30_50.convertTriggerDefinition((org.hl7.fhir.dstu3.model.TriggerDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R3 to R5"); } else { return null; } @@ -250,7 +250,7 @@ public class Type30_50 { if (src instanceof org.hl7.fhir.r5.model.TriggerDefinition) return TriggerDefinition30_50.convertTriggerDefinition((org.hl7.fhir.r5.model.TriggerDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R5 to R3"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/Type40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/Type40_50.java index 96412224f..ccc8fdcd9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/Type40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/Type40_50.java @@ -184,7 +184,7 @@ public class Type40_50 { if (src instanceof org.hl7.fhir.r4.model.ElementDefinition) return ElementDefinition40_50.convertElementDefinition((org.hl7.fhir.r4.model.ElementDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R4 to R5"); } else { return null; } @@ -305,7 +305,7 @@ public class Type40_50 { if (src instanceof org.hl7.fhir.r5.model.ElementDefinition) return ElementDefinition40_50.convertElementDefinition((org.hl7.fhir.r5.model.ElementDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R5 to R4"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java index 11c46271b..468fb4170 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java @@ -275,7 +275,7 @@ public class Resource40_50 { if (src instanceof org.hl7.fhir.r4.model.VisionPrescription) return VisionPrescription40_50.convertVisionPrescription((org.hl7.fhir.r4.model.VisionPrescription) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R4 to R5"); } else { return null; } @@ -519,7 +519,7 @@ public class Resource40_50 { if (src instanceof org.hl7.fhir.r5.model.VisionPrescription) return VisionPrescription40_50.convertVisionPrescription((org.hl7.fhir.r5.model.VisionPrescription) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R5 to R4"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/Type43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/Type43_50.java index 3ee650ed6..a7ccbf0b1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/Type43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/Type43_50.java @@ -184,7 +184,7 @@ public class Type43_50 { if (src instanceof org.hl7.fhir.r4b.model.ElementDefinition) return ElementDefinition43_50.convertElementDefinition((org.hl7.fhir.r4b.model.ElementDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R4B to R5"); } else { return null; } @@ -303,7 +303,7 @@ public class Type43_50 { if (src instanceof org.hl7.fhir.r5.model.ElementDefinition) return ElementDefinition43_50.convertElementDefinition((org.hl7.fhir.r5.model.ElementDefinition) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown type " + src.fhirType()); + throw new FHIRException("The type " + src.fhirType()+" cannot be converted from R5 to R4B"); } else { return null; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java index 8e872c578..e83284cb4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java @@ -264,7 +264,7 @@ public class Resource43_50 { if (src instanceof org.hl7.fhir.r4b.model.VisionPrescription) return VisionPrescription43_50.convertVisionPrescription((org.hl7.fhir.r4b.model.VisionPrescription) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R4B to R5"); } else { return null; } @@ -498,7 +498,7 @@ public class Resource43_50 { if (src instanceof org.hl7.fhir.r5.model.VisionPrescription) return VisionPrescription43_50.convertVisionPrescription((org.hl7.fhir.r5.model.VisionPrescription) src); if (advisor.failFastOnNullOrUnknownEntry()) { - throw new FHIRException("Unknown resource " + src.fhirType()); + throw new FHIRException("The resource " + src.fhirType()+" cannot be converted from R5 to R4B"); } else { return null; } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/CanonicalResourceManager.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/CanonicalResourceManager.java index 5838a154d..12cc89ed0 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/CanonicalResourceManager.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/CanonicalResourceManager.java @@ -97,7 +97,7 @@ public class CanonicalResourceManager { } } - public class CanonicalListSorter implements Comparator { + public static class CanonicalListSorter implements Comparator { @Override public int compare(CanonicalResource arg0, CanonicalResource arg1) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java index 13d54742f..b55dde38e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java @@ -426,9 +426,9 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE if (ext.isEmpty()) return null; if (ext.size() > 1) - throw new FHIRException("Multiple matching extensions found"); + throw new FHIRException("Multiple matching extensions found for extension '"+theUrl+"'"); if (!ext.get(0).getValue().isPrimitive()) - throw new FHIRException("Extension could not be converted to a string"); + throw new FHIRException("Extension '"+theUrl+"' could not be converted to a string"); return ext.get(0).getValue().primitiveValue(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java index 67364a0cc..a452cb5bf 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java @@ -2768,7 +2768,7 @@ Reflex | Repeat | Re-run. * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) */ public Observation setValue(DataType value) { - if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof MarkdownType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period || value instanceof Attachment || value instanceof Reference || value instanceof CanonicalType)) + if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period || value instanceof Attachment || value instanceof Reference || value instanceof CanonicalType)) throw new FHIRException("Not the right type for Observation.value[x]: "+value.fhirType()); this.value = value; return this; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/StructureMapRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/StructureMapRenderer.java index 50886c746..76c0445ed 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/StructureMapRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/StructureMapRenderer.java @@ -87,7 +87,7 @@ public class StructureMapRenderer extends TerminologyRenderer { renderMetadata(x, "url", map.getUrlElement()); renderMetadata(x, "name", map.getNameElement()); renderMetadata(x, "title", map.getTitleElement()); - renderMetadata(x, "url", map.getStatusElement(), "draft"); + renderMetadata(x, "status", map.getStatusElement()); x.tx("\r\n"); } else { x.b().tx("map"); @@ -109,7 +109,9 @@ public class StructureMapRenderer extends TerminologyRenderer { } private void renderMetadata(XhtmlNode x, String name, DataType value) { - renderMetadata(x, name, value, null); + if (!value.isEmpty()) { + renderMetadata(x, name, value, null); + } } private void renderMetadata(XhtmlNode x, String name, DataType value, String def) { @@ -151,16 +153,16 @@ public class StructureMapRenderer extends TerminologyRenderer { if (!prefixesSrc.containsKey(cg.getSource())) { prefixesSrc.put(cg.getSource(), String.valueOf(prefix)); x.b().tx(" prefix "); - x.tx(prefix); + x.tx(""+prefix); x.color(COLOR_SYNTAX).tx(" = \""); - x.tx(""+cg.getSource()); + x.tx(cg.getSource()); x.color(COLOR_SYNTAX).tx("\"\r\n"); prefix++; } if (!prefixesTgt.containsKey(cg.getTarget())) { prefixesTgt.put(cg.getTarget(), String.valueOf(prefix)); x.b().tx(" prefix "); - x.tx(prefix); + x.tx(""+prefix); x.color(COLOR_SYNTAX).tx(" = \""); x.tx(""+cg.getTarget()); x.color(COLOR_SYNTAX).tx("\"\r\n"); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/BuildExtensions.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/BuildExtensions.java index 28795fbe7..529b9fbc4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/BuildExtensions.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/BuildExtensions.java @@ -31,7 +31,6 @@ public class BuildExtensions extends ToolingExtensions { public static final String EXT_NAME = "http://hl7.org/fhir/build/StructureDefinition/name"; public static final String EXT_V2_MAP = "http://hl7.org/fhir/build/StructureDefinition/v2-map"; public static final String EXT_V3_MAP = "http://hl7.org/fhir/build/StructureDefinition/v3-map"; - public static final String EXT_BINDING_DEFINITION = "http://hl7.org/fhir/build/StructureDefinition/binding-definition"; public static final String EXT_URI = "http://hl7.org/fhir/build/StructureDefinition/uri"; public static final String EXT_WEBSITE = "http://hl7.org/fhir/build/StructureDefinition/website"; public static final String EXT_EMAIL = "http://hl7.org/fhir/build/StructureDefinition/email"; @@ -41,7 +40,6 @@ public class BuildExtensions extends ToolingExtensions { public static final String EXT_NOTES = "http://hl7.org/fhir/build/StructureDefinition/notes"; public static final String EXT_CODE = "http://hl7.org/fhir/build/StructureDefinition/code"; public static final String EXT_TYPE = "http://hl7.org/fhir/build/StructureDefinition/type"; - public static final String EXT_SUMMARY = "http://hl7.org/fhir/build/StructureDefinition/summary"; // public static final String EXT_EXPLANATION = "http://hl7.org/fhir/build/StructureDefinition/explanation"; public static final String EXT_NO_BINDING = "http://hl7.org/fhir/build/StructureDefinition/no-binding"; public static final String EXT_OP_EXAMPLE = "http://hl7.org/fhir/build/StructureDefinition/example"; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java index cb9b7cdd1..a2c959168 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java @@ -221,7 +221,9 @@ public class ToolingExtensions { public static final String EXT_DATE_FORMAT = "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-format"; public static final String EXT_ID_EXPECTATION = "http://hl7.org/fhir/tools/StructureDefinition/id-expectation"; public static final String EXT_JSON_PRIMITIVE_CHOICE = "http://hl7.org/fhir/tools/StructureDefinition/json-primitive-choice"; - + public static final String EXT_SUMMARY = "http://hl7.org/fhir/tools/StructureDefinition/profile-summary"; + public static final String EXT_BINDING_DEFINITION = "http://hl7.org/fhir/tools/StructureDefinition/binding-definition"; + // 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"; @@ -240,6 +242,7 @@ public class ToolingExtensions { public static final String EXT_IGDEP_COMMENT = "http://hl7.org/fhir/tools/StructureDefinition/implementationguide-dependency-comment"; public static final String EXT_XPATH_CONSTRAINT = "http://hl7.org/fhir/4.0/StructureDefinition/extension-ElementDefinition.constraint.xpath"; public static final String EXT_OBLIGATION = "http://hl7.org/fhir/tools/StructureDefinition/obligation"; + public static final String EXT_NO_BINDING = "http://hl7.org/fhir/tools/StructureDefinition/no-binding"; ; // specific extension helpers diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java index 8e6a18b5a..28b82cd32 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java @@ -550,9 +550,18 @@ public class NpmPackage { public List listResources(String... types) throws IOException { List res = new ArrayList(); NpmPackageFolder folder = folders.get("package"); - for (String s : types) { - if (folder.types.containsKey(s)) - res.addAll(folder.types.get(s)); + if (types.length == 0) { + for (String s : folder.types.keySet()) { + if (folder.types.containsKey(s)) { + res.addAll(folder.types.get(s)); + } + } + } else { + for (String s : types) { + if (folder.types.containsKey(s)) { + res.addAll(folder.types.get(s)); + } + } } Collections.sort(res); return res; diff --git a/pom.xml b/pom.xml index 73af2386d..a6fc61ac4 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 6.2.1 - 1.2.18 + 1.2.19-SNAPSHOT 5.7.1 1.8.2 3.0.0-M5