Skip to content

Integration Tests Notes

Andrew Anisimov edited this page Dec 2, 2020 · 9 revisions

Results

DSTU2

PASS: 2095
FAIL: 0
SKIP: 358
ERROR: 0

STU3

TBD

R4

TBD

Fixes

Add support of _count, _sort and other special params passed via query in _search

Before, it was only using POSTed data.

DSTU2 archive cleaned up & search index rebuilt.

Unsupported properties removed:

  • AllergyIntolerance.clinicalStatus
  • Binary.clinicalStatus
  • Condition.clinicalStatus
  • DiagnosticReport.clinicalStatus
  • DocumentReference.clinicalStatus
  • MedicationStatement.clinicalStatus
  • Observation.derivedFrom

Commands executed:

db.resources.update(
   { resourceType: {$in:["AllergyIntolerance", "Binary", "Condition", "DiagnosticReport", "DocumentReference", "MedicationStatement"]} },
   { $unset: { clinicalStatus: "" } },false,true
);

db.resources.update(
   { resourceType: {$in:["Observation"]} },
   { $unset: { derivedFrom: "" } },false,true
)

Patient id counter restarted from 1000. Previously it was 3 which caused some tests to fail.

db.counters.update(
   { _id: "Patient" },
   { "last": NumberInt(1000) }
);

Fix issue with searching Binary by using POST /Binary/_search

It was assuming that the binary contents is requested instead of searching for it.

Fix in seach using _id param.

Spec says:

The search parameter _id refers to the logical id of the resource, and can be used when the search context specifies a resource type:

GET [base]/Patient?_id=23

This search finds the patient resource with the given id (there can only be one resource for a given id). Functionally, this is equivalent to a simple read operation:

GET [base]/Patient/23

However it was using partial match by default which was translated to this regexp:

/^23/i

which produced multiple results.

Changed to exact match (always).

Tests skipped

  1. All validation tests (X060, X065 and X067). $validate is not yet implemented.
  2. Some "Argonaut" tests relaying on some data presense and security enabled on server. Argonaut tests are for DSTU2 only.

Tests failing (still)

TransactionBatchTest

  1. XFER5 (Fetch patient record and then present the unaltered record as an update transaction)

Reason: server doesn't return entry id if updating something with bundle PUT interaction but without any changes. Solution: return entry id?

https://github.com/FirelyTeam/spark/issues/304

  1. XFER4 (Transaction Processing Order of Operations), XFER11 (Create Patient Record and then Batch create and search Observations)

Reason: server currently doesn't support GET Batch interaction Solution: implement GET interactions?

https://github.com/FirelyTeam/spark/issues/305

  1. XFER10 (Invalid Batch with Interdependencies)

Reason: server doesn't perform resource interdependence check.

https://github.com/FirelyTeam/spark/issues/306

Search001

  1. SE07P, SE07G (Search patient and _revinclude)

Reason: search _revinclude is not supported. Solution: implement _revinclude search param?

  1. SE21P, SE21G (Search for quantity (in observation) - precision tests)

Reason: Search by quantity with units is not working. Solution: fix it

More details:

http://hl7.org/fhir/DSTU2/search.html#quantity

https://github.com/FirelyTeam/spark/issues/308

  1. SE22P, SE22G (Search for quantity (in observation) - operators)

Reason: may be related to 2.?

  1. SE25P, SE25G (Search with malformed parameters)

Reason: passing malformed parameter produces 400 result. Solution: fix it so it returns 200 + some operation outcome, like warning, as it's done in https://vonk.fire.ly/

https://github.com/FirelyTeam/spark/issues/309

TODO

  1. Implement validation, enable tests X060, X065 and X067
  2. Fix all the bugs? Reach 100% test passed?
  3. Make the same for STU3 and R4 tests.