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
9 stars 3 forks source link

Can't run Location, Organization, Practitioner, PractitionerRole tests without "running all tests" #134

Closed StephThaoOng closed 4 months ago

StephThaoOng commented 4 months ago

Even though Location, Organization, Practitioner, PractitionerRole tests are not dependent on patient ids, we can't run these tests with selecting "RUN ALL TESTS". This will not support implementers who intend to test the above Profiles and interactions only e.g. a Provider Directory system.

Also, to support implementers using the test kit, should we consider an initial "search all" for these resource types to ensure subsequent tests aren't skipped?

projkov commented 4 months ago

@StephThaoOng Hello Steph.

Indeed, these tests are not dependent on the patient IDs, but unfortunately, in the current implementation, they are dependent on the resources from the previous tests.

I don't like this solution, but it is implemented this way in the US-Core-Test-Kit. I think we can try to implement other methods to work with this scope of tests. Maybe we can suggest that the user write IDs for these resources to check, as is done for the patient. However, I don't think it can be implemented before the 25th.

StephThaoOng commented 4 months ago

Ok, thanks for explaining @projkov I'll relabel to an enhancement with medium priority.

projkov commented 4 months ago

@StephThaoOng hello Steph

Now users can run tests for Location, Organization, Practitioner, and PractitionerRole resources independently from previous tests using specific IDs.

In general, the mechanism is next:

  1. If the user runs all tests, then these tests will try to use resources from previous tests (it's how it was implemented from the start)
  2. If the user runs a single test group for Location, Organization, Practitioner, and PractitionerRole, then this group will get data from the server for a specific ID.

You can check these reports as an example or you can try to run it by yourself.

  1. Location
  2. Organization
  3. Practitioner
  4. PractitionerRole
  5. All resources

Also, you can notice that we have default values for these ID inputs. I found that their resources are filled with data, so in our case, it helps to keep all tests successful with less number of used resources.

StephThaoOng commented 4 months ago

@projkov Thanks Pavel! We had to make a few changes to the AU Core test data set as we were instructed to use Services Australia derived where possible. Therefore, can you please update the default ids for these tests. Suggestions below which I've checked but please choose different ones if I've missed something (thanks):

PractitionerRole

Practitioner

Organization

Location