Stream: implementers
Topic: How can a server diatingusish a profile extension
yiwang (Sep 02 2016 at 17:26):
Hi, there.
I read the example about a profile of Diagnostic Report, http://hl7.org/fhir/2016Sep/diagnosticreport-example-lipids.json.html, but I cannot find a valid key to reveal this is a lipid profile extension from DIagnosticReport (I don't think the key,display text is a good idea to classify). Its resourceType follows the base type is extends (e.g. DiagnosticReport in this example)
And http://hl7.org/fhir/2016Sep/search.html#profile Indicates that a serach parameter is supported to locate this profile :
'''
GET [base]/DiagnosticReport?_profile=http://hl7.org/fhir/StructureDefinition/lipid
GET [base]/DiagnosticReport?_profile=Profile/lipid
'''
So the server is capable of selecting this kind of profile. Can anyone explain how to achieve this target? Will it depend on a primate key as an identity? or will it depend on the check of the structure definition followed by fhir specification? thx
Lloyd McKenzie (Sep 02 2016 at 20:15):
@yiwang Can you explain a bit more what you're trying to do? _profile allows you to filter to only include resources that declare a specified profile. Profiles and extensions are not the same thing. Profiles are a collection of constraints that a particular instance might be compliant with. Extensions are additional elements that might be present in an instance (and which could be mandated to be present or otherwise constrained by a profile). The specific example you pointed to doesn't declare a profile in the instance, so you won't be able to find it by searching by profile - even though in this case it should be conformant with the lipids profile.
yiwang (Sep 02 2016 at 20:23):
@Lloyd McKenzie I'm sorry for using the word 'profile extension'. Actually I only concern about profile. I just wonder how the search param works and how can we distinguish a specified profile (e.g. lipids profile) from the original(or the base type) (e.g. DiagnosticReport) They are both with key referenceType='DiagnosticReport‘ and I did not find any tagged symbol/token to indicate it is profiled as lipid profile ones. : (
Grahame Grieve (Sep 02 2016 at 20:45):
See this: http://hl7-fhir.github.io/resource.html#profile-tags
Grahame Grieve (Sep 02 2016 at 20:47):
it's up to the server how it works; the server can do one 4 things:
- not support the parameter
- only index resources that arrive with a profile claim
- validate resources against profiles for itself, and explicitly mark them with the claim, and search on that
- validate resources against profiles, remember the association, and search on that (without explicitly marking the claim)
yiwang (Sep 02 2016 at 20:50):
@Grahame Grieve wow, excellent. I think it would be better if there are some links http://hl7.org/fhir/2016Sep/search.html#profile beneath the RESTful API to explain the profile-tags issue : ) . Thank u
Grahame Grieve (Sep 02 2016 at 21:00):
yes, and in fact, there used to be text like this somewhere, but I couldn't find it. can you create a task to add it?
yiwang (Sep 02 2016 at 21:01):
Ok , I'll figure out how to fix it : )
Last updated: Apr 12 2022 at 19:14 UTC