Stream: dotnet
Topic: Conformance - OperationDefintion and References
Harald Sømnes Hanssen (Jun 03 2016 at 14:20):
Hi.
It was suggested from the Implementers stream, that I'd ask the my question here.
I'm struggeling with implementing Conformance for Queries. Describing Resources like AllergyIntolerance is fairly simple, but when it comes to describing a query, I'm having a bit of an issue.
The custom query looks something like this: http://.../fhir?_query=revkirent&name=<someName>
The query will then return a Bundle with Practitioner, Organization and HealthcareService.
What I want to do is to describe the different search options such as name:exact, name:contains, lastupdated, identifier in the metadata. However, I don't really understand how I'm supposed to do it using Operation and references. I however have made a lot of OperationDefinitions, but I have no clue where to put them in the Conformance object.
Mirjam Baltus (Jun 03 2016 at 14:41):
I think what you could do best is to put the information about the options in the description of the operation, so in OperationDefinition.description and perhaps also generate that in OperationDefinition.text, so it can be seen when you just display the human readable part.
If I understand correctly, you also want to say your server supports this operation, by putting it in the metadata/Conformance statement of the server. That is done by putting the name and the reference to the operation in the Conformance resource. In code, skipping all other parts of filling in the Conformance resource, it could be done like this:
var x = new Conformance();
var y = new Conformance.ConformanceRestComponent();
var z = new Conformance.ConformanceRestOperationComponent();
z.Name = "revkirent"; z.Definition = new ResourceReference() { Reference = "http://example.org/fhir/OperationDefinition/revkirent" }; y.Operation.Add(z); x.Rest.Add(y);
All other operations you have defined can also be added in a similar way to the Conformance statement, just keep adding to 'y' after you've specified the right name and reference.
Anyone who would want to know more about the operations your server supports can first lookup which operations are supported in the metadata, and then retrieve the OperationDefinitions using the references you've provided and read the descriptions.
Harald Sømnes Hanssen (Jun 05 2016 at 07:25):
So in other words, OperationDefinitions are resources which are referenced by ResourceReferences in the conformance object.
Brian Postlethwaite (Jun 06 2016 at 01:30):
Correct.
Last updated: Apr 12 2022 at 19:14 UTC