fhir-py icon indicating copy to clipboard operation
fhir-py copied to clipboard

Is there an API to handle the ValueSet resource?

Open anibal2j opened this issue 2 years ago • 2 comments

I need to generate ValueSet in JSON from some data that's stored in Excel. I can read the Excel data no problem (using pandas), but I'd like to have an API to be able to build a ValueSet and then have that resource export it to JSON, so that we can import it into some other system. I've been looking at this library - but can't find any classes nor API to deal with ValueSet.

If the ValueSet resource is not available in the FHIR-PY, is there another module out there that I can use?

anibal2j avatar Apr 12 '23 17:04 anibal2j

Hi @anibal2j! This library provides general resource wrappers, so it means that you can use low-level API:

my_vs = client.resource("ValueSet", {
    # Content of ValueSet resource
})
my_vs.save()

ruscoder avatar Aug 19 '23 13:08 ruscoder

If you need to execute ValueSet operations, like $expand it can be done using execute(), e.g.:

my_vs.execute('$expand')

ruscoder avatar Aug 19 '23 13:08 ruscoder