Smart Config Store
The SmartConfigStore exposes the following properties:
- client
- patient
- user
- encounter
Here's how you use the store hook in your React functional component:
import { useSmartConfigStore } from '@aehrc/smart-forms-renderer';
function App() {
const storeProperty = useSmartConfigStore.use.{insert_property_name_here}();
return (
<div>{storeProperty}</div>
);
}
Refer to the API Reference for more information on each property.
warning
The SmartConfigStore doesn't actually do much within the renderer at the moment. It is not tested thoroughly and is retained for backward compatibility purposes.
Terminology endpoints are managed in TerminologyServerStore. If there is a need to expand on functionality of making FHIR calls within the renderer, feel free to let us know.
From a best practice perspective, it is recommended to perform FHIR calls outside of the renderer and pass the pre-populated QuestionnaireResponse into the renderer.