FHIR Chat · FHIR R4 Encounter model · hapi

Stream: hapi

Topic: FHIR R4 Encounter model


view this post on Zulip AJ Chen (Oct 16 2020 at 02:08):

which class in hapi-fhir-structures-r4 model captures the encounter class values (like inpatient) in ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum ?
I'm creating R4 Encounter java object, but can't find anything similar to dstu2 EncounterClass.

view this post on Zulip Gino Canessa (Oct 16 2020 at 15:29):

When looking at the R4 structures, it's good practice to look at the specification pages; for Encounter, there is an element: class, which uses the HL7 v3 ActEncounterCode. I believe that's what you are looking for.

view this post on Zulip AJ Chen (Oct 16 2020 at 18:40):

@Gino Canessa thanks.. I see the element in fhir specs. My problem is I can not find the corresponding java class V3ActEncounterCode in r4 library or anywhere. Do you know the java class?

view this post on Zulip Ian Bacher (Oct 16 2020 at 19:19):

There isn't an enum for that value set in R4. Enums are only generated where the binding is "required" (see here) and as of DSTU3 the binding for Encounter.class shifted to extensible.

OTOH, it's not hard to make your own:

Coding inpatient = new Coding("http://terminology.hl7.org/CodeSystem/v3-ActCode", "IMP", "inpatient encounter")

And reference them as needed.

view this post on Zulip AJ Chen (Oct 16 2020 at 19:42):

@Ian Bacher thanks. It explains. Will make local codings as you suggested.


Last updated: Apr 12 2022 at 19:14 UTC