reference undefined is stored wrong on Medplum
# support
c
Hi @rahul1 we are facing an issue with Observation focus reference being empty while creating an Observation . we use
focus
field to link a Condition to an Observation , we found a bug (a race condition) in our system which sets reference to undefined
Copy code
{
... observation ,
focus: [{reference: undefined}]
}
on Medplum this is being stored as
Copy code
{
...observation,
focus: [{}]
}
problem with this is when use the search filter
focus:missing=true
these does not show up as the array has an empty object in it . i have also tried using
focus:contains={}
even that does not return anything . currently i use
focus:missing=false&sort=-focus
to sort and get these kinda values on top . but i remember from our previous conversation when doing batch queries sorting is not good and we cant find a way to query just these values. do you have any suggestions ?
@rahul1 could you please help us with this.
r
Sorting can be fine for batch queries. My previous comment was in regards to "Upsert" call - in that case, the sorting doesn't matter b/c we are just looking for a single entry
c
cool thanks for the update. but what is the most efficient way for us to query these particular records ?
151 Views