I have to implement a custom query result to be returned using the FHIR Bundle Resource.
I am a novice and not well versed in InterSystems yet so please excuse mistakes due to ignorance.
I have to take the query result and return in a bundle to achieve this I need to:
- build the pages for the bundle from the query result according to the number of records per page configured or specified in the url
- store these query results using a state id
- when next page is request return records for the next page or according to the page number requested
Please, does anybody know how to achieve each of the steps above? How do I store the query results against a state id?
How do I add these page results to the bundle so that the links reflect the correct pages(self, next, etc.)?
Your help shall be appreciated.