# Tests for $expand with partial results — #terminology 9 messages · 0 participants · Feb 5, 2026 local: /t/terminology/Tests%20for%20%24expand%20with%20partial%20results count: 9 --- - Feb 5, 2026 | Josh Mandel: Possibly dumb question... . loinc-expand-all-limited-response-valueSet.json response seems to suggest that when asking for the first 1000 results of a ful-loinc expansion, the results should be exactly the 1000 items listed here. But $expand isn't required/guaranteed to return results in any particular order, is it? - Feb 5, 2026 | Grahame Grieve: no it's not. So note the mode on this test - Feb 5, 2026 | Grahame Grieve: "mode" : "tx.fhir.org", "description" : "These are tx.fhir.org specific tests. There's no expectation that other servers will pass these tests, and they are not executed by default. (other servers can, but they depend on other set up not controlled by the tests", These are tx.fhir.org specific tests. There's no expectation that other servers will pass these tests, and they are not executed by default. (other servers can, but they depend on other set up not controlled by the tests - Feb 5, 2026 | Grahame Grieve: these are my UAT tests rather than tests required for tx-ecosystem conformance. - Feb 5, 2026 | Josh Mandel: Ahhh. That explains a lot! - Feb 5, 2026 | Grahame Grieve: I don't know how to test something like this properly given the test infrastructure - Feb 5, 2026 | Josh Mandel: Do you know if tx.fhir.org currently passes this test? It seems like your real-life ordering differs from the fixture (100000-9 first vs 100-8 first). - Feb 5, 2026 | Josh Mandel: re: testing this property... maybe better to test it on saller code systems (synthetic ones for these tests) where you can get 10 per page out of 100 total and then enforce that all 100 occur across all the pages... - Feb 5, 2026 | Grahame Grieve: it does pass this test, yes (it must - I have testing in depth on this). And it works because the test runner sorts ValueSet.expansion.contains itself to make order irrelevant (which works until paging is introduced). with regard to testing, yes, maybe we could do that but I have no language to do that across the tests which otherwise all standalone (run as JUnit tests). And if I was going to do have a conformance tests that seriously tested that level of system conformance, we'd have to do something like that. But we don't. What we do have is the tests expand-x-fifter-limit that simply count the number of tests returned and expact that the server is otherwise making sense