FHIR Chat · How to expand ValueSets with the C# FHIR API? · implementers

Stream: implementers

Topic: How to expand ValueSets with the C# FHIR API?


view this post on Zulip Chris Munro (Sep 27 2017 at 12:00):

I am trying to expand a ValueSet to get a list of the codes included in the set.

The C# API contains a method to expand ValueSets e.g.:

endpoint1 = "https://stu3.simplifier.net/open/";
var client = new FhirClient(endpoint1);
var expandedValueSet = client.ExpandValueSet(location, null);

I have been trying to do this with the QuestionnaireItemType ValueSet https://simplifier.net/core-vs-stu3/item-type
So in the code above location="https://stu3.simplifier.net/open/ValueSet/043d233c-4ecf-4802-a4ac-75d82b4291c2"

But I just get an error message back:

"Operation was unsuccessful, and returned status MethodNotAllowed. OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)\r\n\r\n[ERROR] (no details)(further diagnostics: Endpoint returned a body with contentType 'text/plain', while a valid FHIR xml/json body type was expected. Is this a FHIR endpoint?)\r\n"

I can't find any examples of using this successfully? Maybe one for @Michel Rutten or @Mirjam Baltus ??

view this post on Zulip Michel Rutten (Sep 27 2017 at 12:24):

Hi @Chris Munro, Simplifier does not (yet) support the value set expansion operation. Unfortunately, the returned status code misleading, the server should probably return "501 Not Implemented" (will be fixed).
We are planning to implement support for value set expansion into Simplifier in the near future, albeit limited to relatively small value sets. For intensive valueset operations, you should always use a specialized terminology server.

view this post on Zulip Chris Munro (Sep 27 2017 at 12:30):

Thanks for the reply @Michel Rutten

view this post on Zulip Michel Rutten (Sep 27 2017 at 12:32):

Your C# logic should work against a server that supports the operation.

view this post on Zulip Yunwei Wang (Sep 27 2017 at 13:23):

@Chris Munro Try fhir test server. Should work there. http://test.fhir.org/r3/ValueSet/$expand?url=http://hl7.org/fhir/ValueSet/item-type

view this post on Zulip Brian Postlethwaite (Nov 10 2017 at 23:06):

If you're doing Questionnaire stuff, the http://sqlonfhir-stu3.azurewebsites.net/fhir server has great validation specifically on Questionnaires and QuestionnaireResponses.

view this post on Zulip Brian Postlethwaite (Nov 10 2017 at 23:07):

(over and above the profile validation)


Last updated: Apr 12 2022 at 19:14 UTC