Skip to content

FhirTaskLinter: authoredOn placeholder check skips missing element; inconsistent with other placeholder validations #39

@khalilmalla95

Description

@khalilmalla95

Description

The Task linter’s development-time check for authoredOn does not align with the documented rule that authoredOn must contain #{date}, and it behaves differently from the requester / restriction.recipient placeholder checks.

Current behavior

In FhirTaskLinter#checkPlaceholders, the warning FHIR_TASK_DATE_NO_PLACEHOLDER is only emitted when authoredOn is present and its value does not contain #{date}:

if (authoredOn != null && !authoredOn.contains("#{date}"))

If authoredOn is absent, val(...) returns null, the condition is false, and the linter reports success: <authoredOn> placeholder OK.

By contrast, requester.identifier.value and restriction.recipient.identifier.value use == null || ..., so a missing value does trigger a placeholder warning.

Expected behavior

  • If the rule is “template Tasks must declare authoredOn with #{date}”, then a missing authoredOn should be reported as ERROR.
  • Behavior should be consistent with the other placeholder checks in the same method.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions