Hello all,
I recently changed jobs into the healthcare field and am currently working with the Hapi JPA server (DSTU3). I have enabled $lastn and this seems to work fine, the indices in ES are being populated. When I do a query like Observation/$lastn, I get back results that make sense and the server logs Operation[extended-operation-type $lastn Observation]. So I assume this part is working correctly.
The problem is that I also need to filter within this $lastn dataset, but if I add parameters to this request, it seems to stop working or at least there are unexpected results.
Observation/$lastn?subject=2 yields an empty bundle, despite all Observations in the dataset being related to this subject. A regular Observation?subject=2 query behaves as expected. Similar results are present when filtering for specific code categories.
If $lastn is the operation, any _include parameters are also ignored, while these work fine without $lastn. The server logs still show the operation logged as being of $lastn type, but it really seems to me that any parameters will yield 0 results.
However I'm using the JPA starter server, so I don't even know if that's even possible? It seems to be something that can only be done if I'm using the plain server?
Apologies if this is a super obvious question but I couldn't really figure out where to add upon existing $lastn functionality, I am rather new to this. If anyone could point me in the right direction that would be awesome!
Thanks a lot in advance and kind regards,
Renske