hl7au / au-fhir-core-inferno

This is an Inferno test kit for the AU Core Implementation Guide
https://inferno.hl7.org.au
Apache License 2.0
7 stars 3 forks source link

Observation Must Support elements tests are using some Observations as input that are not applicable. #155

Closed StephThaoOng closed 2 months ago

StephThaoOng commented 2 months ago

The Must Support elements tests in each Observation test suite appears to be using inputs that are not applicable to that specific Observation. e.g. steps to reproduce for Observation Diagnostic Result Tests

projkov commented 2 months ago

@StephThaoOng Hello Steph

Thanks for reporting the issue. I will check on this problem.

projkov commented 2 months ago

NOTES (WIP)

Problem analysis

A different result of the test 1.11.20 related to the MustSupport attributes for all default patients and only for "bennelong-anne" and "dan-harry".

Error text: Could not find 'identifier', 'interpretation', 'note', 'referenceRange', 'referenceRange.low', 'referenceRange.high', 'referenceRange.type', 'referenceRange.text', 'component.value[x]' element(s) in the 10 provided Observation resource(s). To prevent this issue, please add the missing must support elements to at least one Observation resource on the server.

IG requirements check:

  1. 'identifier'
  2. 'interpretation'
  3. 'note'
  4. 'referenceRange'
  5. 'referenceRange.low'
  6. 'referenceRange.high'
  7. 'referenceRange.type'
  8. 'referenceRange.text'
  9. 'component.value[x]'

Are defined as mustSupport elements for the current profile. Proof.

It means that the requirements in the test are correct.

projkov commented 2 months ago

@StephThaoOng Hello Steph

In this particular case, we have different results for all default patients and only for these two patients because the test for MustSupport checks works in this way:

  1. It runs over all resources that exist as a result of the search in this test group.
  2. It checks each resource for the presence of the MustSupport elements.
  3. As a result, MustSupport elements must exist for all resources in sum.

In this current case, we don't have observations with all MustSupport parameters for these two patients.

But the problem is deeper...

We can identify each Observation resource profile with the help of binding codes for code or category elements. However, "Diagnostic Result Observation" doesn't have any binding codes according to the profile information.

So, the question is: how can we get diagnostic result observations for specific patients by request

StephThaoOng commented 2 months ago

@StephThaoOng Hello Steph

In this particular case, we have different results for all default patients and only for these two patients because the test for MustSupport checks works in this way:

  1. It runs over all resources that exist as a result of the search in this test group.
  2. It checks each resource for the presence of the MustSupport elements.
  3. As a result, MustSupport elements must exist for all resources in sum.

In this current case, we don't have observations with all MustSupport parameters for these two patients.

But the problem is deeper...

We can identify each Observation resource profile with the help of binding codes for code or category elements. However, "Diagnostic Result Observation" doesn't have any binding codes according to the profile information.

So, the question is: how can we get diagnostic result observations for specific patients by request

@projkov Hi Pavel, after discussion with @heathfrankel and considering whether we can use meta.profile or known codes in test resources that are intended to be used as input for AU Core Observation Diagnostic Result Tests, we would like to proceed with the latter.

The resources in our current test data set to be used as input for AU Core Observation Diagnostic Result Tests have the following codes: <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

resource id | code_coding1_code -- | -- visualacuity | 251739003 bonedensity | 24701-5 bmd | 24701-5

So can test 1.11.20 filter/request the input resources above?

StephThaoOng commented 2 months ago

NOTES (WIP)

Problem analysis

A different result of the test 1.11.20 related to the MustSupport attributes for all default patients and only for "bennelong-anne" and "dan-harry".

Error text: Could not find 'identifier', 'interpretation', 'note', 'referenceRange', 'referenceRange.low', 'referenceRange.high', 'referenceRange.type', 'referenceRange.text', 'component.value[x]' element(s) in the 10 provided Observation resource(s). To prevent this issue, please add the missing must support elements to at least one Observation resource on the server.

IG requirements check:

  1. 'identifier'
  2. 'interpretation'
  3. 'note'
  4. 'referenceRange'
  5. 'referenceRange.low'
  6. 'referenceRange.high'
  7. 'referenceRange.type'
  8. 'referenceRange.text'
  9. 'component.value[x]'

Are defined as mustSupport elements for the current profile. Proof.

It means that the requirements in the test are correct.

Thanks Pavel. The test data set will be enriched. In addition, I think the Must Support requirements used for test 1.11.20 is missing:

projkov commented 2 months ago

@StephThaoOng Hello Steph

I made an update. Now diagnostic result Observation test uses 251739003, 24701-5 codes for the search.

If all good, then please close the issue. Thanks!