diff --git a/fhirpathpy/engine/invocations/equality.py b/fhirpathpy/engine/invocations/equality.py index 2960fb0..fc17903 100644 --- a/fhirpathpy/engine/invocations/equality.py +++ b/fhirpathpy/engine/invocations/equality.py @@ -182,7 +182,7 @@ def lt(ctx, a, b): if isinstance(a0, nodes.FP_Type): if ( isinstance(a0, nodes.FP_TimeBase) - and a0.compare(b0) == 0 + and a0.compare(b0) is None and a0._precision != b0._precision ): return None @@ -204,7 +204,7 @@ def gt(ctx, a, b): if isinstance(a0, nodes.FP_Type): if ( isinstance(a0, nodes.FP_TimeBase) - and a0.compare(b0) == 0 + and a0.compare(b0) is None and a0._precision != b0._precision ): return None @@ -226,7 +226,7 @@ def lte(ctx, a, b): if isinstance(a0, nodes.FP_Type): if ( isinstance(a0, nodes.FP_TimeBase) - and a0.compare(b0) == 0 + and a0.compare(b0) is None and a0._precision != b0._precision ): return None @@ -248,7 +248,7 @@ def gte(ctx, a, b): if isinstance(a0, nodes.FP_Type): if ( isinstance(a0, nodes.FP_TimeBase) - and a0.compare(b0) == 0 + and a0.compare(b0) is None and a0._precision != b0._precision ): return None diff --git a/fhirpathpy/engine/nodes.py b/fhirpathpy/engine/nodes.py index b0a0a3b..b34f19b 100644 --- a/fhirpathpy/engine/nodes.py +++ b/fhirpathpy/engine/nodes.py @@ -394,7 +394,7 @@ def compare(self, otherDateTime): return 1 if normalized_thisdt_list[i] < normalized_otherdt_list[i]: return -1 - return 0 + return None thisDateTimeInt = self._getDateTimeInt() otherDateTimeInt = otherDateTime._getDateTimeInt()