10-18-2023 04:58 PM
Hi All,
I have an API where I am passing a parameter called changenumber as below
https://stg.integration-platform.medi-map.co.nz/fhir/MedicationAdministration?change-number=1711209
Once the call is made, it returns data with change number greater than 1711209. It returns around 100 records per run.
I need to pass the last change number from the response to the new call I make. Lets say the last record had a change number 1711308. This needs to be the parameter of the new call.
How can this be achieved.
TIA.
Mayur
10-18-2023 05:24 PM
You'll probably want to use the HTTP Client with the same (or similar) settings to the following. This actually supports pagination (which is effectively what this call stack is) the things you'll want to look out for in the pagination section are:
$entity.slice(-1).changeNumber
or wherever the change number that you want to reference is located within that last element, .slice(-1)
gets you the last element in that array.
10-22-2023 09:21 PM
Thanks for the reply. But I am not sure of the expression that needs to be used for the Override parameter.
10-23-2023 04:59 AM
It will depend on what the output of your document looks like, the parameters in that section will be able to reference fields in the output document (as opposed to the input document in most fields) to get the values, so you'd have to look at where in the output document the data you need to determine your data for the next page would be.