Hack fix for opd-3

This commit is contained in:
Grahame Grieve 2024-02-10 23:12:12 +11:00
parent 85a8807e7b
commit 9e60fdb7ad
1 changed files with 9 additions and 3 deletions

View File

@ -9,10 +9,16 @@ public class FHIRPathExpressionFixer {
// this is a hack work around for past publication of wrong FHIRPath expressions
boolean r5 = VersionUtilities.isR5Ver(version);
// if (r5) {
// return expr;
// }
boolean r4 = VersionUtilities.isR4Ver(version) || VersionUtilities.isR4BVer(version);
// see https://chat.fhir.org/#narrow/stream/196008-ig-publishing-requirements/topic/Operation.20Definition.20Parameters.20table
if (r5 && "opd-3".equals(key)) {
return "targetProfile.exists() implies (type = 'Reference' or type = 'canonical' or type.memberOf('http://hl7.org/fhir/ValueSet/all-resource-types'))";
}
if (r4 && "opd-3".equals(key)) {
return "targetProfile.exists() implies (type = 'Reference' or type = 'canonical' or type.memberOf('http://hl7.org/fhir/ValueSet/resource-types'))";
}
if ("probability is decimal implies (probability as decimal) <= 100".equals(expr)) {
return "(probability.exists() and (probability is decimal)) implies ((probability as decimal) <= 100)";
}