Stream: implementers
Topic: Enrich Encounter query options
Markku Nikkanen (Jul 15 2020 at 06:28):
Hello,
it seem that in Java and REST it is not possible to match queries against Encounter.participant.individual.type. How one can enrich Encounter query possibilities? Is it possible in Java to extend default search options?
Encounter.participant.individual.type
participant": [
{
"individual": {
"reference": "Practitioner/4",
"type": "role-xxx"
}
}
]
I do not find such search option:
http://build.fhir.org/encounter.html#search
Following are most closest:
participant-type token Encounter.participant.type
practitioner reference Encounter.participant.individual.where(resolve() is Practitioner)
(Practitioner)
Vassil Peytchev (Jul 15 2020 at 12:56):
I think you mean Encounter.participant.type:
participant": [
{
"type": [
"role-xxx"
]
"individual": {
"reference": "Practitioner/4"
}
}
]
Markku Nikkanen (Jul 16 2020 at 05:36):
Vassil Peytchev said:
I think you mean Encounter.participant.type.
Nope, I mean Encounter.participant.individual.type. That is custom attribute I have added.
Lloyd McKenzie (Jul 16 2020 at 05:36):
You can't add custom attributes - at least not and be conformant
Lloyd McKenzie (Jul 16 2020 at 05:37):
(And certainly not expect the Java reference implementation to work...)
Markku Nikkanen (Jul 16 2020 at 05:48):
Lloyd McKenzie said:
You can't add custom attributes - at least not and be conformant
See how Encounter JSON object is constructed in frontend that is eventually posted to HAPI FHIR:
participant.push({
individual: {
reference: `Practitioner/${this.practitionerFhirId}`,
type: Roles.PHYSICIAN
},
Markku Nikkanen (Jul 16 2020 at 08:14):
This is not important anymore. I did move role under participant.type.
"participant": [
{
"type": [
{
"coding": [
{
"system": "http://something.com/fhir/ValueSet/encounter-participant-type",
"code": "PHYSICIAN"
}
]
}
],
"individual": {
"reference": "Practitioner/4"
}
}
],
Now, I can query Encounters by Practitioner role.
http://localhost:8080/fhir/Encounter?participant-type=http://something.com/fhir/ValueSet/encounter-participant-type|PHYSICIAN
Vassil Peytchev (Jul 16 2020 at 13:36):
(deleted)
Last updated: Apr 12 2022 at 19:14 UTC