clarify error message when resource can't be converted between versions
This commit is contained in:
parent
a3a9017bdb
commit
2ca6dc86f1
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue