Stream: australia
Topic: StructureDefinition list
Stephen Royce (Jun 22 2016 at 04:42):
I'm gonna ask this qeustion here because I don't want to bother the general implementers: is there a query (not download) that I can run against a server that will give me a definitive list of all StructureDefinitions in a given version of the FHIR specification preferably including any profiles and logical models that the server knows about?
Stephen Royce (Jun 22 2016 at 04:46):
In theory, I should be able to use GET <FHIR server>/StructureDefinition, but if I try this against http://hl7.org/fhir/2016May, I get the StructureDefinition page, not a list. I presume the main problem here is that http://hl7.org/fhir/2016May is not really a FHIR server, right? However, I'm curious about this because GET <FHIR server>/Patient will give me all patients, but StuctureDefinition, being a StructureDefinition is slightly different to (nearly) all other resources. I would assume that GET <FHIR server>/StructureDefinition should return a list a GET <FHIR server>/StructureDefinition/StructureDefinition should return StructureDefinition. Anyone got any ideas?
Brian Postlethwaite (Jun 22 2016 at 04:55):
You are correct, that is just a web server, not a fhir server.
Brian Postlethwaite (Jun 22 2016 at 04:56):
And any of the reference implementations might have them, but could also have been changed and others added by people (using clinfhir for example)
Brian Postlethwaite (Jun 22 2016 at 04:56):
Only place is a download of the 2 xml files from there which contain all these.
Brian Postlethwaite (Jun 22 2016 at 04:57):
You could always upload them on a local server and then query it.
Grahame Grieve (Jun 22 2016 at 05:14):
I'm working on the spec to make it more conformant as a FHIR end point. But it won't support search, I'm afraid
Stephen Royce (Jun 22 2016 at 06:24):
Stephen Royce (Jun 22 2016 at 06:27):
The reason I want a query is because the list will be dynamic, albeit not very. Downloads only ever give you a point-in-time snapshot. Of course, one can keep one's eye on releases and re-download every time, but that's a pain.
Grahame Grieve (Jun 22 2016 at 06:28):
I'm not sure that I see the difference between
GET http://hl7.org/fhir/StructureDefinition
Grahame Grieve (Jun 22 2016 at 06:28):
and
Grahame Grieve (Jun 22 2016 at 06:28):
GET http://hl7.org/fhir/profiles-reosurces.xml
Grahame Grieve (Jun 22 2016 at 06:29):
one if more conformant with the spec, in terms of being an instance of itself, but is there an operational difference?
Stephen Royce (Jun 22 2016 at 06:30):
No. I don't suppose so. I wouldn't care how the list was retrieved, just that it was always up-to-date.
Stephen Royce (Jun 22 2016 at 06:32):
I wasn't aware that profiles-resources.xml
was an option. Is that documented?
Stephen Royce (Jun 22 2016 at 06:33):
It's very big, though. One would probably prefer a summary query.
Grahame Grieve (Jun 22 2016 at 06:33):
I'd be really clever to figure out a summary query from a static set of html files
Grahame Grieve (Jun 22 2016 at 06:34):
it's not particularly documented, no
Stephen Royce (Jun 22 2016 at 06:34):
That's okay; I was just wondering.
Stephen Royce (Jun 22 2016 at 06:35):
Are you suggesting I should effectively "scrape" the FHIR website for resource definitions?
Grahame Grieve (Jun 22 2016 at 06:35):
well, profiles-resources.xml is the preferred way to do it
Stephen Royce (Jun 22 2016 at 06:37):
Right. I hate scraping. A big XML file is probably better.
Brian Postlethwaite (Jun 22 2016 at 06:53):
and you'll want profiles-datatypes.xml too?
Brian Postlethwaite (Jun 22 2016 at 06:54):
Would interrogating the simplifier registry work?
(does it have all that stuff in it?)
Stephen Royce (Jun 22 2016 at 06:54):
No. I'd like extensions though. Does that exist?
Brian Postlethwaite (Jun 22 2016 at 06:55):
Plus side, could use the _history to check for changes, and would have contributions from others too.
Stephen Royce (Jun 22 2016 at 06:55):
I'm committed to FHIR version 1.4.0, so simplifier won't work for me; at least, not at the moment.
Brian Postlethwaite (Jun 22 2016 at 06:55):
The standard ones will be in the profiles-resources.xml (I think)
Grahame Grieve (Jun 22 2016 at 06:56):
that's not necessarily true. Check the current build downloads, and look in the DSTU2 release for forge
Stephen Royce (Jun 22 2016 at 06:57):
profiles-resources appears to only contain resource StructureDefinitions; no profiles, no extensions.
Grahame Grieve (Jun 22 2016 at 06:57):
those are different files
Stephen Royce (Jun 22 2016 at 06:57):
To be precise distinct-values(//StructureDefinition/kind/@value)
returns only "resource".
Stephen Royce (Jun 22 2016 at 06:58):
And those files would be named...?
Grahame Grieve (Jun 22 2016 at 06:58):
better to download the definitions.xml.zip. or for you, definitions-r2.xml.zip
Stephen Royce (Jun 22 2016 at 07:00):
Indeed. It seems a download is going to my best option anyway because profiles-resources.xml is too big to run remote XPath queries on anyway.
Stephen Royce (Jun 22 2016 at 07:01):
(Not that they don't work; just that the system has to cache the whole file first and that's really slow!)
Stephen Royce (Jun 22 2016 at 07:03):
Are the definitions ZIP files linked in the documentation?
Grahame Grieve (Jun 22 2016 at 07:03):
y. downloads page
Stephen Royce (Jun 22 2016 at 07:04):
Suite!
Stephen Royce (Jun 22 2016 at 07:06):
Is that validation.xml.zip now?
Stephen Royce (Jun 22 2016 at 07:07):
Don't mind me, I was looking at the May2016 site.
Stephen Royce (Jun 22 2016 at 23:20):
I also spent ages looking around this for profiles until I remembered that "profile" is not a value for kind
!
Last updated: Apr 12 2022 at 19:14 UTC