Right now to order labs via Vital:
1. We have a medplum bot, that given a service request creates an order via the Vital API
2. We have another bot that listens to webhooks and stores the result in the FHIR datastore
Looking at HG implementation orders are triggered via a Questionnaire response as extra information such as AOE, Lab tests etc are collected in a questionnaire.
So I assume we'll need a similar flow where our bots are triggered via a Questionnaire Response, which has additional information required for the order. The issue is this additional information is determined dynamically based on our internal compendium for each lab and internal logic.
We have an API where you can create lab panels and then via API the required AOE questions and any other information is surfaced to the end user, so that they can dynamically generate their UI.
If I understood correctly, each org will actually preconfigure their lab panels based on what is commonly ordered, so that the AOE's are not dynamically generated.
Sorry if I'm being daft, trying to understand the flow and the best way to implement Vital.