Stream: conformance
Topic: Online validator
Elliot Silver (Feb 15 2022 at 00:11):
Hi All, where does validator.fhir.org get its list of IGs from?
Grahame Grieve (Feb 15 2022 at 00:12):
the package server
Elliot Silver (Feb 15 2022 at 00:14):
Hmm, and that pulls from the registry?
I'm trying to figure out why my IG (ca.infoway.io.psca) isn't showing up on the list.
Grahame Grieve (Feb 15 2022 at 00:15):
it's not on packages.fhir.org then
Grahame Grieve (Feb 15 2022 at 00:15):
and the registry also builds on packages.fhir.org. (and other places)
Elliot Silver (Feb 15 2022 at 00:17):
It is listed on packages.fhir.org, and I've previously tried building dependent IGs from it, so I'm pretty sure that part is working.
Grahame Grieve (Feb 15 2022 at 00:53):
where is it listed?
Elliot Silver (Feb 15 2022 at 00:56):
packages.fhir.org (https://simplifier.net/packages)
Grahame Grieve (Feb 15 2022 at 00:58):
hmm I don't know then. @David Otasek is working on the validator right now
Elliot Silver (Feb 15 2022 at 00:59):
OK. Thanks.
Ward Weistra (Feb 17 2022 at 11:25):
@David Otasek Let me know if you need more information to get the data from the FHIR package registry.
The API for the registry is documented here: https://app.swaggerhub.com/apis-docs/firely/Simplifier.net_FHIR_Package_API
David Otasek (Feb 17 2022 at 15:03):
@Ward Weistra @Grahame Grieve thanks, looking into it. At the moment, the validator-wrapper is using the PackageClient from org.fl7.fhir.core, which is actually querying https://raw.githubusercontent.com/FHIR/ig-registry/master/fhir-ig-list.json?nocache=
This gives a list that doesn't contain ca.infoway.io.psca, while https://packages.simplifier.net/catalog?prerelease=false
contains it.
Should these two not have the same listings?
Grahame Grieve (Feb 17 2022 at 20:35):
hmm. I think we're using the wrong feature there, though it's probably the way I decided.
Grahame Grieve (Feb 17 2022 at 20:55):
actually, @Ward Weistra I think that's because the package registry is unreliable - the desired query here is a top level list of all conformance packages, and there's a couple of problems with that:
- the type of package is not evident on the package API, so you have to download every package to find out whether it's something that you can validate against (we could ignore that for now, I guess, since 95%+ of the packages are)
- the registry only returns the first N matches (25 I think) and there's no way to get more. And this query needs everything. I think there's several hundred now.
That's why we queried the other repository, but that's not the right solution long term
@David Otasek the right approach is to list everything in the package registry, but list what's in the fhir-ig-list.json file first
Anyway @Elliot Silver you have your answer as to why it's not listed - list it in https://github.com/FHIR/ig-registry/blob/master/fhir-ig-list.json (make a PR) and it'll appear in the list
David Otasek (Feb 17 2022 at 22:52):
(deleted)
Elliot Silver (Feb 18 2022 at 00:44):
This is a reminder (mostly to myself) that there are actually two FHIR registries: The Simplifier-powered registry at https://registry.fhir.org, and the one that reads from the github fhir-ig-list.json mentioned above (http://fhir.org/guides/registry/).
Elliot Silver (Feb 18 2022 at 00:45):
I've added my IG to fhir-ig-list.json, and made a PR.
Elliot Silver (Feb 18 2022 at 22:23):
@Grahame Grieve , thanks for merging my PR.
My IG is now showing up in the IG selection dropdown on https://validator.fhir.org. However, when I try to validate, I get an error of "Cannot parse entered text as valid JSON/XML." Running the validator locally on the same resource instance (and now that I've got past the packaging issue, running the Inferno validator on that instance) don't show any problem. Is there any way of getting more diagnostics from the online validator?
I'm not sure if it is connected, but the url in the dropdown is the page from which to download the package. It isn't the canonical of the IG. I assume this is populated from editions.url in the fhir-ig-list.json.
Grahame Grieve (Feb 20 2022 at 22:43):
@David Otasek
Ward Weistra (Feb 21 2022 at 12:26):
@Grahame Grieve I'll add a request to expose type
on the package endpoint.
On returning N matches only: the current endpoints should be enough to create an autocomplete box that queries the package endpoint based on what the user types. Perhaps it could additionally remember the packages that have most often/recently been selected and list them beforehand?
Grahame Grieve (Feb 21 2022 at 23:04):
perhaps. But the UI doesn't prompt the user to type to find (rather than filter). I'll talk to @David Otasek about it
Grahame Grieve (Feb 21 2022 at 23:04):
type will be good
David Otasek (Feb 23 2022 at 21:14):
@Elliot Silver I tried replicating your issue with the online validator, and I can see something that could explain why it's not functioning. On the server side logs, I can see that it's not getting the package in tgz format. According to the simplifier API, we should be passing application/tar+gzip
as the accept
header, but for some reason, that's not happening.
How are you executing this using the command line? If that's working, maybe there's a step that the online validator is missing.
Elliot Silver (Feb 23 2022 at 22:15):
@David Otasek Is the validator pulling that from fhir-ig-list.json's guides.editions.url
element or somewhere else?
David Otasek (Feb 23 2022 at 22:45):
@Elliot Silver That's the only place I see it.
Elliot Silver (Feb 23 2022 at 22:49):
OK, I'll update fhir-ig-list and do a PR. I'll update the readme too, but I'm not sure what it should say. I don't know how that url gets turned into the retrieve of the package.
David Otasek (Feb 24 2022 at 19:18):
@Ward Weistra @Grahame Grieve I'm looking at adding simplifier.net packages to the validator interface, and some versioning needs to be resolved.
Right now, we're getting the interface's SemVer versions from org.hl7.fhir.org's code (1.0.2, 1.4.0, 3.0.2, 4.0.1, 4.1.0, 4.3.0, 5.0, 4.6.0).
However, the return from simplifier.net uses the code (DSTU2, STU3, R4)
Example:
...
"versions": {
"1.0.2": {
"name": "slicebugtest",
"version": "1.0.2",
"description": "This is a package to test a slice bug.",
"dist": {
"shasum": "71600cccef5dd56ca3e05145951c14302ce1d27d",
"tarball": "https://packages.simplifier.net/slicebugtest/1.0.2"
},
"fhirVersion": "STU3",
"url": "https://packages.simplifier.net/slicebugtest/1.0.2"
}
}
...
I'm looking for resolution in the validator code for this, otherwise, validating 4.1.0 or 4.3.0 could be problematic.
David Otasek (Feb 24 2022 at 19:28):
@Ward Weistra One more, with regards to the API. To pre-populate the popup in the validator-wrapper UI, I can limit my queries to simplifier.net based on version (once we resolve the version issue above). But I'm getting a weird behaviour when searching for unmatched versions. I believe the following should be returning 0 results, but it looks like it's giving me the same result as having no search fields:
https://packages.simplifier.net/catalog?fhirVersion=R5&prerelease=false
Grahame Grieve (Feb 24 2022 at 19:46):
simplifier only supports the three versions at the moment. it doesn't contain packages for the other versions, so not point querying it for those.
Grahame Grieve (Feb 24 2022 at 19:47):
I'm not sure where the version code issue surfaces - the java interface should use FHIRVersion, and automatically handle the fact that simplifier doesn't
Ward Weistra (Feb 25 2022 at 16:02):
@David Otasek Does Grahame's reply answer your question? Otherwise, you can of course open up the package and look at the FHIR versions and core package dependencies in the package.json
David Otasek (Feb 25 2022 at 21:17):
@Ward Weistra @Grahame Grieve yes, this is making the picture clearer. I believe the online validator is attempting to narrow down the available selection of IGs based on the semantic version, and appears to also be explicitly setting the version when it validates. Filtering is probably helping that IGs dropdown perform more responsively, but if we're to expand the IGs included, it may have to be adjusted.
Ward Weistra (Feb 28 2022 at 09:53):
Good to hear @David Otasek. The API can also tell you what the latest released version of a package/IG is or list all versions for a user to choose from.
Last updated: Apr 12 2022 at 19:14 UTC