FHIR Chat · Valueset · hapi

Stream: hapi

Topic: Valueset


view this post on Zulip Venkat (Jan 04 2022 at 13:31):

Hi , How to refer to default valueset comes with HAPi from the code. for e.g.i am constructing the practitioner resource to return for practitioner read API call and i want to map the values for http://terminology.hl7.org/ValueSet/v2-2.7-0360 from the code. any sample way / document to do that. using comunity edition of FHIR server and using extened class of the RestfulServer.java. If i have the value "AA" and i would like to get the corresponding description and fill the resource.

view this post on Zulip Lin Zhang (Jan 04 2022 at 22:39):

You mean returning the code 'AA''s display name 'Associate of Arts'? Or map the valueset to another one?

view this post on Zulip Venkat (Jan 05 2022 at 06:16):

Lin Zhang said:

You mean returning the code 'AA''s display name 'Associate of Arts'? Or map the valueset to another one?

Yes, If i pass the value "AA" code and get the corresponding value in which the description is present
i am able to found sample code ...could you pls let me know whether its correct way.
IBaseResource rs = ctx.getValidationSupport().fetchValueSet("http://terminology.hl7.org/ValueSet/v2-2.7-0360");
where i can find the value and description inside the returned IBaseResource

view this post on Zulip Lin Zhang (Jan 05 2022 at 13:11):

The Operation $validate-code on ValueSet might be what you want:
http://hl7.org/fhir/valueset-operation-validate-code.html

view this post on Zulip Venkat (Jan 05 2022 at 13:51):

Lin Zhang said:

The Operation $validate-code on ValueSet might be what you want:
http://hl7.org/fhir/valueset-operation-validate-code.html

Hi Lin, I would like to refer it from with in the code. I have code "AA" from DB and i would like to convert it into one of valid Valuset by doing lookup with value "AA" and get the description for the same with in the code and set it as part of the Practitioner Resource.

view this post on Zulip Lin Zhang (Jan 05 2022 at 22:20):

I haven't dealed with such stuff and don't know how to do it exactly. You might want see the docs to find the methods you need:
https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-r4/org/hl7/fhir/r4/model/ValueSet.html

view this post on Zulip Lin Zhang (Jan 05 2022 at 22:24):

For example, start from ValueSet.getCompose() to .getInclude() to ..getConceptFirstRep() to ...getCode() and ...getDisplay().

view this post on Zulip Venkat (Jan 06 2022 at 11:15):

Hi Lin, Thanks for Info...will check it oit

view this post on Zulip Lin Zhang (Jan 11 2022 at 01:22):

How is it going?


Last updated: Apr 12 2022 at 19:14 UTC