AuDigitalHealth/ci-medicare-records

Incorrect FHIRPath in Explanation of Benefit Medicare inv-dh-eob-01, -02 and -04

Closed this issue · 3 comments

Prerequisites

  • I have verified the problem exists in the available content
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title

The bug

The invariants

inv-dh-eob-01: A PBS or RPBS claim SHALL include a prescription. (: (item.category.coding.code='pbs' or item.category.coding.code='rpbs') implies prescription.exists())

inv-dh-eob-02: A MBS or DVABS claim SHALL NOT include a prescription. (: (item.category.coding.code='mbs' or item.category.coding.code='dva') implies prescription.exists().not())

inv-dh-eob-04: A PBS claim (subType='pbs') SHALL be of type 'Pharmacy' (type='pharmacy'). (: subType.coding.code='pbs' implies type.coding.code='pharmacy')

fail for valid examples. In the FHIRPath expressions the antecedents are always true, so e.g.

  • a PBS claim with item.category.coding.code of 'pbs' with a prescription and no type, fails against invariant inv-dh-eob-04
  • a PBS claim with subType of 'pbs' and no item.category fails against invariant inv-dh-eob-02
  • an MBS claim with subType of 'mbs' and no item.category fails against invariant inv-dh-eob-01

What I expected to happen

Correct the FHIRPath for all invariants.

Workarounds

Do not validate against the profile.

I think we need to tighten up not loosen - the claim content comes solely from one system and the metadata for type, category, subType needs to be made consistent.

I don't think the examples should be considered valid.

At least one of two optional elements (subType or item.category) are required to be present to indicate the type of claim, i.e. MBS/DVA or PBS/RPBS. This design control is enforced by inv-dh-eob-03.

The other invariants that drive behaviour from claim type have only included one element. The existing invariants need to be refactored to include the use of both elements.

Future design to tighten controls to force both.

Future design handled in ADHA FHIR implementation guide: AuDigitalHealth/ci-fhir-r4#143.